FordMT Posted June 9, 2016 Share Posted June 9, 2016 (edited) I have products where the Features have several options depending on the Attributes selected. Currently the format I can get is everything in a single line, but that is hard for the user to decipher. Example: Length: 5 inches (127mm) 8 inches (203mm) 10 inches (224mm) Material: Nylon (NY) Polypropylene (PP) Resistance: NY: 46lbf (21kgf) PP: 40lbf (18kbf) Package Dimensions: 5IN: 275mm x 225mm x 155mm 8IN: 350mm x 225mm x 185mm 10IN: 385mm x 210mm x 215mm Weight: 5IN: 4.85lbs (2.20kg) 8IN: 5.90lbs (2.68kg) 10IN: 5.90lbs (2.68kg) I wanted to add line breaks within each Feature to make it easy to identify the different options of each Feature. Features descriptions should look as follows: Length: 5 inches (127mm) 8 inches (203mm) 10 inches (224mm) Material: Nylon (NY) Polypropylene (PP) Resistance: NY: 46lbf (21kgf) PP: 40lbf (18kbf) Package Dimensions: 5IN: 275mm x 225mm x 155mm 8IN: 350mm x 225mm x 185mm 10IN: 385mm x 210mm x 215mm Weight: 5IN: 4.85lbs (2.20kg) 8IN: 5.90lbs (2.68kg) 10IN: 5.90lbs (2.68kg) Is there anyway I can do this? Edited June 12, 2016 by FordMT (see edit history) Link to comment Share on other sites More sharing options...
raunhar Posted June 9, 2016 Share Posted June 9, 2016 Have you tries using HTML codes. Link to comment Share on other sites More sharing options...
Prestachamps Posted June 9, 2016 Share Posted June 9, 2016 Hi, You can use an override to enable multiple features to products(this way you can set from backoffice multiple values for every feature), and then modify the product.tpl , to put breaks after each filter value if more than one feature is present for each feature group. Regards, Leo Link to comment Share on other sites More sharing options...
FordMT Posted June 9, 2016 Author Share Posted June 9, 2016 I have tried entering html command <br> within the values of the Feature module. But the module does not accept entering the < or > symbols. And I do not know how to get into a html editor for the features module. Link to comment Share on other sites More sharing options...
rocky Posted June 11, 2016 Share Posted June 11, 2016 Here's a simple hack for multi-line feature values. Change line 477 (in PrestaShop v1.6.1.5) of themes/default-bootstrap/product.tpl from: <td>{$feature.value|escape:'html':'UTF-8'}</td> to: <td>{$feature.value|escape:'html':'UTF-8'|replace:'|':'<br />'}</td> You can then enter a feature value like 100|200 and it will display 100 and 200 on separate lines. Link to comment Share on other sites More sharing options...
FordMT Posted June 12, 2016 Author Share Posted June 12, 2016 Rocky, thank you, the hack worked perfectly. The my sentences have line breaks right where I place the '|'. Link to comment Share on other sites More sharing options...
rocky Posted June 12, 2016 Share Posted June 12, 2016 I'm happy my hack worked for you. Please edit the first post and add [sOLVED] to the title. 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