Whispar1 Posted May 20, 2014 Share Posted May 20, 2014 (edited) Okay I have a small script that adds the product description to a rich pin. However, the description is too long so how do I truncate the output? I tried: text: '{$product->name} {$product->description | truncate:200}' but of course resulted in an error Original script: <script type="text/javascript"> AddShoppersTracking.coupons = { pinterest: { text: '{$product->name} {$product->description}' } }; </script> Edited May 21, 2014 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Whispar1 Posted May 21, 2014 Author Share Posted May 21, 2014 Solved - Nemo tweaked it here: http://www.prestashop.com/forums/topic/327785-adding-product-short-description-to-pinterest-button/?do=findComment&comment=1679223 {$product->description|truncate:100:'...':true} 1 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