Jump to content
thirty bees forum

Strange cart / caching behaviour


RabbitZzZ

Recommended Posts

Hi,
I'm running a TB shop on the latest bleeding edge version with a slightly modified community theme and datakick's Chex OPC module.

The flyout cart shows a strange behaviour:

- if you add a product, the image size is bigger than of the products already in the cart (as long as you stay on a page)

- if you move on to the checkout page the products appear doubled in the flyout cart, once with big images and once with the smaller images

Does somebody know where this could come from? Templates and modules are up-to-date.

Thanks!

Link to comment
Share on other sites

So it seems like core updater didn't update the community-default theme completely. I checked the modules/blockcart folder against the version from git and they were different. 

I now updated it manually but the problem ist not 100% solved.

Still the latest added product in the cart has the bigger image size upon adding. The only "improvement" is that on checkout only the last product is shown double in the flyout cart and not all products as before.

Link to comment
Share on other sites

  • 6 months later...
  • 5 months later...

yeah I tried, but I'm sure that has nothing to to with image sizes, because in the sourcecode it's doubled in the cart with different IDs and one time with size attributes and one time without
URL would be https://www.thesinisterflame.com/shop/

To reproduce: add product to cart, click on proceed to checkout and check the flyout cart on the next page

Link to comment
Share on other sites

I have seen this before, a log time ago and can't remember what the issue was. I will put my thinking cap on

Have you tried uninstalling the cart block. Delete the cart block. Re-install the cart block? Just to ensure all files have been updated correctly

Link to comment
Share on other sites

This is theme issue.

The HTML inside cat block can be either created dynamically on client side using javascript after the ajax call(file ajax-cart.js), or directly on your server during standard full-page load, using template blockcart.tpl.

I assume your theme modified one of these two approaches (either js or template), so it's a little bit weird. You should investigate, and either revert the change, or modify the other display method accordingly.

Link to comment
Share on other sites

9 minutes ago, RabbitZzZ said:

It's the community standard theme. Nothing is modified besides some colors in the css. I compared it with the unaltered current version.

Something must be different. I just tested this on community-theme-default on my local installation and it works properly.

Link to comment
Share on other sites

  • 2 weeks later...

Check image type sizes. <img> within <picture> has explicit dimensions sourced from image type, maybe that's the reason why in your case the sizes are different. If so, force the size with css rule to match. Or upadte image type dimensions and regenerate the images

Link to comment
Share on other sites

  • 1 month later...

I did read a similar issue that was caused by having more than one cart block module installed. Perhaps a default one and a theme one.

Check all your modules to ensure you do not have two installed, and perhaps check the module folders also. You can try renaming one of the cart block folders to see if it makes the issue go away

https://www.prestashop.com/forums/topic/206874-solved-duplicate-items-in-cart-error/

Link to comment
Share on other sites

  • 2 weeks later...
12 minutes ago, RabbitZzZ said:

Thanks for the tip, but there is only one cart block module installed. So unfortunately that's also not it.
As mentioned, I suspect something in @datakick's Chex module, because if i deactivate it, the cart is ok.

My module sometimes calls ajaxCart.updateCart() method (if it exists). ajaxCart is an object created by BlockCart module, but its javascript code is quite often overwritten by themes. It is this module javascript that is responsible for retrieving current content of cart, and updating html in the page. There seems to be some bug in this code that (sometimes) creates duplicate entries.

I don't consider this to be bug in the chex, as calling ajaxCart.updateCart() method multiple times should be perfectly fine and acceptable use case.

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...