[ic] Help! Pricing routines fail in receipt.html (but work otherwise)

Kevin Walsh interchange-users@interchange.redhat.com
Wed May 22 15:18:00 2002


> 
>  I'm struggling against a very hard problem with Interchange (4.8.3,
> 4.8.5)...
> 
>  I'm using some custom tags to calculate the prices of items,
> in pages basket.html, checkout.html, receipt.html
> 
>  The problem is that, when it comes to page receipt.html, Interchange
> seems to have forgotten about item modifiers ( [item-modifier formats]
> does not work too, and returns empty values) and my calculation of prices,
> done via proprietary tag mix-sale-off:
> 
>  [mix-sale-off number="[nitems]" prodformat="[item-modifier formats]" ]
> 
> always returns 30 per discount percentage (see variable curr_prc) whereas
> it should return 30 or 9 or 4 or 3 per discount percentage.
> 
>  Is it this an Interchange problem, or I am doing something nasty here???
> 
[nitems] returns the total number of items in the cart, whereas the
[item-*] tags refer to a particular item in the cart and are intended
for use within a container such as [item-list].

Try this as a test:

[item-list]
    Discount for [item-quantity] of item [item-increment] is
    [mix-sale-off number="[item-quantity]" prodformat="[item-modifier formats]"]
    <br>
[/item-list]

I assume that you are happy to modify the values in your UserTag
whenever your price/discount structure changes.  Why not just use
CommonAdjust and a pricing table to calculate your format prices
and quantity discounts?

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/