This is a discussion on Setting TAX CLASS to TAXABLE ITEM (ON ALL PRODUCTS) within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Is there any fast way to set the tax class of all my products to TAXABLE ITEM? i have got ...
| |||||||
| Register | FAQ | Donate | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Is there any fast way to set the tax class of all my products to TAXABLE ITEM? i have got over 10000 products but all have the tax class to non, any quick solution? Best Regards, Francis Doody |
|
#2
| ||||
| ||||
| 3 options: SQL statement. Export/Import. Change/edit the non tax class to be a tax class. Last one would be easiest.
__________________ JPF - osCMax Fourm Moderator - To contact, post on the forum or click here Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#3
| |||
| |||
| thank you for your reply! can you guide me to make the non tax to be classed? Regards, Francis Doody |
|
#4
| ||||
| ||||
| In admin - Tax classes..... change name then setup taxes for that class.
__________________ JPF - osCMax Fourm Moderator - To contact, post on the forum or click here Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#5
| |||
| |||
| thank you for your sopport, all item are set to: none. there is 2 class: non taxable taxable on the products there is 3: --none-- non taxable taxable whatever i do, makes no diference :X any solution? |
|
#6
| ||||
| ||||
| Before you do ANYTHING - BACKUP your database..... 1 - Modify ONE product with the proper tax class. 2 - Then export just the table "products" in phpmyadmin as a "SQL" file. You will get SOMETHING like: Code: ...
CREATE TABLE "products" (
"products_id" int(11) NOT NULL,
"products_quantity" int(4) NOT NULL,
"products_model" varchar(12) default NULL,
"products_image" varchar(64) default NULL,
"products_price" decimal(15,4) NOT NULL,
"products_date_added" datetime NOT NULL,
"products_last_modified" datetime default NULL,
"products_date_available" datetime default NULL,
"products_weight" decimal(5,2) NOT NULL,
"products_status" tinyint(1) NOT NULL,
"products_tax_class_id" int(11) NOT NULL,
"manufacturers_id" int(11) default NULL,
"products_ordered" int(11) NOT NULL default '0',
"products_ship_price" decimal(15,4) NOT NULL default '0.0000',
"products_length" decimal(6,2) NOT NULL default '12.00',
"products_width" decimal(6,2) NOT NULL default '12.00',
"products_height" decimal(6,2) NOT NULL default '12.00',
"products_ready_to_ship" int(1) NOT NULL default '0',
PRIMARY KEY ("products_id"),
KEY "idx_products_date_added" ("products_date_added")
) AUTO_INCREMENT=31 ;
...
INSERT INTO `products` VALUES
(3, 32, 'MG200MMS', 'matrox/mg200mms.gif', 299.9900, '2003-11-23 19:49:08', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 1, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(4, 22, 'MG400-32MB', 'matrox/mg400-32mb.gif', 499.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 1, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(5, 2, 'MSIMPRO', 'ap_ups1000.gif', 49.9900, '2003-11-23 19:49:09', '2008-10-12 17:21:14', NULL, 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(6, 13, 'DVD-RPMK', 'dvd/replacement_killers.gif', 42.0000, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 3, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(7, 17, 'DVD-BLDRNDC', 'dvd/blade_runner.gif', 35.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(8, 10, 'DVD-MATR', 'dvd/the_matrix.gif', 39.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(9, 10, 'DVD-YGEM', 'dvd/youve_got_mail.gif', 34.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(10, 10, 'DVD-ABUG', 'dvd/a_bugs_life.gif', 35.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0),
(11, 10, 'DVD-UNSG', 'dvd/under_siege.gif', 29.9900, '2003-11-23 19:49:10', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0);
4 - Here comes the work.... copy all the "VALUES" into a NEW file - save it as say IMPORT.CSV (this extension is important). 5 - replace all "^P(" with "^P" and all "),^P" with "^P" - (without the "") ALSO remove on the FIRST line the "(" at the beginning and on the LAST line at the end remove the ");" ie change from: Code: (3, 32, 'MG200MMS', 'matrox/mg200mms.gif', 299.9900, '2003-11-23 19:49:08', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 1, 0, 0.0000, 12.00, 12.00, 12.00, 0), (4, 22, 'MG400-32MB', 'matrox/mg400-32mb.gif', 499.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 1, 0, 0.0000, 12.00, 12.00, 12.00, 0), (5, 2, 'MSIMPRO', 'ap_ups1000.gif', 49.9900, '2003-11-23 19:49:09', '2008-10-12 17:21:14', NULL, 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0), (6, 13, 'DVD-RPMK', 'dvd/replacement_killers.gif', 42.0000, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 3, 0, 0.0000, 12.00, 12.00, 12.00, 0), (7, 17, 'DVD-BLDRNDC', 'dvd/blade_runner.gif', 35.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0), (8, 10, 'DVD-MATR', 'dvd/the_matrix.gif', 39.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0), (9, 10, 'DVD-YGEM', 'dvd/youve_got_mail.gif', 34.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0), (10, 10, 'DVD-ABUG', 'dvd/a_bugs_life.gif', 35.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0), (11, 10, 'DVD-UNSG', 'dvd/under_siege.gif', 29.9900, '2003-11-23 19:49:10', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0); Code: 3, 32, 'MG200MMS', 'matrox/mg200mms.gif', 299.9900, '2003-11-23 19:49:08', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 1, 0, 0.0000, 12.00, 12.00, 12.00, 0 4, 22, 'MG400-32MB', 'matrox/mg400-32mb.gif', 499.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 1, 0, 0.0000, 12.00, 12.00, 12.00, 0 5, 2, 'MSIMPRO', 'ap_ups1000.gif', 49.9900, '2003-11-23 19:49:09', '2008-10-12 17:21:14', NULL, 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0 6, 13, 'DVD-RPMK', 'dvd/replacement_killers.gif', 42.0000, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 23.00, 1, 1, 3, 0, 0.0000, 12.00, 12.00, 12.00, 0 7, 17, 'DVD-BLDRNDC', 'dvd/blade_runner.gif', 35.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0 8, 10, 'DVD-MATR', 'dvd/the_matrix.gif', 39.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0 9, 10, 'DVD-YGEM', 'dvd/youve_got_mail.gif', 34.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0 10, 10, 'DVD-ABUG', 'dvd/a_bugs_life.gif', 35.9900, '2003-11-23 19:49:09', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0 11, 10, 'DVD-UNSG', 'dvd/under_siege.gif', 29.9900, '2003-11-23 19:49:10', '2008-10-01 16:55:23', '0000-00-00 00:00:00', 7.00, 1, 1, 2, 0, 0.0000, 12.00, 12.00, 12.00, 0 7 - IMPORT the CSV file into Excel or a spreadsheet as a CSV - Comma Separated Values file. 8 - 11 column or "K" should be the "products_tax_class_id" for each item. Search for the item you changed in step 1. Copy that value in "K" to all items. 9 - Save the CSV file. 10 - OPEN the CSV in the text editor again. 11 - replace all "^P" with "^P(" and all "^P" with "),^P" (without the "") - remove and single lines with JUST ( or ) on it. ALSO the FIRST line add a "(" at the beginning and on the LAST line change (or add) the end from ")," to ");" IE reversing everything from step 5. 12 - COPY all values over top of the "VALUES" in your original SQL export file. 13 - Save the SQL file as a new file ie: "updated.sql". 14 - Import the SQL file into phpmyadmin. Done. OR ......... SQL the change...... In phpmyadmin - Run SQL query UPDATE 'name of-your-database'.'products' SET 'products_tax_class_id' = '2' Where "2" is the Proper tax class id.... Good Luck!
__________________ JPF - osCMax Fourm Moderator - To contact, post on the forum or click here Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
| The Following User Says Thank You to jpf For This Useful Post: | ||
michael_s (10-13-2008) | ||
|
#7
| |||
| |||
| Thank you Thank You... the second method did it for me. and thats what i was looking for, a sql command to update the products. did i say thank you? THANKS! |
|
#8
| ||||
| ||||
| Quote:
and your WELCOME!...
__________________ JPF - osCMax Fourm Moderator - To contact, post on the forum or click here Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Products On Index Page On/Off Setting | michael_s | New osCommerce Contributions | 0 | 06-30-2008 09:30 AM |
| Taxable item: Net price & tax issues | brownjungle | osCMax v2 Features Discussion | 1 | 10-08-2006 09:41 PM |
| Changing default TAX class when adding new products | fuzzyphil | osCMax v1.7 General Mods Discussion | 0 | 07-28-2005 10:42 PM |
| Setting Sort Order for Products? | sheikyerbouti | osCommerce 2.2 Installation Help | 6 | 11-12-2003 10:25 PM |
| Please help! (setting tax rate for products) | sheikyerbouti | osCommerce 2.2 Modification Help | 4 | 10-22-2002 04:32 PM |