grolulu Posted February 20 Share Posted February 20 Could someone help me customize this field? I would like to add HTML tags by my back office. Thanks you for your help. Link to comment Share on other sites More sharing options...
grolulu Posted February 21 Author Share Posted February 21 Nobody know how to remove this restriction? In this text-area if i use HTML tags, like " <strong></strong>". There are automatically removed. I dont know how to fix this issue. Link to comment Share on other sites More sharing options...
ps8modules Posted March 1 Share Posted March 1 (edited) Hi. Sample for Prestashop 8.x. You didn't write what Prestashop you have. An adjustment needs to be made: ./src/Adapter/Product/AdminProductWrapper.php original: update to: product: and shop: Edited March 1 by ps8modules.com (see edit history) Link to comment Share on other sites More sharing options...
grolulu Posted March 6 Author Share Posted March 6 Thanks you. My prestashop is 8.1 I modified the file: AdminProductWrapper.php // Create multilingual label name $langValues = ''; foreach (Language::getLanguages() as $language) { $name = $customization['label'][$language['id_lang']]; foreach ($shopList as $id_shop) { $langValues .= '(' . (int) $id_customization_field . ', ' . (int) $language['id_lang'] . ', ' . (int) $id_shop . ',\'' . addslashes($name) . '\'), '; } } But nothing has changed. I can't use HTML. I don't understand. Link to comment Share on other sites More sharing options...
ps8modules Posted March 6 Share Posted March 6 Hi. Every time you change something, you need to clear the cache and recompile template. Link to comment Share on other sites More sharing options...
grolulu Posted March 6 Author Share Posted March 6 (edited) I did it but nothing as changed. And i clean the cache from my server too. Edited March 6 by grolulu (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted March 6 Share Posted March 6 (edited) What template are you using? Classic? ./themes/classic/templates/catalog/_partials/product-customization.tpl Edited March 6 by ps8modules.com (see edit history) Link to comment Share on other sites More sharing options...
grolulu Posted March 6 Author Share Posted March 6 Yes, Classic. Link to comment Share on other sites More sharing options...
ps8modules Posted March 6 Share Posted March 6 (edited) 4 minutes ago, grolulu said: Yes, Classic. ./themes/classic/templates/catalog/_partials/product-customization.tpl If you are going to use long HTML, you will need to change the length of the field in the database. It now has 255 characters. Table ps_customization_field_lang field name ALTER TABLE `ps_customization_field_lang` CHANGE `name` `name` TEXT NOT NULL; Edited March 6 by ps8modules.com (see edit history) Link to comment Share on other sites More sharing options...
grolulu Posted March 6 Author Share Posted March 6 (edited) I made the modification but the HTML still does not work. HTML character strings are not saved when i clic on "Save" For example: Before save: <strong>test</strong>. After save : test Edited March 6 by grolulu (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted March 6 Share Posted March 6 And how is it possible that it works for me in the test eshop? There must be an error somewhere that I can't see from my computer. Link to comment Share on other sites More sharing options...
grolulu Posted March 6 Author Share Posted March 6 I don't understand why but the problem still the same. The HTML character strings are not saved. Link to comment Share on other sites More sharing options...
grolulu Posted March 6 Author Share Posted March 6 After some test on line and on local. For "nofilter" it's OK. But i must write directly on the database the HTML character string. But "addslashes" doesn't work. When i write in the backoffice, the HTML character strings can't saved. Link to comment Share on other sites More sharing options...
ZHSoft Posted March 21 Share Posted March 21 Instead of trying to find ways to create rich text for you, I would recommend a more powerful HTML5 interactive module. Advanced product customization-Reuse attribute display https://addons.prestashop.com/en/combinaisons-customization/52000-advanced-product-customization-reuse-attribute-display.html 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