Jump to content

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

Pass Order Info On Confirmation Page Rate Topic   - - - - -

 

Posted 02 December 2019 - 05:29 PM #1

Hi - I am trying to integrate with an affiliate program and need to pass order info to them from my order confirmation page. 

 

It doesn't seem there is a standard Order Info array that I can use to set up variables in Google Tag Manager, am I missing something?

 

I could use the Order Info array created by the Google Analytics add-on, but that array is missing Coupon Code and Discount details which I need to pass.

 

2 questions I guess

 

1. Can I add Coupon & Discount details to the array already created by Google Analytics add on? If so any idea how? This seems would be the ideal / quickest solution

 

2. Is there a better plugin/add-on that I can use to pass full order details from confirmation page

 

Thanks



 

Posted 03 December 2019 - 08:16 AM #2

Hello.

 

1) You can use $order_info array on the order details page design/themes/responsive/templates/views/orders/details.tpl

 

{if $order_info.coupons}'coupon'{foreach from=$order_info.coupons item="promo" key="coupon"}'{$coupon|escape:"javascript"}'{/foreach}{/if}

 

2) Our addon can be adapted to send this data to google analytics 


Only helpful and unique addons https://store.retailfactory.ru


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

Posted 03 December 2019 - 01:23 PM #3

Hello.

 

1) You can use $order_info array on the order details page design/themes/responsive/templates/views/orders/details.tpl

 

{if $order_info.coupons}'coupon'{foreach from=$order_info.coupons item="promo" key="coupon"}'{$coupon|escape:"javascript"}'{/foreach}{/if}

 

2) Our addon can be adapted to send this data to google analytics 

 

Please note that the correct template of the order confirmation page is

 

design/themes/responsive/templates/views/checkout/complete.tpl

 

There is also the checkout:order_confirmation hook in this template which can be used for sending data to 3rd party services


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 руб.


 

Posted 03 December 2019 - 01:54 PM #4

Please note that the correct template of the order confirmation page is

 

design/themes/responsive/templates/views/checkout/complete.tpl

 

There is also the checkout:order_confirmation hook in this template which can be used for sending data to 3rd party services

 

Thanks, i think that's the exact hook I need. 
Unfortunately I have 0 coding knowledge of how to put the below in there... Can you help at all?

 

- Unique Order ID
- Product SKUs purchased
- Quantity of each product purchased
- Price of each product purchased
- Currency of the transaction
- Discount Amount (whole-order and item-specific)
- Coupon Code used

As i say the Google Analytics add on actually covers most of these (except discouont and coupon), but that is a workaround.


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

Posted 03 December 2019 - 10:08 PM #5

You should use the 'checkout:order_complete' hook.

You would use variables like

{$order_info.order_id} {* the order_id *}
{$order_info.currency} {* Currency of the transaction *}
{$order_info.discount} {* Amount of the discount *}
{* Don't remember how to get the coupon code(s) but they are also available in the $order_info *}

 

then you would loop through the products and get the product specific info used:

 

{foreach from=$order_info.product key="cid" item="item"}
  {$item.product_code} {* your SKU *}
  {$item.amount} {* quantity *}
  {$item.price} {* price *}
{/foreach}

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
  • 19833 posts

Posted 04 December 2019 - 06:02 AM #6

To check the whole tree of the $order_info array, you can temporary use the following code

{$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 руб.


 

Posted 04 December 2019 - 09:04 AM #7

Thanks so much for this, I am going to try to get this working right now! Thanks again :)