Toulousain Posted March 12, 2022 Share Posted March 12, 2022 (edited) Hello, I want to change the length of the product name by increasing the number of characters allowed. Before version 1.7.8.2, you just had to replace in the file product.php the line : name' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => false, 'size' =>128, The parameter 'size' => 128 By 'size' => 190 // 190 being the new number of characters we want. Since version 1.8.2 'size' => 128 is replaced by 'size' => ProductSettings::MAX_NAME_LENGTH] It seems now that there is a configuration parameter from the backoffice but I can't find it. Do you know where it can be found ? Thanks a lot Edited March 12, 2022 by Toulousain solved (see edit history) Link to comment Share on other sites More sharing options...
PrestaServicePro Posted March 12, 2022 Share Posted March 12, 2022 Hello, check parameters=>products settings Link to comment Share on other sites More sharing options...
Ress Posted March 12, 2022 Share Posted March 12, 2022 Hi, 1. You need to modify in db, ps_product_lang, increase length of the "name" to 192 2. prestashop\src\Core\Domain\Product\ProductSettings.php public const MAX_NAME_LENGTH = 192; 3. prestashop\src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php ->add('name', TranslateType::class, [ 'type' => FormType\TextType::class, 'options' => [ 'constraints' => [ new Assert\Regex([ 'pattern' => '/[<>;=#{}]/', 'match' => false, ]), new Assert\NotBlank(), new Assert\Length(['min' => 3, 'max' => 128]), ], 'attr' => [ 'placeholder' => $this->translator->trans('Enter your product name', [], 'Admin.Catalog.Help'), 'class' => 'edit js-edit serp-default-title', ], ], modify new Assert\Length(['min' => 3, 'max' => 192]), 3 Link to comment Share on other sites More sharing options...
Toulousain Posted March 12, 2022 Author Share Posted March 12, 2022 Hello Ress, You are a champion, you solve once again my problem in detail and being very professional. The problem is now solved, thank you again. Good continuation to you 1 Link to comment Share on other sites More sharing options...
SIPL Online Posted November 28, 2023 Share Posted November 28, 2023 That did the trick for new product creation but waht abnout already created product, it don't seem to work. Link to comment Share on other sites More sharing options...
SIPL Online Posted November 29, 2023 Share Posted November 29, 2023 This don't work when editing an already created product, after product crreation i am still limited to 128 characters when editing the product. I tried creating a new product manually and i was able to have 255 characters in the product title. There should be another settings to change for that part but i don't know what. Link to comment Share on other sites More sharing options...
SIPL Online Posted November 29, 2023 Share Posted November 29, 2023 I forgot to mention that i am running Prestashop 8.1.2 Link to comment Share on other sites More sharing options...
ShopMann Posted December 18, 2023 Share Posted December 18, 2023 Am 29.11.2023 um 2:22 PM schrieb SIPL Online: I forgot to mention that i am running Prestashop 8.1.2 Hi, are you find any solution? I am running also Prestashop 8.1.2. Does anyone know any module that solves this problem? Link to comment Share on other sites More sharing options...
Mario Evangelista Posted July 12, 2024 Share Posted July 12, 2024 (edited) Thanks, this article help me a lot! Edited July 12, 2024 by Mario Evangelista (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