Guest Viola Posted February 14, 2012 Share Posted February 14, 2012 I've noticed a problem with the way Cubecart displays taxes, and it appears to still be happening in 5.0.7. This is for stores with tax-inclusive prices. I think what happens is that Cubecart tries to display individual lines of tax for products and shipping, and also for each tax type. But what happens is that for products it only displays the tax for 1 item - a problem for orders with 2 or more different items. Luckily Cubecart also records the total tax, and I've got around the problem by getting it to display that instead. But as I haven't seen any threads about this recently, I'm wondering if anyone else has noticed this, or if I just have a setting wrong somewhere. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 15, 2012 Share Posted February 15, 2012 I've had a support ticket in about strange display of Sales Tax on the Order Summary and emails for some time. A few times Al has been able to get it to work correctly for us, but then in a few days it's no longer working properly. I have reported that there is something incorrect in the database on the State column in _addressbook. Some show the state written out, and some show a number. But I haven't heard back yet. What does your addressbook show for State? Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted February 15, 2012 Share Posted February 15, 2012 What does your addressbook show for State? Numbers. But for stores upgraded from v3 (not sure about v4, haven't tried) the state for addresses that were entered before the upgrade will be written out. Possibly that's just how they were recorded in v3. This sometimes throws off shipping, but I don't think it affects taxes, at least not in my case. Far as I can tell, if the customer's state is included in the States and Zones that are set up on your store, they will be able to select the state from a drop-down and it will be recorded as a number. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted February 15, 2012 Share Posted February 15, 2012 This store is an upgrade from 3 to 4 to 5. I have recent test orders, some with numbers and some with words. During those times Al has been able to get our Sales Tax to show correctly, multiple item orders worked correctly, too. When Sales Tax only works for the total cost, multiple items don't show correctly either. Quote Link to comment Share on other sites More sharing options...
Guest Viola Posted February 15, 2012 Share Posted February 15, 2012 So in case it helps anyone, these are the modifications I made to get the total tax to display: /admin/skins/default/templates/orders.index.php find on line 153 {if isset($TAX_SUMMARY)} {foreach from=$TAX_SUMMARY item=tax} <div>{$tax.tax_name}:<span>{$tax.tax_amount}</span></div> {/foreach} {/if} <!--<div>{$LANG.basket.total_tax}:<span>{$OVERVIEW_SUMMARY.total_tax}</span></div>--> change to <!-- modification: total tax --> <!--{if isset($TAX_SUMMARY)} {foreach from=$TAX_SUMMARY item=tax} <div>{$tax.tax_name}:<span>{$tax.tax_amount}</span></div> {/foreach} {/if}--> <div>{$LANG.basket.total_tax}:<span>{$OVERVIEW_SUMMARY.total_tax}</span></div> /admin/skins/default/templates/orders.print.php find on line 51 {if isset($order.taxes)} {foreach from=$order.taxes item=tax} <div class="total">{$tax.name} <strong>{$tax.value}</strong></div> {/foreach}{/if} change to <!-- modification: total tax --> <div class="total">{$LANG.basket.total_tax} <strong>{$order.total_tax}</strong></div> /classes/cubecart.class.php find on line 1041 // Retrieve taxes if (($taxes = $GLOBALS['db']->select('CubeCart_order_tax', false, array('cart_order_id' => $order['cart_order_id']))) !== false) { $GLOBALS['tax']->loadTaxes(($GLOBALS['config']->get('config', 'basket_tax_by_delivery')) ? (int)$order['country'] : (int)$order['country_d']); foreach ($taxes as $vat) { $detail = $GLOBALS['tax']->fetchTaxDetails($vat['tax_id']); $vars['taxes'][] = array('name' => $detail['name'], 'value' => $GLOBALS['tax']->priceFormat($vat['amount'], true)); } } else if (!empty($order['total_tax']) && $order['total_tax'] > 0) { $vars['taxes'][] = array('name' => $GLOBALS['language']->basket['total_tax'], 'value' => $GLOBALS['tax']->priceFormat($order['total_tax'])); } change to // Retrieve taxes //modification: total tax if (!empty($order['total_tax']) && $order['total_tax'] > 0) { $vars['taxes'][] = array('name' => $GLOBALS['language']->basket['total_tax'], 'value' => $GLOBALS['tax']->priceFormat($order['total_tax'])); } find on line 1854 and 1973 and 2185 if (($taxes = $GLOBALS['db']->select('CubeCart_order_tax', false, array('cart_order_id' => $order['cart_order_id']))) !== false) { $GLOBALS['tax']->loadTaxes(($GLOBALS['config']->get('config', 'basket_tax_by_delivery')) ? $order['country'] : $order['country_d']); foreach ($taxes as $vat) { $detail = $GLOBALS['tax']->fetchTaxDetails($vat['tax_id']); $vars['taxes'][] = array('name' => $detail['name'], 'value' => $GLOBALS['tax']->priceFormat($vat['amount'], true)); } } else { $vars['taxes'][] = array('name' => $GLOBALS['language']->basket['total_tax'], 'value' => $GLOBALS['tax']->priceFormat($order['total_tax'])); } change to // modification: total tax $vars['taxes'][] = array('name' => $GLOBALS['language']->basket['total_tax'], 'value' => $GLOBALS['tax']->priceFormat($order['total_tax'])); find on line 1384 $GLOBALS['tax']->displayTaxes(); change to $GLOBALS['tax']->displayTaxes(); // modification: total tax $GLOBALS['smarty']->assign('LANG_TOTAL_TAX', $GLOBALS['language']->basket['total_tax']); /skins/[skin_name]/templates/content.checkout.php find {foreach from=$TAXES item=tax} <p class="tax"><span>{$tax.name}</span><span class="price">{$CUSTOMER_LOCALE.mark} {$tax.value}</span></p> {/foreach} change to <!-- modification: total tax --> <p class="tax"><span>{$LANG_TOTAL_TAX}</span><span class="price">{$CUSTOMER_LOCALE.mark} {$TOTAL_TAX}</span></p> if you use Print Order Form /modules/gateway/Print_Order_Form/gateway.class.php find on line 84 // Taxes $taxes = $GLOBALS['db']->select('CubeCart_order_tax', false, array('cart_order_id' => $order_summary['cart_order_id'])); change to // Taxes // modification: total tax $tax = $GLOBALS['db']->select('CubeCart_order_summary', false, array('cart_order_id' => $order_summary['cart_order_id'])); $total_tax = $tax[0]['total_tax']; $GLOBALS['smarty']->assign('TAX', $total_tax); $taxes = $GLOBALS['db']->select('CubeCart_order_tax', false, array('cart_order_id' => $order_summary['cart_order_id'])); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.