I'm scratching my head with a Cart Throb problem.
I have a custom extension that handles tax, and it is returning the value of tax properly. But the tax is not being added to the total in the cart.
At this point I'm stuck and can't make any progress. Any help would be appreciated.
The extension file is available here: download
So the returned tax value from the extension is correct, but it's not having any effect on the total.
The template code looks like this:
{exp:cartthrob:cart_items_info}
{if first_row}
<table class="ck-table">
<tbody>
<tr class="ck-header">
<th class="ck-header-id">ID</th>
<th class="ck-header-product">Product</th>
<th class="ck-header-price">Price</th>
<th class="ck-header-quantity">Quantity</th>
<th class="ck-header-cost">Cost</th>
</tr>
{/if}
<tr class="ck-product{if title == 'Cooler Case'} ck-cooler-case{/if}">
<td>{prd_id}</td>
<td>{title}</td>
<td>{item_price}</td>
<td>{quantity}</td>
<td>{item_subtotal}</td>
</tr>
{if last_row}
<tr class="ck-subtotal">
<td colspan="2"></td>
<td class="ck-subtotal-label">Subtotal:</td>
<td class="ck-subtotal-cost" colspan="2">{cart_subtotal}</td>
</tr>
{exp:cartthrob_order_discounts field="order_discounts"}
{if has_discounts}
{discounts}
{if discount_count == 1}
<tr class="ck-discount-header">
<th colspan="2"></th>
<th class="ck-discount-title">Discounts</th>
<th class="ck-discount-amount" colspan="2">Savings</th>
</tr>
{/if}
<tr class="ck-discount">
<td colspan="2"></td>
<td class="ck-discount-title">{discount_title}</td>
<td class="ck-discount-amount" colspan="2">-{discount_amount}</td>
</tr>
{/discounts}
{/if}
{/exp:cartthrob_order_discounts}
{!--
<tr class="ck-discount">
<td colspan="2"></td>
<td class="ck-subtotal-label">Total Discounts:</td>
<td class="ck-subtotal-cost" colspan="2">-{cart_discount}</td>
</tr>
--}
<tr class="ck-subtotal">
<td colspan="2"></td>
<td class="ck-subtotal-label">Shipping:</td>
<td class="ck-subtotal-cost" colspan="2">{cart_shipping}</td>
</tr>
<tr class="ck-subtotal">
<td colspan="2"></td>
<td class="ck-subtotal-label">Tax:</td>
<td class="ck-subtotal-cost" colspan="2">{cart_tax}</td>
</tr>
<tr class="ck-total">
<td colspan="2"></td>
<td class="ck-total-label">Total:</td>
<td class="ck-total-cost" colspan="2">{cart_total}</td>
</tr>
<tr class="ck-buttons">
<td colspan="3"></td>
<td colspan="2">
<a href="/checkout/payment/" class="btn-sprite" id="btn-continue">Continue</a>
</td>
</tr>
</tbody>
</table>
{/if}
{if no_results}
<p>There is nothing in your cart.</p>
{/if}
{/exp:cartthrob:cart_items_info}
and here is the add to cart form:
{exp:cartthrob:add_to_cart_form return="cart"}
{!-- Required Hidden Fields --}
<input type="hidden" name="entry_id" value="{entry_id}" />
{!-- Used by AJAX add to cart --}
<input type="hidden" name="ajax_product_title" value="{title}" />
<input type="hidden" name="ajax_image_url" value="{product_detail_image}" />
<table>
<tr>
<th class="pl-add-to-cart-quantity">Qnty.</th>
<th class="pl-add-to-cart-recipient">Send to</th>
</tr>
<tr>
<td>
<select name="quantity">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
</select>
</td>
<td>
{!--
@NOTE: this outputs a select menu to assign the product to a recipient using item_options[address_id]
--}
{exp:cartthrob_multi_shipto:address_select new_recipient="yes" class="recipient-selector"}
</td>
</tr>
</table>
<a class="submit-image-replace sprite-add-to-cart ajax-add-to-cart" href="/cart/">Add to Cart</a>
<input type="submit" class="hide" value="Add to Cart" />
{/exp:cartthrob:add_to_cart_form}