jaimescott Posted February 6, 2009 Share Posted February 6, 2009 I hope someone here can help me - I may be missing something obvious, but I have been unable to find a mod that does exactly what I need and I'm not quite clear on how to effect the change myself. I am implementing my first osCommerce site, and the store is based in CT. I have been told the rules for shipping in CT are that shipping is taxable in CT if there is an individual item greater than $50, but not if the items total is greater than $50 but none of the items are greater than $50. For a first pass I added the following code to my version of table.php for table shipping: //CT SHIPPING TAX CONSIDERATION $delivery_state = $order->delivery['state']; $ctShippingTaxApplies = false; //if state is CT if ($delivery_state == "CT" || $delivery_state == "Ct" || $delivery_state == "ct" || $delivery_state == "Connecticut" || $delivery_state == "connecticut" ) { $products = $order->products; for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { if ($order->products[$i]['final_price']>=50.00) { $shipping = $shipping * 1.06; //apply CT TAX $ctShippingTaxApplies = true; break; } } } //CT SHIPPING TAX CONSIDERATION END its a bit hackish I know - but I'm just feeling my way through this - it checks to see if state is CT - if it is it increases the shipping by the tax amount. Now I know shipping modules have a flag to allow taxation on the shipping - and I only have 1 tax zone for CT - so I would prefer to set the shipping to taxable, but where to I add the code to check to only tax shipping if a product item costs greater than $50? Any help you can provide will be most appreciated - its defiantely been a learning experiance brushing up on my PHP and learning how osCommerce work. jaime scott Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.