lateral Posted November 3, 2014 Share Posted November 3, 2014 (edited) Hi guys I have about 500 products in my shop and I want to add the same 2 lines of text to the bottom of the Description field (not the short description field) of all 500 products without the need to edit each individual Product record..... Does anybody know of a way to do this??? Thanks Edited November 5, 2014 by lateral (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted November 3, 2014 Share Posted November 3, 2014 Add it to product.tpl (theme folder). Open it up, locate {$product->description} and add your text right below, in the same container 1 Link to comment Share on other sites More sharing options...
lateral Posted November 3, 2014 Author Share Posted November 3, 2014 Thanks Nemo, I'll have a play around on my test site. I assume the method you suggested will work well if I want to add some fixed text such as "Copyright" information at the bottom of each Product Description but what it I want to add the information direct to the "Description" field so that I can then selectively edit 50 of the Products to slightly change the added text? Link to comment Share on other sites More sharing options...
NemoPS Posted November 5, 2014 Share Posted November 5, 2014 Ah, well I thought you wanted the same for all. In that case you can try with a small sql trick. Backup your database, then run this query UPDATE ps_product_langSET description = CONCAT ( description, ' the other content you want to add')WHERE id_product in (2,2,3,34,4) Of course use your real product ids. You can always restore the table if you fail 1 Link to comment Share on other sites More sharing options...
lateral Posted November 5, 2014 Author Share Posted November 5, 2014 Thanks Nemo I'll try this and let you know....I assume that I can do this through the Prestashop Back office SQL Manager?? Link to comment Share on other sites More sharing options...
bellini13 Posted November 5, 2014 Share Posted November 5, 2014 I believe SQL Manager only allows you to run SELECT queries to obtain data, not to update data. You should use the control panel to back up the mysql database, then use phpmyadmin to execute the UPDATE command 1 Link to comment Share on other sites More sharing options...
lateral Posted November 5, 2014 Author Share Posted November 5, 2014 Thanks Bellini13 Link to comment Share on other sites More sharing options...
lateral Posted January 23, 2015 Author Share Posted January 23, 2015 Hi guys I just tried to locate the {$product->description} in the Products.tpl file and can'tfigure out which one to change and what to actually change... Link to comment Share on other sites More sharing options...
NemoPS Posted January 24, 2015 Share Posted January 24, 2015 ? You can't change it from the tpl, it's dynamic data coming from the database as mentioned above Link to comment Share on other sites More sharing options...
bellini13 Posted January 24, 2015 Share Posted January 24, 2015 Hi guys I just tried to locate the {$product->description} in the Products.tpl file and can'tfigure out which one to change and what to actually change... Describe what you are trying to do Link to comment Share on other sites More sharing options...
lateral Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) Hi Bellini13I have about 600 products in my shop and I want to add the same "Call To Action" button (it's simply a single line of code as I have added the necessary CSS code to the global.css file ) to the bottom of every Product Description (not the short description field) of all 500 products without the need for me to manually edit each individual Product record..... This is the code that I want to use: <p><a class="button_cta" href="tel:+61242729920">Call Rod Now!</a></p>RegardsGreg Edited January 24, 2015 by lateral (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted January 25, 2015 Share Posted January 25, 2015 I am assuming you are using the default-bootstrap theme with PS v1.6.0.9 You should see the following on lines 469-478 {if $product->description} <!-- More info --> <section class="page-product-box"> <h3 class="page-product-heading">{l s='More info'}</h3>{/if} {if isset($product) && $product->description} <!-- full description --> <div class="rte">{$product->description}</div> </section> <!--end More info --> {/if} try changing that to the following. you are adding your html directly under the <div> element {if $product->description} <!-- More info --> <section class="page-product-box"> <h3 class="page-product-heading">{l s='More info'}</h3>{/if} {if isset($product) && $product->description} <!-- full description --> <div class="rte">{$product->description}</div> <p><a class="button_cta" href="tel:+61242729920">Call Rod Now!</a></p> </section> <!--end More info --> {/if} Link to comment Share on other sites More sharing options...
lateral Posted January 25, 2015 Author Share Posted January 25, 2015 Hi mate I'm not using the default theme. I'm using a theme that I purchased from templatemonster. Here is the link: Rodpenroseracing.com.au Link to comment Share on other sites More sharing options...
bellini13 Posted January 25, 2015 Share Posted January 25, 2015 the html code looks very similar to the default theme, you should still be able to locate the description in product.tpl and add your html after the <div> Link to comment Share on other sites More sharing options...
lateral Posted January 26, 2015 Author Share Posted January 26, 2015 Works like a charm!!!! Sensational! Thanks Bellini13, I really appreciate the help! Regards Greg Link to comment Share on other sites More sharing options...
learner88 Posted April 20, 2017 Share Posted April 20, 2017 hey bellini13, i am using prestashop, i have 1000 products on my website, i want to add a specific line to some products on product page below the add to cart button, how can i do this? please help me out. Link to comment Share on other sites More sharing options...
learner88 Posted April 21, 2017 Share Posted April 21, 2017 hey everyone i am using prestashop, #Pharmacyonnet , i have 1000 products on my website, i want to add a specific line to some products on product page below the add to cart button, how can i do this? website is https://www.pharmacyonnet.com/ please help me out. Link to comment Share on other sites More sharing options...
Eugene Savitsky Posted November 3, 2018 Share Posted November 3, 2018 On 03.11.2014 at 9:58 AM, lateral said: How do I add such a line, but need to translate it to different languages? Link to comment Share on other sites More sharing options...
Eugene Savitsky Posted November 3, 2018 Share Posted November 3, 2018 How do I add such a line, but need to translate it to different languages? Link to comment Share on other sites More sharing options...
NemoPS Posted November 4, 2018 Share Posted November 4, 2018 Try {l s="text goes here"} in product.tpl 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