Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    102
    Plugin Contributions
    0

    help question Can prices be added globally to a range of products or only one product at a time?

    Is it possible to globally add prices to a range of products which are all the same price or do the prices have to be added one product at a time? I have added a couple thousand products without adding prices as yet. Now I am ready to add prices but cannot find a place or way to add the same price to a range of my products. Any help would be appreciated. Thank you.

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

    Default Re: Can prices be added globally to a range of products or only one product at a time

    Quote Originally Posted by actionjackson57 View Post
    Is it possible to globally add prices to a range of products which are all the same price or do the prices have to be added one product at a time? I have added a couple thousand products without adding prices as yet. Now I am ready to add prices but cannot find a place or way to add the same price to a range of my products. Any help would be appreciated. Thank you.
    The best/easiest way to do this would be via SQL commands. (if experienced)

    The 'difficult' part will be figuring out what query string to use to select any given 'range'.

    Zencart itself has no inbuilt functionality to perform global price changes, however you may find the following module useful.

    http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=101

    Cheers
    Rod

  3. #3
    Join Date
    Nov 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Can prices be added globally to a range of products or only one product at a time

    Quote Originally Posted by RodG View Post
    The best/easiest way to do this would be via SQL commands. (if experienced)

    The 'difficult' part will be figuring out what query string to use to select any given 'range'.

    Zencart itself has no inbuilt functionality to perform global price changes, however you may find the following module useful.

    http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=101

    Cheers
    Rod
    Thanks again Rod. Much appreciated. I am too much of a neophyte to try these fixes. I am doing all 2000 of them, one by one. Take care.
    Geo

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

    Default Re: Can prices be added globally to a range of products or only one product at a time

    Quote Originally Posted by actionjackson57 View Post
    Thanks again Rod. Much appreciated. I am too much of a neophyte to try these fixes. I am doing all 2000 of them, one by one. Take care.
    Geo
    Ouch! Assuming they take you 60 seconds each, that is well over 30hours work that you have ahead of you.

    If I were you I'd be making a copy of my zencart database, and spending a few hours playing around with phpMyAdmin and a few SQL commands

    To help get you going, the following example (entered into phpMyAdmin, or even into the 'install SQL patches' input box of zencart itself) will update all of the products prices to "99.95" on all products that were added to the store on the 3rd Nov 2009".

    Code:
    update `zen_products` set  `products_price` = 99.95 WHERE `products_date_added` like '2009-11-03%'
    As you can see, it really is quite simple ... The "price" is pretty obvious, you can set it to whatever you like, and as I said previously, the 'difficult' part is what you mean when you say a 'range of products'.

    In the example above, the 'range' is "where products_date_added is like 2009-11-03. The "%" is a 'wildcard' that will match all times during this day.

    If you modify the code like thus:

    Code:
    update `zen_products` set  `products_price` = 99.95 WHERE `products_date_added` like '2009-11%'
    The 'range' will be for any product added during any date/time in Nov 2009.

    Yet another example:

    Code:
    update `zen_products` set  `products_price` = 99.95 WHERE `products_model` like 'DVD%'
    Will set a price of $99.95 where the product_model definition starts with "DVD"

    Once you have determined exactly what command(s) you need for your 'range' of products, simply make a copy (of the command), open your original database and paste the command in to the SQL query box.

    Not only will this be quicker than doing it one by one, it'll also give a bit of exposure to SQL commands that I'm sure you'll find useful in the future.

    Cheers
    Rod

  5. #5
    Join Date
    Nov 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Can prices be added globally to a range of products or only one product at a time

    You are a very helpful person, thank you for your time to put up all that info for me. What I mean by a 'range of products' is typically a line of greeting cards within my overall product mix. If you look at my site, www.paperpotamus.com you will see a category named Greeting Cards, within that are several lines of Greeting Cards and within those categories sometimes, there are sub lines of cards. What I was wondering is if there's a way to set and implement a price for a whole line of greeting cards, which are typically the same price within the line such as Abacus or Kaleidacards or Paw Pourri etc. I just priced the whole line of Kaleidacards which was almost 400 designs and took me many hours as you pointed out.

    I'm not sure how or where I would implement the suggestions you have made or if they could be made to work for the categories/ranges of greeting cards such as $2.125 for all Abacus Greeting Cards for example or $2.00 for all notepads etc. From what I've understood from your text, the last suggestion is the most likely one that would work for ranges of cards.

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

    Default Re: Can prices be added globally to a range of products or only one product at a time

    Quote Originally Posted by actionjackson57 View Post
    You are a very helpful person, thank you for your time to put up all that info for me. What I mean by a 'range of products' is typically a line of greeting cards within my overall product mix. If you look at my site, www.paperpotamus.com you will see a category named Greeting Cards, within that are several lines of Greeting Cards and within those categories sometimes, there are sub lines of cards. What I was wondering is if there's a way to set and implement a price for a whole line of greeting cards, which are typically the same price within the line such as Abacus or Kaleidacards or Paw Pourri etc. I just priced the whole line of Kaleidacards which was almost 400 designs and took me many hours as you pointed out.

    I'm not sure how or where I would implement the suggestions you have made or if they could be made to work for the categories/ranges of greeting cards such as $2.125 for all Abacus Greeting Cards for example or $2.00 for all notepads etc. From what I've understood from your text, the last suggestion is the most likely one that would work for ranges of cards.
    I don't know if you did this by design, or whether it is sheer luck, but after taking a quick look at your site I noticed that you appear to have grouped your cards by "manufactuer". (you have apparently relabled this to signify "occasions".

    EG "Birthday age" has manufacturers_id = 4
    " Anniversary" has manufacturers_id=3

    And so forth. It also just so happens that the "manufacturers_id" is defined in the same SQL table as the products pricing ... so I'm going to suggest that this could possibly be the type of 'range' you are looking for.

    If this IS the case then something like:

    Code:
    update `zen_products` set  `products_price` = 9.95 WHERE `manufacturers_id` = 3 ;
    Will update all of the " Anniversary" card prices to 9.95

    Code:
    update `zen_products` set  `products_price` = 3.95 WHERE `manufacturers_id` = 4 ;
    Will update all of the "Birthday age" card prices to 3.95

    The reason why this is 'good luck' is because you can easily identify the "manufactures_id" by looking at the address bar in your web browser when viewing these 'occasions'.

    If your items were only grouped by category (or, if you indeed wish to range by 'category') things are a little more difficult because you'll need to identify the "category_id" by looking up the category NAME in the categories_description table, and then using the following code:

    Code:
     update `zen_products` set  `products_price` = 3.95 WHERE `master_categories_id` = x ;
    And if you need to make changes on the subcategories only it gets even more complex in that you'll probably need to use table joins to link the categories id back to specific product id's.

    Anyway, here's hoping that using the manufacturers_id is going to be the one to satisfy your needs.

    FWIW, even if you use these methods to set a 'typical' or an 'average' price for ALL cards, it will leave you in a far better position than having no cost on them at all. It'll give you more time to do individual adjustments where required.

    Cheers
    Rod


    PS. You can enter this codes into the SQL query box in phpMyadmin, OR the SQL install patches section of your zencart admin (under 'tools').

    pss. Making a backup of your database before running SQL commands is *highly* recommended.

  7. #7
    Join Date
    Feb 2010
    Posts
    2
    Plugin Contributions
    0

    Default Re: Can prices be added globally to a range of products or only one product at a time

    Quote Originally Posted by RodG View Post
    The best/easiest way to do this would be via SQL commands. (if experienced)

    The 'difficult' part will be figuring out what query string to use to select any given 'range'.

    Zencart itself has no inbuilt functionality to perform global price changes, however you may find the following module useful.

    http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=101

    Cheers
    Rod
    Hi Rod,
    I would like to change some prices for just one manufacturer and have installed that quick updates patch, but I don't seem to see anything diferent. Where am i going wrong? Being able to globally change prices for a supplier would be very handy.
    Thanks,
    Andrew

  8. #8
    Join Date
    May 2010
    Location
    Whitchurch, Hampshire, UK
    Posts
    71
    Plugin Contributions
    0

    cart error Re: Can prices be added globally to a range of products or only one product at a time

    Hi Rod,

    I was reffered to this thread from one I posted just now. Here's what I wrote:

    I want to increase a lot of my prices by £1, but am loathe to go to every single one and add £1 to each price.
    Also, I only want to increase the price of products that are currently below £6.

    I can imagine there's an easy bit of SQL code to use, but I'm not to familiar with it myself.
    So, I just need to work out what SQL I need to run in order to do this.
    Would something like this work?

    Code:
    update `zen_products` increase  `products_price` + 1.00 WHERE `products_price` < 6.00
    Not entirely sure that's correct, but that's just using my newly found (albeit vague) knowledge of programming (currently in the process of Python for a different project)

    Any help would be appreciated

    Cheers
    The iShop: Make it Yours

    Apple, BlackBerry, HTC, Samsung and Audio Accessories www.the-ishop.co.uk

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

    Default Re: Can prices be added globally to a range of products or only one product at a time

    Quote Originally Posted by caesartrading View Post
    So, I just need to work out what SQL I need to run in order to do this.
    Would something like this work?

    Code:
    update `zen_products` increase  `products_price` + 1.00 WHERE `products_price` < 6.00
    Not entirely sure that's correct, but that's just using my newly found (albeit vague) knowledge of programming (currently in the process of Python for a different project)
    For PHP it is more like:
    Code:
    update `zen_products` set  `products_price` = `products_price` + 1.00 WHERE `products_price` < 6.00 ;
    WARNING: This is just off the top of my head. Don't be too surprised if its not correct. I can never remember when/where quotes are needed or whether they need to be single or double.

    Cheers
    Rod
    Last edited by RodG; 8 Aug 2011 at 03:36 PM.

 

 

Similar Threads

  1. v150 single product (only one of) can be added to cart multiple times
    By gandalfsmith in forum Bug Reports
    Replies: 4
    Last Post: 6 Mar 2013, 11:55 PM
  2. Replies: 2
    Last Post: 16 Jan 2013, 05:07 AM
  3. Globally Changing prices of products.
    By Traceygirl in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 26 May 2011, 03:31 PM
  4. How Can I change All products prices in one time ?
    By darknes in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 29 Nov 2008, 01:59 PM
  5. Changing price range to time range (in Advanced Search)
    By jeffmic in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2006, 07:12 PM

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