I want to get order details (ideally in XSLT) after the user has been redirected back to the website following payment (SagePay in our case), so we can use GA ecommerce tracking, obviously GetBasket() is empty.
Thinking about storing the orderGuid in the session so it can retrieved, which should do the job, but is there a better solution?
You can also assign an order number prior to redirecting to the payment gateway using CommerceLibrary:AssignOrderNumber(). Once an order number is assigned uCommerce will leave it alone. It's much the same solution as the guid but you can use the order number to retrieve the order from XSLT using CommerceLibrary:GetPurchaseOrder(orderNumber).
We implmented this using the GUID and it works perfectly. We save the GUID to the session on the checkout page and when the user comes back to the success page following payment we use the CommerceLibrary:GetPurchaseOrder($orderGuid)to generate the Google Analytics Ecommerce tracking code and then clear the session variable.
Get Order after redirection
Hi,
I want to get order details (ideally in XSLT) after the user has been redirected back to the website following payment (SagePay in our case), so we can use GA ecommerce tracking, obviously GetBasket() is empty.
Thinking about storing the orderGuid in the session so it can retrieved, which should do the job, but is there a better solution?
Thanks,
Jeavon
Hi Jeavon,
You can also assign an order number prior to redirecting to the payment gateway using CommerceLibrary:AssignOrderNumber(). Once an order number is assigned uCommerce will leave it alone. It's much the same solution as the guid but you can use the order number to retrieve the order from XSLT using CommerceLibrary:GetPurchaseOrder(orderNumber).
Hi Soren,
We implmented this using the GUID and it works perfectly. We save the GUID to the session on the checkout page and when the user comes back to the success page following payment we use the CommerceLibrary:GetPurchaseOrder($orderGuid)to generate the Google Analytics Ecommerce tracking code and then clear the session variable.
Very impressed with the flexability of uCommerce.
Thanks,
Jeavon
Hi Jeavon,
Glad to hear and thank you for those kind words.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion