Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    123
    Plugin Contributions
    0

    Default Bulk update of prices needed - which table to update thru back end?

    I tried to query my DBs _products table but product_price did not make much sense - there was for example only 1 product with $2.99 but I know for certain that I have tons of such.

    Thank you!
    My install: was Vanilla 1.3.9h, now 1.5.5b, Apache 2.4, PHP 7.0.6, MySQL 5.5.8 64b, Windows 7 64b, 8GB RAM, i3 3.3gHz
    Modules: [Payment=Paypal] [Shipping=Canada Post 1.5.3 merged] [nonCAPTCHA]

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Bulk update of prices needed - which table to update thru back end?

    have you tried ezpopulate or apsona from the plugins

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Bulk update of prices needed - which table to update thru back end?

    You can use SQL queries via INSTALL SQL PATCHES under tools...

    BUT...

    You must be careful !

    There is no "fallback" when using SQL (which is why a DB backup is advised before you install "patches").

    It requires a good understanding of SQL - but once you get your head round it, it is quite a useful "tool".

    For example, if you wanted to CHANGE all products where the price is 2.99 , to 3.99 ...

    ... the following SQL will do it:

    UPDATE `products` SET `products_price` = 3.99 WHERE `products_price` = 2.99;

    Other CONDITIONALS can apply...

    UPDATE `products` SET `products_price` = 3.99 WHERE `products_id` = 555; (will change product with ID 555)

    It helps to know FIELD NAMES and TYPES in the applicable TABLES, and for "products", these are:

    products_id int(11) NOT NULL auto_increment,
    products_type int(11) NOT NULL default '1',
    products_quantity float NOT NULL default '0',
    products_model varchar(32) default NULL,
    products_image varchar(64) default NULL,
    products_price decimal(15,4) NOT NULL default '0.0000',
    products_virtual tinyint(1) NOT NULL default '0',
    products_date_added datetime NOT NULL default '0001-01-01 00:00:00',
    products_last_modified datetime default NULL,
    products_date_available datetime default NULL,
    products_weight float NOT NULL default '0',
    products_status tinyint(1) NOT NULL default '0',
    products_tax_class_id int(11) NOT NULL default '0',
    manufacturers_id int(11) default NULL,
    products_ordered float NOT NULL default '0',
    products_quantity_order_min float NOT NULL default '1',
    products_quantity_order_units float NOT NULL default '1',
    products_priced_by_attribute tinyint(1) NOT NULL default '0',
    product_is_free tinyint(1) NOT NULL default '0',
    product_is_call tinyint(1) NOT NULL default '0',
    products_quantity_mixed tinyint(1) NOT NULL default '0',
    product_is_always_free_shipping tinyint(1) NOT NULL default '0',
    products_qty_box_status tinyint(1) NOT NULL default '1',
    products_quantity_order_max float NOT NULL default '0',
    products_sort_order int(11) NOT NULL default '0',
    products_discount_type tinyint(1) NOT NULL default '0',
    products_discount_type_from tinyint(1) NOT NULL default '0',
    products_price_sorter decimal(15,4) NOT NULL default '0.0000',
    master_categories_id int(11) NOT NULL default '0',
    products_mixed_discount_quantity tinyint(1) NOT NULL default '1',
    metatags_title_status tinyint(1) NOT NULL default '0',
    metatags_products_name_status tinyint(1) NOT NULL default '0',
    metatags_model_status tinyint(1) NOT NULL default '0',
    metatags_price_status tinyint(1) NOT NULL default '0',
    metatags_title_tagline_status tinyint(1) NOT NULL default '0',

    As I say... SQL commands/queries are totally UNFORGIVING... get it wrong and you can do serious damage to the DB.

    Always backup before running sql.
    20 years a Zencart User

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

    Default Re: Bulk update of prices needed - which table to update thru back end?

    If you do a global change on the products_price like this, it is a good idea to go to the Tools ... Store Manager ... and run:
    Update ALL Products Price Sorter
    to be able to sort by displayed prices:
    as manually changing the prices is skipping a step in updating the field products_price_sorter ...
    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!

  5. #5
    Join Date
    Feb 2009
    Posts
    123
    Plugin Contributions
    0

    Default Re: Bulk update of prices needed - which table to update thru back end?

    Figured I was looking at a wrong DB on a wrong server, problem solved, thanks everyone!
    My install: was Vanilla 1.3.9h, now 1.5.5b, Apache 2.4, PHP 7.0.6, MySQL 5.5.8 64b, Windows 7 64b, 8GB RAM, i3 3.3gHz
    Modules: [Payment=Paypal] [Shipping=Canada Post 1.5.3 merged] [nonCAPTCHA]

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

    Default Re: Bulk update of prices needed - which table to update thru back end?

    I want to change all prices from $22 to $25 I am using this
    UPDATE products SET products_price = 25 WHERE products_price = 22; ,

    but prices are not changing.... umm any idea?

 

 

Similar Threads

  1. Bulk Update Attribute Prices
    By RicM in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 14 Dec 2011, 12:14 AM
  2. SQL code needed to update products table
    By ewramos in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 22 Feb 2011, 05:30 PM
  3. back in stock notification - buttons 'back' and 'update' not working
    By flix in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Mar 2010, 10:02 PM
  4. SQl Command to update all prices in bulk
    By ksmglobal in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 3 Apr 2008, 03:34 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