$order_info Values

Here it is:

Below is the string that I'm using that executes on a thank you page.

??????}&sid=555" width="1" height=1>

{foreach from=$order_info.coupons item="coupon" key="coupon_key"}
    
{/foreach}

or

{foreach from=$order_info.use_gift_certificates item="gift_certificate" key="gift_certificate_key"}
    
{/foreach}

Below is the string that I'm using that executes on a thank you page.

I meant another thing. If the simtechdev's solution does not work, please provide with the debugging information when the following code is used:

{$order_info|fn_print_r}

Wooohoo! It works now!!!

Thanks Simtech for the solution and eComLabs for trying to help.

Cheers!

You are welcome

Welcome! :idea:

Greetings!

I need your help once more on the same subject.

It looks like a Variable for Sub-Total that we use in affiliate tracking pixel is not correct.

Please take a look at below example:

Subtotal: €4.95
Shipping cost: €2.95
Order discount: €0.99
Discount coupon: 20less
Total: €6.91

As you can see, Sub-Total is 4.95, but Affiliates are getting paid based on 6.91 and this is not correct, they should not be making money on shipping.

What I'm trying to say, the {$order_info.display_subtotal} is calculating 6.91 and this is not right. The correct value should be 4.95 minus 20% discount.

Should I be using a different variable for Sub-Total?

Thanks,

XM

Try to use code from post #23. May be correct value is stored in another element of the order_info array

Hmmm. Technically it should be an easy task to pull this info, as how do you operate affiliates program if you don't know what is your sub-total after a discount, and before shipping?

Let's see if guys from Simtech can assist on this one.

Cheers,

Use 'subtotal', not 'display_subtotal'.

Hi EZ,

I have changed to 'subtotal' and it is now calculating properly, with only one issue. Please see below example.

Checkout Cart 1:

Item 1: $3.95

Item 2: $3.95

Including discount: $1.58
Discount coupon: less20 ( 20% discount )

Subtotal: $6.32 ( passing to affiliate )

Shipping cost: $9.95
---------------------------------------------------

Total: $16.27

As you can see the logic is working, but only if a Coupon Code Discount Bonus is set to Discount on All products in Categories.

If a Coupon Code Discount Bonus is set to Order Discount, then we have a different scenario:

Checkout Cart 2:

Item 1: $3.95

Item 2: $3.95

Order discount -$1.58

Discount coupon: less20 ( 20% discount )

Subtotal: $7.90 ( passing to affiliate ) maybe it is how cs-cart is calculating and some modifications are required?

Shipping $9.95

---------------------------------------------------

Order Total $16.27

I would be happy to use 'Discount on All products in Categories' option, but it is not convenient as categories are getting changed and updated all the time, and we have to redo all our coupon codes to include new categories.

Thanks for your help.

There are many different order fields that cscart uses to store calculated values. The ones to investigate are:

total (items - discounts + shipping + surcharges)

subtotal (sum of items in cart)

discount (cart promotion discount)

subtotal_discount (catalog promotion discount)

payment_surcharge

shipping_cost

Here is info from the fn.cart.php file

// shipping_cost - total shipping cost
// subtotal - sum (price * amount) of all products
// original_subtotal - sum (original_price * amount) of all products
// tax_subtotal - sum of all the tax values
// display_subtotal - the displayed subtotal (does not use in the calculaton)
// subtotal_discount - the order discount
// discount - sum of all products discounts (except subtotal_discount)
// total - order total

Hope it will help you

Is it possible to create a formula string for tracking pixel?

For example: ( TOTAL - SHIPPING )

Thanks guys for all your help.

Generally that would be {$subtoal} but might not include some taxes or fees.

So you could do {$order_info.total - $order_info.shipping)

Hello guys,

Does anybody know what is the variable name for Order Discount?

I have tried: {$summary-sub-discount} and it does not work.

Thanks,

X

Please check post #33

{$order_info.discount}

or

{$order_info.subtotal_discount}

Please check post #33

{$order_info.discount}

or

{$order_info.subtotal_discount}

This one worked: {$order_info.subtotal_discount}

Thanks.