[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Partial Solution: total-cost not making it...
****** message to minivend-users from Sydney Urshan <urshan@nethollywood.net> ******
I found out why I am having the problem. It is my discount code. If
I put in a straight forward discount, it works. Here is the code I
have (for prorating):
[calc]
$days = [tag time]%d[/tag];
return '';
[/calc]
[item-list]
[discount 2001]
return ($s - ($s / 30 * $days)) if $days > 1;
[/discount]
[discount 2002]
return ($s - ($s / 30 * $days)) if $days > 1;
[/discount]
[discount 3001]
return ($s - ($s / 30 * $days)) if $days > 1;
[/discount]
[discount 3002]
return ($s - ($s / 30 * $days)) if $days > 1;
[/discount]
[/item-list]
If I delete the calc and hard wire in $days with a fixed number, it
works. I would also like the 30 to be calculated for the current
month. (If it is February, it would be 28, etc.) Keep in mind that
the above script works *visually*, but not for total-cost internally.
Also, is there a shortcut to discount these 4 products, but not the rest?
Lastly, none of this works with the [include file=, etc.
Can someone show me the error of my ways?
Sydney Urshan
>I am running 4.04 interfaced to Signio. Transactions have been
>making it successfully.
>
>I tightened up my discount routines and *visually* see every
>discount at every stage of the transaction. However, only zero
>dollars is getting passed to Signio causing the transaction to fail.
>What I discovered is that there was a hidden shipping charge giving
>a positive number to the total allowing it to succeed. I didn't
>think much of it at the time because I was still working on
>discounts and deleting shipping. I am not using shipping and when I
>deleted related code, the total-cost became 0.
>
>If the discount is on, the subtotal is the full price and there is a
>discount number visually there (for total-cost), but 0 is passed to
>Signio. If I turn off the discount, the subtotal is the full price
>and total is visually 0, and of course, 0 is passed to Signio.
>
>In summary, the numbers are not getting calculated to the total-cost
>internally (only visually) unless there is a shipping charge
>involved which is the only number that gets calculated into the
>total-cost. I have also commented out all references to weight.
>
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list