aaront1 Posted July 8, 2014 Share Posted July 8, 2014 In the back office, when I create product, Is there a way to Pre-fill the product's Description field (or other input field) with some HTML code or text? I am using PS 1.5.5 Link to comment Share on other sites More sharing options...
vekia Posted July 9, 2014 Share Posted July 9, 2014 ADMIN_DIR/themes/default/controllers/product/information.tpl there is a code: {include file="controllers/products/textarea_lang.tpl" languages=$languages input_name='description' class="autoload_rte" input_value=$product->description} you can change it, add there if condition to check if $product->description contains some contents if not - include some custom content, if so include $product->description Link to comment Share on other sites More sharing options...
TCB-Netherlands Posted March 26, 2019 Share Posted March 26, 2019 Is there a option for Presta 1.7.5? Especially for the Short description? I have found httpdocs/src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php But how i set it up with 'data' => 'some text the pre fill', Does overide text that already in DB and that is not showing after saving product, then DATA has come back kicking in. I must do an if empty then on the text area but symphony is not my strongest side. ->add('description_short', TranslateType::class, [ 'type' => FormType\TextareaType::class, // https://github.com/symfony/symfony/issues/5906 'options' => [ 'data' => 'Testen', //This overides the stored information in the DB, So does not work. 'attr' => [ 'class' => 'autoload_rte', 'placeholder' => $this->translator->trans('The summary is a short sentence describing your product.<br />It will appears at the top of your shop\'s product page, in product lists, and in search engines\' results page (so it\'s important for SEO). To give more details about your product, use the "Description" tab.', [], 'Admin.Catalog.Help'), 'counter' => (int) $this->configuration->get('PS_PRODUCT_SHORT_DESC_LIMIT') <= 0 ? 800 : (int) $this->configuration->get('PS_PRODUCT_SHORT_DESC_LIMIT'), ], 'constraints' => [ new TinyMceMaxLength([ 'max' => (int) $this->configuration->get('PS_PRODUCT_SHORT_DESC_LIMIT') <= 0 ? 800 : (int) $this->configuration->get('PS_PRODUCT_SHORT_DESC_LIMIT'), ]), ], 'required' => false, ], 'locales' => $this->locales, 'hideTabs' => true, 'label' => $this->translator->trans('Short description', [], 'Admin.Catalog.Feature'), 'required' => false, 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