Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

$order_info Values Rate Topic   - - - - -

 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 10 December 2015 - 07:56 AM #21

Here it is:

 

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

 

<img src="//example.affiliate.com/sale.php?ht=img&&value={$order_info.display_subtotal}&oid={$order_info.order_id}&voucher={??????}&sid=555" width="1" height=1>



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3366 posts

Posted 10 December 2015 - 08:02 AM #22

{foreach from=$order_info.coupons item="coupon" key="coupon_key"}
    <img src="//example.affiliate.com/sale.php?ht=img&&value={$order_info.display_subtotal}&oid={$order_info.order_id}&voucher={$coupon_key|urlencode}&sid=555" width="1" height=1>
{/foreach}

or

{foreach from=$order_info.use_gift_certificates item="gift_certificate" key="gift_certificate_key"}
    <img src="//example.affiliate.com/sale.php?ht=img&&value={$order_info.display_subtotal}&oid={$order_info.order_id}&voucher={$gift_certificate_key|urlencode}&sid=555" width="1" height=1>
{/foreach}

Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19775 posts

Posted 10 December 2015 - 08:07 AM #23

 

 

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}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 10 December 2015 - 11:27 AM #24

Wooohoo! It works now!!!

 

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

 

Cheers!



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3366 posts

Posted 10 December 2015 - 02:59 PM #25

You are welcome


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19775 posts

Posted 10 December 2015 - 03:58 PM #26

Welcome!  :idea:


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 30 January 2017 - 06:13 AM #27

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
 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19775 posts

Posted 30 January 2017 - 07:48 AM #28

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 30 January 2017 - 09:13 AM #29

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,
 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 30 January 2017 - 09:23 PM #30

Use 'subtotal', not 'display_subtotal'.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 31 January 2017 - 01:21 AM #31

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.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 31 January 2017 - 08:05 PM #32

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


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19775 posts

Posted 01 February 2017 - 08:21 AM #33

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 12 February 2017 - 10:26 AM #34

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

 

For example: ( TOTAL - SHIPPING )

 

Thanks guys for all your help.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11392 posts

Posted 12 February 2017 - 08:53 PM #35

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

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


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 18 July 2018 - 11:04 AM #36

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19775 posts

Posted 18 July 2018 - 01:37 PM #37

Please check post #33

{$order_info.discount}

or

{$order_info.subtotal_discount}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • xmaster007
  • Junior Member
  • Members
  • Join Date: 20-Nov 09
  • 104 posts

Posted 18 July 2018 - 11:02 PM #38

 

Please check post #33

{$order_info.discount}

or

{$order_info.subtotal_discount}

 

This one worked: {$order_info.subtotal_discount}

Thanks.