Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  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
    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

    Thanks again Rod. The only way the cards can be properly group priced is by each card line or range by itself i.e. all of Abacus or all of Kaleidacards, not by occasion. There are Age Birthday or Anniversary Specific cards in many of the ranges, all with different prices so it wouldn't work to price them by using the Manufacturer ID based on Occasion, although that sounds brilliant. (It would have been by sheer luck by the way.)

    So if I am going to do it by the category_id, would I look for that code in the SQL query box in phpMyadmin, OR the SQL install patches section of my zencart admin (under 'tools'). Is that in the part of ZC that is sitting on my web hosts website? Is it in the categories.php section or am I barking up the wrong tree again?

    I don't know what a SQL query box is or where to find it. I went onto my webhosts site and looked at the files that are there. Found categories.php, downloaded it, used Notepad++ to look for 'master_categories_id' but it wasn't there. Sorry to have to ask you what is probably a very simple search but just don't know where to look. So many files in so many places.

    Speaking of "manufacturers", if you noticed on my site, about 3-4 levels in that it still says "Manufacturer" beside where is also says "Product Image", can you tell me where to change that one to Occasion? It also needs changing one more level in where it reads "Manufactured by" beside the card image where you can click to make it larger. I opened manufacturers.php but couldn't find it any of the php files. Looked it up in the Developers Toolkit, found a reference to Manufactured by several levels down in ZC admin, downloaded it, backed it up, changed the text to "Occasion", put it back in the Admin where I got it and nothing changed on my site. Not in the place where I wanted it to change anyway.

    I only tell you all that to let you know I'm not just asking you without trying to do it myself first. Sorry for the long winded questions. I have so many of them but after spending many hours looking for the answers, I end up going back to working on the content of the site and give up for awhile, trying to change the look of it. Take care.

  8. #8
    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
    So if I am going to do it by the category_id, would I look for that code in the SQL query box in phpMyadmin, OR the SQL install patches section of my zencart admin (under 'tools').
    You'll be best doing this with phpMyAdmin.
    Not the SQL query box though - this is only needed when entering SQL commands. Just use the table browsing feature.

    Alas, I suspect that this is going to cause you some major headaches, because as previously mentioned, you'll be needing to develop some rather complex SQL commands to link the category_id's back to the individual product_id's. Someone skilled with SQL should be able to come up with suitable commands for your *specific* needs in an hour or so, and not wishing to appear rude, but trying to learn how to do this yourself is probably going to take longer than your original idea of modifyting the products one at a time.

    Now having said that, rather than using zencart to do this one at a time modification you'll still be better of using myPhpAdmin ... the 'zen_products' table (which contains all the product prices) also contains a field for the product images... if *you* can identify you products by the image names you'll be able to select all products dispalyed on the screen and simply scroll through and updating the prices as required ... This will probably reduce the time it'll take you by a factor of 10 on account of the fact that you won't need to go through the load/edit/preview/save process that zencart will require you to do.

    It is worth taking a look into this possibilty before you place it into the "Too hard, I don't know what I'm doing basket"
    You may be pleasantly surprised at how easy it can be.

    Quote Originally Posted by actionjackson57 View Post
    Is that in the part of ZC that is sitting on my web hosts website? Is it in the categories.php section or am I barking up the wrong tree again?
    All of zencart is sitting on your webhosts website.
    If you meant to ask "is this the zencart web files, or is it the zencart database" the answer is the database.

    Quote Originally Posted by actionjackson57 View Post
    I don't know what a SQL query box is or where to find it.
    This is now a moot point.


    Quote Originally Posted by actionjackson57 View Post
    I went onto my webhosts site and looked at the files that are there. Found categories.php, downloaded it, used Notepad++ to look for 'master_categories_id' but it wasn't there. Sorry to have to ask you what is probably a very simple search but just don't know where to look. So many files in so many places.
    You won't be looking for a 'file', you need to be looking for a database administration tool - which will almost certainly be myPhpAdmin. (There are many other similar tools, but this is the most common, by far).

    If your ISP has given you cPanel for administration purposes it'll be located in the section called 'databases'

    Even if you have never used this tool before I urge you to take a look. It may appear a little complex at first, but after a short time playing around and looking at the various options you should start to make a bit of sense of it all.. it isn't as complicated as it first appears.
    Furthermore, it will give you plenty of warning if you are about to do something 'bad', so it is generally quite safe to mess around with. Just use a bit of common sense. :-)

    Quote Originally Posted by actionjackson57 View Post
    Speaking of "manufacturers", if you noticed on my site, about 3-4 levels in that it still says "Manufacturer" beside where is also says "Product Image", can you tell me where to change that one to Occasion?
    I noticed that you asked this in another thread. I have already replied there, so I won't repeat it here.


    Quote Originally Posted by actionjackson57 View Post
    Looked it up in the Developers Toolkit, found a reference to Manufactured by several levels down in ZC admin,
    The developers toolkit will only identify which file(s) you need to update/change ... in your case there are about half a dozen of them. You need to download/change these individual files and re-upload them again. I suggest you do them one at a time so that you don't get similar named files in different locations confused with each other.

    Also, although many people will disagree with me (often with good reason) I have noted that the TEXT editor installed with the later versions of cPanel seems to be pretty reliable and doesn't add extra blank lines to the ends of the file (like the earlier versions did), so you may be able to make these changes withing cPanel itself without the need to download/edit/upload.

    Quote Originally Posted by actionjackson57 View Post
    downloaded it, backed it up, changed the text to "Occasion", put it back in the Admin where I got it and nothing changed on my site. Not in the place where I wanted it to change anyway.
    You'll find that the change you made will show itself when you are logged into the /admin/ part of your site doing edits, etc.

    What the 'public' sees will be in the files NOT located under /admin/ but under the /includes/ (not to be confused with /admin/includes)

    Quote Originally Posted by actionjackson57 View Post
    I only tell you all that to let you know I'm not just asking you without trying to do it myself first. Sorry for the long winded questions. I have so many of them but after spending many hours looking for the answers, I end up going back to working on the content of the site and give up for awhile, trying to change the look of it. Take care.
    Although the 'Manufacturers' is also defined in many files that you probably aren't using (eg, records or record companies) there is no reason why you can't replace ALL occurences where you find it. In fact it is probably better if you did, 'cos there is nothing worse than having the original definition pop up on a page that you didn't consider changing initially.

    Cheers
    Rod

  9. #9
    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

    Thanks very much Rod, I need to look at your full reply when I can see the screen with a more clear mind. You sure put a lot of work in to your answers. I can hardly believe how well you must know this product. I will read this again in the morning and see if I can expand my tolerance for potential pain.... LOL. All the best.
    George

  10. #10
    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
    I can hardly believe how well you must know this product.
    Actually, I only really know a tiny fraction of the zencart project. The only area where I'm truely skilled is with the Aussie Post shipping module(s).

    My knowledge of SQL comes about from working on many other database projects and simply transferring that knowledge across to zencart.

    SQL commands are 'universal', it is only the 'details' that change.

    Cheers
    Rod

 

 
Page 1 of 2 12 LastLast

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