|

$order_info Values
Posted 17 October 2012 - 04:47 PM #1
I know the following variables:
$order_info.items
$item.product_code
$item.price
$item.amount
$order_info.order_id
$order_info.subtotal
$order_info.total
What would the variables be to add the following...
Tax
Shipping Cost
City
State
Country
Then during the loop of items I also need to know...
Item Name
Category
Is there a place where these are all listed?
Thanks!!!!
Chris
Posted 19 October 2012 - 04:58 PM #2
{$order_info.order_id} {$order_info.shipping_cost} {$order_info.s_state} {$order_info.s_country} {$order_info.s_city} {$order_info.tax_ids} {$item.product} {$item.tax_value}
I hope this helps some other people for setting up tracking codes.
Thanks!
Chris
Posted 20 October 2012 - 05:55 AM #3
<!--- {$order_info|print_r:true} -->Then do a view page source and you'll see all the elements of that object. Just just delete the line when you're done.
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.
Posted 14 February 2015 - 09:46 AM #7

Posted 19 February 2015 - 12:46 PM #8
he/she can view all of your defined variables

i am not sure but it must be in cookie variable.
use debug and check please.
Thanks. this is really helpful. Can someone help me. I want to put the customers username in the invoice.tpl nfile. whats the string name? i've tried $order_info.username and so many others. please help?
Posted 09 December 2015 - 03:43 PM #9
Hello guys,
Any ideas how to pass a coupon code variable in order_confirmation.override.tpl?
I've tried several strings below and none of them are working.
$order_info.coupons
$coupon_code
$promo_code
I'm trying to pass coupon code variable to affiliate marketing platform, so affiliates can get credit when their coupon code is used on the site.
Cheers,
Posted 09 December 2015 - 03:54 PM #10
Please add the following code:
{$order_info|fn_print_r}
and go to the order confirmation page. You will see the whole content 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 1210 Multi-Vendor USD 1250 Multi-Vendor PLUS USD 3100 (2775)
CS-Cart Ultimate USD 4025 CS-Cart + YOUPI USD 1459 Multi-Vendor Ultimate USD 7500 (6000)
Posted 09 December 2015 - 04:39 PM #11
Thanks for the info eComLabs,
It would of been a lot easier if published the string, but I don't mind discovering and playing with source code.
So far I've got: [coupons] => Array, but when I've tried to pass it using $order_info.coupons string, it does not work.
I have also tried: $order_info.name, still no positive results.
I remember having this issue before, and I think the variable for coupon code was not name friendly.
Will try to dig some more, but if you already know the answer, I don't mind saving some time.
Cheers,
Posted 09 December 2015 - 06:00 PM #12
Promotions are stored as an promotion_id. You will have to resolve this ID to a name (or value) I believe to get the coupon code related to a promotion in an order.
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.
Posted 09 December 2015 - 06:04 PM #13
There got to be an easy way to pull the coupon code from Thank you page and pass it to the affiliate tracking code. It was very easy with earlier versions of cs-cart. I am very surprised that nobody inquired about it before.
Posted 09 December 2015 - 06:48 PM #14
In general, the basic $order_info structure has not changed a lot other than shipping/packaging
What did you use in V2?
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.
Posted 09 December 2015 - 06:59 PM #16
My question was "WHAT" did you use in V2? I.e. what was the smarty code you used in V2?
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.
Posted 09 December 2015 - 07:38 PM #17
To be honest I don't remember for V2 now, it was a few years ago.
But for 1.35 it was: var uts_coupon = '{$key}' ;
Posted 10 December 2015 - 01:24 AM #18
1.35 doesn't help me. Can't you look at your existing V2 code and simply pull it out? Otherwise we're all guessing here at what you mean.
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.
Posted 10 December 2015 - 06:08 AM #19
Thanks for the info eComLabs,
It would of been a lot easier if published the string, but I don't mind discovering and playing with source code.
So far I've got: [coupons] => Array, but when I've tried to pass it using $order_info.coupons string, it does not work.
I have also tried: $order_info.name, still no positive results.
I remember having this issue before, and I think the variable for coupon code was not name friendly.
Will try to dig some more, but if you already know the answer, I don't mind saving some time.
Cheers,
coupons is always an array. You should not refer to it by {$order_info.coupons} directly, this does not make sense.
You can use the {foreach} to take the content of each coupon.
In 2.2.5 it will look like the following:
{foreach from=$order_info.coupons item="coupon" key="coupon_key"} <span>{$coupon_key}</span> {/foreach}
It it was not coupons from promotions, but gift certificates, the code will be the following:
{foreach from=$order_info.use_gift_certificates item="gift_certificate" key="gift_certificate_key"} <span>{$gift_certificate_key}</span> {/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
Posted 10 December 2015 - 07:17 AM #20
Thanks for the info eComLabs,
It would of been a lot easier if published the string, but I don't mind discovering and playing with source code.
So far I've got: [coupons] => Array, but when I've tried to pass it using $order_info.coupons string, it does not work.
I have also tried: $order_info.name, still no positive results.
I remember having this issue before, and I think the variable for coupon code was not name friendly.
Will try to dig some more, but if you already know the answer, I don't mind saving some time.
Cheers,
Please post the content of the $order_info array here (without sensitive information) so that we can check you and provide with the solution
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 1210 Multi-Vendor USD 1250 Multi-Vendor PLUS USD 3100 (2775)
CS-Cart Ultimate USD 4025 CS-Cart + YOUPI USD 1459 Multi-Vendor Ultimate USD 7500 (6000)