Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items disappearing from the basket preview bar #140

Open
ondrei opened this issue Apr 27, 2024 · 5 comments
Open

Items disappearing from the basket preview bar #140

ondrei opened this issue Apr 27, 2024 · 5 comments

Comments

@ondrei
Copy link

ondrei commented Apr 27, 2024

Hello,

I noticed an issue with the cart: When I add an item to the cart, click on checkout, "change my mind," and then go back, for example, to the homepage, the item disappears from the cart preview. However, when I click on the cart again, the item reappears.

I'm attaching a video from Aimeos demo page: https://www.loom.com/share/d678ba003f364416a82423374e477f9b

On localhost, instead of the cart icon, I sometiomes get an error message: A non-recoverable error occured

@ondrei ondrei changed the title Basket bug Items disappearing from the basket preview bar Apr 27, 2024
@aimeos
Copy link
Owner

aimeos commented Apr 27, 2024

This is due to browser caching for performance reasons. The browser will cache the home page for 30 sec:
https://github.com/aimeos/aimeos-laravel/blob/master/src/Controller/CatalogController.php#L86

@ondrei
Copy link
Author

ondrei commented Apr 27, 2024

Thank you for your quick response! ^^

Is there a way to disable the cache, or at least overwrite it?

Also, I encountered another issue - the inability to pin from the catalog. The user has to click through to the detail view for it to work.

Plus, after logging into Demo Admin, it redirects to a different page (in my case, to Google, where I came from). The user has to navigate to the admin page twice.

Video: https://www.loom.com/share/a88b1fb1953340a892ac705b8f9c527c

@aimeos
Copy link
Owner

aimeos commented Apr 28, 2024

Is there a way to disable the cache, or at least overwrite it?

You can change the cache_maxage value in the ./config/shop.php

Also, I encountered another issue - the inability to pin from the catalog. The user has to click through to the detail view for it to work.

The demo doesn't use the 2024.04 version yet. There, it works without problems.

Plus, after logging into Demo Admin, it redirects to a different page (in my case, to Google, where I came from). The user has to navigate to the admin page twice.

Strange, we can't reproduce that issue in the demo ourselves.

@ondrei
Copy link
Author

ondrei commented May 5, 2024

Thank you for your response.

Can I ask for advice on how to set the cache_maxage value in the ./config/shop.php?

I also noticed that (probably after an update) the PIN from the catalog does not work. There is some bug in js.
(video: https://www.loom.com/share/9360b525e4e94a9883ec3e24bcf2359f)

@aimeos
Copy link
Owner

aimeos commented May 6, 2024

Add 'cache_maxage' => 0, here: https://github.com/aimeos/aimeos/blob/master/config/shop.php#L63

When using Google Chrome as browser, we don't see the same behavior like in your video. Is there any error in the browser console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants