How to run a SQL command to update some opencart products to non taxable items? -


i have 4000 products in opencart 1.5.5.1 store, products set "taxable" items. have 500 of these products in fact "none taxable" products.

i able run sql command update 500 products using phpmyadmin change 500 products. need have set none under tax class in products.

does know how complete such task using sql commend?

here part of products db file. 1 of 2 products manually changed in opencarts admin area on 2 products - made tax class none:

insert `oc_product` (`product_id`, `model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `quantity`, `stock_status_id`, `image`, `manufacturer_id`, `shipping`, `price`, `points`, `tax_class_id`, `date_available`, `weight`, `weight_class_id`, `length`, `width`, `height`, `length_class_id`, `subtract`, `minimum`, `sort_order`, `status`, `date_added`, `date_modified`, `viewed`, `call_for_price`, `custom_message`, `youtubevideo`) values (1, 'aaj - 101', 'aaj - 101', 'aaj - 101', '', '', '', '', '', 0, 5, 'data/products/americolor/americolor-black-soft-gel-paste-.75oz.jpg', 1, 1, '0.0000', 0, 0, '2013-01-09', '0.00000000', 1, '0.00000000', '0.00000000', '0.00000000', 1, 1, 0, 1, 1, '2013-01-09 22:25:59', '2013-05-13 02:01:06', 10, 0, '', ''), (2, 'aaj - 102', 'aaj - 102', 'aaj - 102', '', '', '', '', '', 0, 5, 'data/products/americolor/americolor-royal-blue-soft-gel-paste-0.75oz.jpg', 1, 1, '0.0000', 0, 0, '2013-01-09', '0.00000000', 1, '0.00000000', '0.00000000', '0.00000000', 1, 1, 0, 1, 1, '2013-01-09 22:25:59', '2013-05-13 02:01:06', 4, 0, '', ''), 

this 2 of them tax assigned to:

(11, 'aaj - 111', 'aaj - 111', 'aaj - 111', '', '', '', '', '', 0, 5, 'data/products/americolor/americolor-leaf-green-soft-gel-paste-.75oz.jpg', 1, 1, '0.0000', 0, 9, '2013-01-09', '0.00000000', 1, '0.00000000', '0.00000000', '0.00000000', 1, 1, 0, 1, 1, '2013-01-09 22:25:59', '2013-05-13 02:01:06', 6, 0, '', null), (12, 'aaj - 112', 'aaj - 112', 'aaj - 112', '', '', '', '', '', 0, 5, 'data/products/americolor/americolor-mint-green-soft-gel-paste-.75oz.jpg', 1, 1, '0.0000', 0, 9, '2013-01-09', '0.00000000', 1, '0.00000000', '0.00000000', '0.00000000', 1, 1, 0, 1, 1, '2013-01-09 22:25:59', '2013-05-13 02:01:06', 6, 0, '', null) 

if not know rule or @ least ids of these products, cannot achieve sql query.

if have ids, though, execute sql query:

update product set tax_class_id = 0 product_id in (<coma_separated_product_ids_to_be_updated>); 

if know other rule applies, do:

update product set tax_class_id = 0 <your_rule(s)_comes_here>; 

nothing more advised...


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -