Jump to content

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

Order Variables Rate Topic   - - - - -

 
  • knoxbury
  • Senior Member
  • Members
  • Join Date: 14-Jan 08
  • 483 posts

Posted 09 July 2012 - 03:35 PM #1

I need to retrieve the Order Number and the Customer Email Address on the order confirmation page. Does anyone know what variables I would use to retrieve this information? For example, {$order_info.total} would return the order total . . . now what is the equivalent for order number and customer email (from the order)?

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

Posted 10 July 2012 - 12:42 AM #2

The order confirmation does NOT have any order data associated with it by default. That would happen when you loaded the order details page by clicking the link on the confirmation page to show order details.

You can add a "post controller" for "checkout" in your my changes addon for the 'complete' mode that will get the order_id and then assign the order data to an $order_info variable for your use in the 'dispatch=orders.complete' template.

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.


 
  • knoxbury
  • Senior Member
  • Members
  • Join Date: 14-Jan 08
  • 483 posts

Posted 11 July 2012 - 06:16 PM #3

Then how does the variable {$order_info.total} display the order total on our confirmation page? Where does this come from?

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

Posted 11 July 2012 - 10:21 PM #4

Okay, there is an $order_info variable as part of the 'complete' view. However, I do not know what it was populated with. Different 'modes' have different data depending on their needs.
Why don't you just add a {debug} statement and then you can see all the $order_info properties that are available to you on that page?

For your original question then, you would use $order_info.order_id and $order_info.email

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.


 
  • knoxbury
  • Senior Member
  • Members
  • Join Date: 14-Jan 08
  • 483 posts

Posted 13 July 2012 - 03:46 PM #5

Thanks . . . perfect!