im applying a 10% promotion on cart…
Subtotal: $25.00
Order discount: $22.50
Taxes:
GST (5%): $1.25
TVQ (8.5%): $2.13
# Total cost:$5.88
something is really wrong here.... it should be subtotal * 10% for the order discount... its showing me wrong values..
where are these DEFINED / CALCED?
i know they are shown in views/checkout/components/checkout_totals_info.tpl
Hello, vanderex
The problem requires the investigation on your server. Please contact us via Customer Help Desk and provide us with a temporary access to your server.
our business policies won’t allow this level of access, as this servers hosts more then just this software.
But i would prefer to know WHERE exactly is the function to add all of this…
Hello, vanderex
The PHP functions that you need are located in the “core/fn.cart.php” file of your CS-Cart installation.
thanks … it think its the promotion module tough… since i debugged all discounts and can’t find… ill let you know
seems that i misread the promotion it’s BY specific percentage instead of TO specific %…
WEIRD
WOW in core/fn.promotions.php
line 1329 of my version (not latest fyi)
function fn_promotions_calculate_discount($type, $price, $value, $current_price = 0)
{
$discount = 0;
if ($type == 'to_percentage') {
print "
promo>
";
print "$type, $price, $value, $current_price ";
$discount = $price * (100 - $value) / 100;
print "DISCOUNT: ".$discount;
outputs
to_percentage, 25, 10, 0 DISCOUNT: 22.5
line should say
$discount = $price-( $price * (100 - $value) / 100);
looks like one dev tought that discount was the % to discount… while another hand of the company toght it was the % of total… like pay 10% of total price VS 10% off the total…
time to find 2.8 hours…
$debug['cs-cart] += 2.8
print $debug['cs-cart];
OUTPUT → 320.8 hours and counting.