Signalman Posted January 26, 2014 Share Posted January 26, 2014 I am running version 1.5.6.1 with the default theme. When you add a product to the cart (using the "Add to Basket" button on the categories page and view it in the block at the top right, some of them only show ... rather than the product name until a page refresh is done. Other products show up OK straight away. I have attached a file with some screenshots showing the different behaviours. The shop is not fully operational yet, but can be seen at "shop dot martelldesigns dot co dot uk". Cart.doc Link to comment Share on other sites More sharing options...
vekia Posted January 26, 2014 Share Posted January 26, 2014 can you attach simple text file? not everyone has got office to open it Link to comment Share on other sites More sharing options...
Signalman Posted January 27, 2014 Author Share Posted January 27, 2014 Sorry, can you see these? The descriptions of the images are below and correspond to the file numbers. 1.Spiral added, page not refreshed 2.As above, but after page refresh. 3.Cross added, page not refreshed. Does not show up. 4.Still no page refresh, but star added and it shows up, but cross does not. Link to comment Share on other sites More sharing options...
vekia Posted January 27, 2014 Share Posted January 27, 2014 check this topic: http://www.prestashop.com/forums/topic/178373-solved-ajax-cart-problem-showing-the-whole-product-name-when-you-add-to-cart/ Link to comment Share on other sites More sharing options...
Signalman Posted January 27, 2014 Author Share Posted January 27, 2014 The topic there is talking about something slightly different - they want to edit the length before it truncates it whereas I am using the values as set and get the problem that when the name is >12 characters, the first time it shows the list in the cart, it just has "..." as in the pictures. They also refer to blockcart2 which does not appear in my module list (either under modules or theme/default/modules However, referring to the posts there, I see that the corresponding line of code in ajax-cart.js that I have is var min = this.name.indexOf(';', 10); var name = (this.name.length > 12 ? this.name.substring(0, ((min - 10) <= 7) ? min : 10) + '...' : this.name); whereas Izraelviz says that line 434 is var name = (this.name.length > 12 ? this.name.substring(0, 10) + '...' : this.name); so I have tried changing it to that and it works. Not sure why this should be, but I will go with that for now. Link to comment Share on other sites More sharing options...
Recommended Posts