Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2011
    Posts
    2
    Plugin Contributions
    0

    Default Add a certain percentage to the price of all products with certain keyword in title

    Hello,
    I am willfully hoping that there is a way to do this as I cannot go and edit more than 500 products one by one.

    I have a certain product brand that is prevalant in almost every category of my shop. What I am trying to do is to add 20% to the price of every product in my Zen Cart store that has the name "Orian" in the title or the description.
    When I go to "products" and type in "Orion" in the search box on the right all the products that I am trying to add 20% to the price do show up, but I do not know how to add 20% to the price of only these items.

    Any help is greatly appreciated, thank you very much.

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

    Default Re: Add a certain percentage to the price of all products with certain keyword in tit

    You would have to modify the price field in the database for the desired products, with a "where" clause that specifies 'Orian' is in the product name field or the product description field. This is not something to do on a live database unless you are very comfortable with MySQL. Perhaps Ajeh can give the exact statement to use.

  3. #3
    Join Date
    Jul 2011
    Posts
    2
    Plugin Contributions
    0

    Default Re: Add a certain percentage to the price of all products with certain keyword in tit

    Ajeh?
    Whoever, whatever, it is, could it, or he, or she, please help.
    Thanks.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Add a certain percentage to the price of all products with certain keyword in tit

    If you needed to do this for Products that had the word 'test' in the products_name or products_description and increase the products_price by 10% you could use:

    In phpMyAdmin ...

    SELECT to see what Products will be affected by the UPDATE:
    Code:
    select p.products_id, p.products_price, pd.products_name, pd.products_description from products p, products_description pd
    where 
    p.products_id = pd.products_id 
    and (products_name LIKE '%test%'
    or products_description LIKE '%test%');
    UPDATE to make the changes and raise the products.products_price to 110% of the existing price:
    Code:
    UPDATE products, products_description SET products_price = products_price * 1.10
    WHERE products.products_id = products_description.products_id
    AND (
    products_description.products_name LIKE '%test%'
    OR products_description.products_description LIKE '%test%'
    );
    The, you want to run from your Zen Cart Admin the Tools ... Store Manager ... Update Product Price Sorter ...

    You can adapt that code to any word or price change that you want ...

    NOTE: be sure to backup your database before attempting this ...

    NOTE: this assumes you do not use any Products with Priced by Attribute or that you do not care about those Products ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v151 Not allowing certain states with certain products or categories of products
    By purelypoultry in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 27 Dec 2012, 03:46 PM
  2. Removing the Add to cart button from certain products
    By rwhporg in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 14 Dec 2010, 12:20 AM
  3. All my prices have gone up by a certain percentage?!
    By nonfinite in forum General Questions
    Replies: 0
    Last Post: 24 Feb 2010, 10:02 PM
  4. Certain shipping price for a certain category
    By navido in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Jul 2009, 04:04 AM
  5. Replies: 0
    Last Post: 6 Mar 2008, 05:38 AM

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