Miva Merchant 4 Module FAQs » Other Page Templates (BROK_PAGETEMPLATES)


{docurl}

The total on my checkout pages are not correct. Why?

(2004/11/11)In stock Merchant, when a tax or shipping charge is added to the databases it is not deleted until the the tax and shipping are calculated again (happens when the "Shipping/payment selection" is submitted). So if the customers starts through checkout past the the shipping/payment selection screen, then leaves the checkout to change their bakset, the shipping and tax charge stays in the basket although it is no longer accurate. Merchant keeps this being a problem by not displaying the tax or shipping on the "Customer information" , "Basket", or "Shipping/payment selection" screens. However, if you're using a token in the Other Page Templates which includes charges or taxes, and you're not displaying those on that page, the displayed total won't be correct.
Redeemed coupons and gift certificates are also stored in Merchant's databases as "charges".

You can forcefully delete tax, shipping, and charges on any page by adding tokens to the "Page Load" tokens field for the template assigned to that page. The tokens are:

%delete_shipping%
%delete_tax%
%delete_charges%

(For developers: if you want to keep these tokens from having any affect, add your own token to the "Page Load" field and in that token's processing set the variables, g.Stop_Delete_Shipping, g.Stop_Delete_Tax, and/or g.Stop_Delete_Charges to 1).

The various "basket total" tokens:

%baskettotalall%, %baskettotalallF% displays the total of the ENTIRE basket, including tax, shipping, other charges etc.
%baskettotal%, %baskettotalF% displays the just the product sub-total, tax, shipping, and other charges are NOT included
%baskettotalwithcharges%, %baskettotalwithchargesF% displays the product sub-total + the charges (such as redeemed gift certificates, etc.).

Note that if you're not displaying the charges on a page where you use the token %baskettotalwithcharges% then the total will NOT reflect the charges. They have to be displayed to correctly be included in the total.

In the default template for the OSEL (the "Shipping/Payment Selecton page" which is where most coupon and gift certificate redemptions are handled), the charges are displayed with the code:

%begin_if_basketcharge|01|%
<TR><TD ALIGN="right" VALIGN="middle" COLSPAN="3">
  </TD><TD ALIGN="right" VALIGN="middle" NOWRAP>
<FONT FACE="%bdyfontface%" SIZE="%bdyfontsize%">
<I>%basket_chargedescription1%:</I>
</FONT>

</TD><TD ALIGN="right" VALIGN="middle" NOWRAP>
<FONT FACE="%bdyfontface%" SIZE="%bdyfontsize%">
%basket_chargeamount1F%
</FONT>
</TD></TR>
%end_if_basketcharge%
%begin_if_basketcharge|02|%
<TR><TD ALIGN="right" VALIGN="middle" COLSPAN="3">
  </TD><TD ALIGN="right" VALIGN="middle" NOWRAP>
<FONT FACE="%bdyfontface%" SIZE="%bdyfontsize%">
<I>%basket_chargedescription2%:</I>
</FONT>
</TD><TD ALIGN="right" VALIGN="middle" NOWRAP>
<FONT FACE="%bdyfontface%" SIZE="%bdyfontsize%">
%basket_chargeamount2F%
</FONT>

</TD></TR>
%end_if_basketcharge%

If you want to display redeemed gift certificate and coupons (and other things of that ilk) you'll need to add this code to display the charges and use the %baskettotalwithchargesF% token to display the total.



Last update: 2004-12-10 09:19
Author: Support
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Records in this category