Community Add-Ons
| Maintainers: | chrish123 |
Newproduct Taxclass Dropdownbox Hack
for osCommerce Online Merchant v2.2
This hack speeds up the process of adding products by eliminating the need to keep switching from "--None--" to "Taxable Goods" with every product added.
This is useful if you like me and only have 1 tax class.
Step 1.) Simply open catalog/admin/categories and find around line 444 (I have a modified store) :
}
$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
while ($tax_class = tep_db_fetch_array($tax_class_query)) {
$tax_class_array[] = array('id' => $tax_class['tax_class_id'],
'text' => $tax_class['tax_class_title']);
}
Step 2.) Replace with:
}
//TAX BOX HACK - modified for the default TAX rate, to save having to use the dropdown box!
//$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class_array = array(array('id' => '1', 'text' => 'Taxable Goods'));
//EOF TAX BOX HACK - modified for the defualt TAX rate, to save having to use the dropdown box!
$tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
while ($tax_class = tep_db_fetch_array($tax_class_query)) {
$tax_class_array[] = array('id' => $tax_class['tax_class_id'],
'text' => $tax_class['tax_class_title']);
}
Thats it!
Just make sure where the id has changed to "1" this is the actual ID you are using!
This hack speeds up the process of adding products by eliminating the need to keep switching from "--None--" to "Taxable Goods" with every product added.
This is useful if you like me and only have 1 tax class.
Step 1.) Simply open catalog/admin/categories and find around line 444 (I have a modified store) :
}
$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
while ($tax_class = tep_db_fetch_array($tax_class_query)) {
$tax_class_array[] = array('id' => $tax_class['tax_class_id'],
'text' => $tax_class['tax_class_title']);
}
Step 2.) Replace with:
}
//TAX BOX HACK - modified for the default TAX rate, to save having to use the dropdown box!
//$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class_array = array(array('id' => '1', 'text' => 'Taxable Goods'));
//EOF TAX BOX HACK - modified for the defualt TAX rate, to save having to use the dropdown box!
$tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title");
while ($tax_class = tep_db_fetch_array($tax_class_query)) {
$tax_class_array[] = array('id' => $tax_class['tax_class_id'],
'text' => $tax_class['tax_class_title']);
}
Thats it!
Just make sure where the id has changed to "1" this is the actual ID you are using!
