Ray UK Posted February 18, 2014 Share Posted February 18, 2014 Hi, I have enlarged the cart block somewhat. I have edited the truncate command in blockcart.tpl to {$product.name|truncate:30:'...'|escape:html:'UTF-8'} When adding a product to the cart, the title of the product seems to be truncated. Yet after refreshing the page, the full title is show and not truncated. Where do I have to edit to show the product name in full on adding the product (before refreshing the page) Link is in my sig Thanks Link to comment Share on other sites More sharing options...
Ray UK Posted February 18, 2014 Author Share Posted February 18, 2014 also in blockcart-json.tpl i have changed "name": "{$product.name|html_entity_decode:2:'UTF-8'|escape:'htmlall'|truncate:30:'...':true}", and forced a refresh. But the product name is still truncated untill a refresh Link to comment Share on other sites More sharing options...
Ray UK Posted February 20, 2014 Author Share Posted February 20, 2014 Here is what I mean....I added the top product and refreshed.The 2nd product I added but havent yet refreshed.The 2nd product name is truncated, but if I refresh now then it is not truncated. Ive tried in blockcart.js and blockcart-json.js but can figure it out Link to comment Share on other sites More sharing options...
vekia Posted February 21, 2014 Share Posted February 21, 2014 hello what blockcart-json.tpl file you changed? located in /modules/blockcart/ dir or in /themes/YOUR_THEME/modules/blockcart/ ? Link to comment Share on other sites More sharing options...
MilkSheikh Posted August 14, 2015 Share Posted August 14, 2015 Hi, Interested by a fix for that too as I get exactly the same issue (truncated then refresh then not truncated anymore) though I amended blockcart and blockart-json in the theme properly... Link to comment Share on other sites More sharing options...
MilkSheikh Posted August 14, 2015 Share Posted August 14, 2015 (edited) Finally got it to work in PS 1.6 (full txt when add to cart) by changing in yourtheme/js/modules/blockcart/ajax-cart.js the following with the desired length: name = (name.length > 25 ? name.substring(0, 24) + '...' : name); I precise this is if you want the product name to be displayed fully, or up to xx characters when added to cart without having to refresh Edited August 15, 2015 by MilkSheikh (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now