Jump to content

[Solved] - Add 2 lines of text to all "Descriptions" for all Products.


Recommended Posts

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

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

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_lang
SET 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

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hi Bellini13

I 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>

Regards
Greg

Edited by lateral (see edit history)
Link to comment
Share on other sites

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

  • 2 years later...
  • 1 year 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...