Jump to content

HTML code in the customization field.


Recommended Posts

  • 2 weeks later...

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

4 minutes ago, grolulu said:

Yes, Classic.

./themes/classic/templates/catalog/_partials/product-customization.tpl

image.thumb.png.80cb4967ded7e00404e1510a27ab686a.png

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 by ps8modules.com (see edit history)
Link to comment
Share on other sites

Posted (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 by grolulu (see edit history)
Link to comment
Share on other sites

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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...