Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Posts
    107
    Plugin Contributions
    0

    Default Can I add a line of text to all products at once?

    Hi there!

    Just wondering if anyone knows if I can add a line of text in the product description of all of my products at once and, if so, how do I accomplish this? I have over 300 products so if I was to have to add the new text to each product individually it will take me forever.

    Thanks in advance

    Jennifer

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Can I add a line of text to all products at once?

    Quote Originally Posted by jcrewe View Post
    Hi there!

    Just wondering if anyone knows if I can add a line of text in the product description of all of my products at once and, if so, how do I accomplish this? I have over 300 products so if I was to have to add the new text to each product individually it will take me forever.

    Thanks in advance

    Jennifer
    This is 'off the top of my head' so the syntax may not be 100% correct.

    Code:
    UPDATE `products_description` SET `products_description`= CONCAT(`products_description`, " New Text") WHERE 1 ;
    To use this code you'll need to be using a tool such as phpmyadmin. First select your zencart products_description database table, then click the 'SQL' button and paste the code.
    Change " New Text" to whatever you desire, then click the 'Go' button.

    WARNING: There is no going back after pressing 'Go'. You'll either be greeted with some kind of error, or the upgrade will be almost instant. Like all database upgrades it will be prudent to make a copy of the database table *before* invoking this code.

    Cheers
    Rod

  3. #3
    Join Date
    Jul 2010
    Location
    Velsen-Zuid
    Posts
    33
    Plugin Contributions
    2

    Default Re: Can I add a line of text to all products at once?

    Open includes/templates/YOUR_TEMPLATE/templates and find product_info_display.php

    You can add HTML nearly anywhere before the <!--bof--> en after the <!--eof--> lines:

    Example:

    Your HTML

    <!--bof Category Icon -->
    <?php if ($module_show_categories != 0) {?>
    <?php
    /**
    * display the category icons
    */
    require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
    <?php } ?>
    <!--eof Category Icon -->

    More HTML etc. etc...

  4. #4
    Join Date
    Jul 2011
    Posts
    107
    Plugin Contributions
    0

    Default Re: Can I add a line of text to all products at once?

    Thank you RodG and Digiwinkel for your replies. RodG, I havent tried your suggestion yet because I am more comfortable working with HTML than I am with editing my database.

    Digiwinkel, I tried your suggestion and it worked great! I am wondering, though, if I am able to delete this from a handful of products that it doesnt apply to? I know my original post stated that I wanted to apply it to all of the products but I was thinking that there would be a way to actually add to the product description in bulk and then just remove the newly added text individually from the few products it doesnt apply to as removing the newly added text from the few products it doesnt apply to would be a lot quicker than adding to all the products it does apply to.

    I hope that makes sense

  5. #5
    Join Date
    Jul 2010
    Location
    Velsen-Zuid
    Posts
    33
    Plugin Contributions
    2

    Default Re: Can I add a line of text to all products at once?

    Editing Product_info_display will show your changes on any product in your cart :-)

    If you want to add bulk HTML to more or most products Try Easypopulate CSV.

    That way you can use Excel to add the HTML to the various product descriptions to selected products in Excel (product)rows.

    Remember to Back-up your Dbase before making changes to it whatsoever!


  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Can I add a line of text to all products at once?

    Quote Originally Posted by jcrewe View Post
    I know my original post stated that I wanted to apply it to all of the products but I was thinking that there would be a way to actually add to the product description in bulk and then just remove the newly added text individually from the few products it doesnt apply to as removing the newly added text from the few products it doesnt apply to would be a lot quicker than adding to all the products it does apply to.

    I hope that makes sense
    Question. Exactly is it what you want to change? If it is the products *pages* then Digiwinkels solution is what you need.

    If you wish to change the products *descriptions* then you'll need the SQL solution to change the descriptions in the database.

    Cheers
    Rod

  7. #7
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Can I add a line of text to all products at once?

    Maybe check the Free Addons for the Boilerplate mod. I haven't used it but it might do what you want.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Can I add a line of text to all products at once?

    Actually, there is not a boilerplate mod in Free Addons yet. You can use swguy's boilerplate tips given on his website, or the Extra Boilerplate mod currently posted in How to Add Content Below category listings?

    These do require there to be an HTML comment in the description as a hook to replace or key in the new text.

  9. #9
    Join Date
    Feb 2009
    Posts
    81
    Plugin Contributions
    0

    Default Re: Can I add a line of text to all products at once?

    Quote Originally Posted by RodG View Post

    If you wish to change the products *descriptions* then you'll need the SQL solution to change the descriptions in the database.

    Cheers
    Rod
    THE SQL says
    Code:
    SELECT * FROM `products_description` WHERE 1
    so if I want to remove a few lines from the description what do I change and where?

 

 

Similar Threads

  1. v151 Add text to top of new products/all products page
    By doooomed in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Jun 2014, 01:41 PM
  2. Replies: 0
    Last Post: 17 Oct 2013, 04:32 PM
  3. Replies: 0
    Last Post: 27 Oct 2011, 11:38 PM
  4. Can I add a line of text on the invoice
    By Shadow in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 10 May 2007, 03:00 PM
  5. Add text to All Products Page
    By pinixdesign in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Apr 2007, 10:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR