Could anyone tell me what are the variables for order id, total amount and product names?
I want to insert a tracking pixel script in the confirmation(success) page and I need those variables. Where do you recommend I insert the script, confirmation or success page?
I want to insert a tracking pixel script in the confirmation(success) page and I need those variables. Where do you recommend I insert the script, confirmation or success page?
I think you need to do it in the checkout/success page. If you do it in the confirmation page, the may go up to the confirm page but didn't click on the confirm button. In that case, you will count it a new order even though the user didn't place the order.
However, in the controller of the Success page, it clears all the details from the session including cart contents.
So my guess it that you should add the code in checkout/success.php as the first line in Index() function. Store the required fields in $this->data array so you can use it in the template.
However, in the controller of the Success page, it clears all the details from the session including cart contents.
So my guess it that you should add the code in checkout/success.php as the first line in Index() function. Store the required fields in $this->data array so you can use it in the template.
Extensions: Multi-vendor extension
Shipping Modules: SuperShip Pro
Multi-Vendor Marketplace:Opencartmarketplace.com
IceCat to Opencart: Import millions of IceCat products to Opencart
unfortunately you can't. All order data is purged before you can use it in the success page. It would be nice if the data was exposed at that point because lots of tracking type scripts need it there.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
The success controller clears all the session data, but you can certainly set that to a variable before the unset.Xsecrets wrote:unfortunately you can't. All order data is purged before you can use it in the success page. It would be nice if the data was exposed at that point because lots of tracking type scripts need it there.
For products you'd have to use the order_id and do a lookup on the success page by the order id, similar to how the confirm() function does it in catalog/model/checkout/order.php
yes I understand how it all works I've actually done it before, but it would be very nice if the variables were added to the default install. They are needed for many different things like analytics ecommerce integration clicktraks and dozens more.Qphoria wrote:The success controller clears all the session data, but you can certainly set that to a variable before the unset.Xsecrets wrote:unfortunately you can't. All order data is purged before you can use it in the success page. It would be nice if the data was exposed at that point because lots of tracking type scripts need it there.
For products you'd have to use the order_id and do a lookup on the success page by the order id, similar to how the confirm() function does it in catalog/model/checkout/order.php
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Which variables would you like then? I see no feature request for thisXsecrets wrote:yes I understand how it all works I've actually done it before, but it would be very nice if the variables were added to the default install. They are needed for many different things like analytics ecommerce integration clicktraks and dozens more.Qphoria wrote:The success controller clears all the session data, but you can certainly set that to a variable before the unset.Xsecrets wrote:unfortunately you can't. All order data is purged before you can use it in the success page. It would be nice if the data was exposed at that point because lots of tracking type scripts need it there.
For products you'd have to use the order_id and do a lookup on the success page by the order id, similar to how the confirm() function does it in catalog/model/checkout/order.php
Please explain what exactly you want to see on the success page? You want to see a full receipt page with products, order id, and totals? You've only hinted you want to find certain data but not explaining how you want them as that would depend on how they are shown.katalin wrote:Guys, open your own thread, don't ruin mine. If anyone can help me please read my posts and try to help. Thanks!
I don't think anyone wants them to be shown (well I imagine someone would) the important thing is to have them available as variables so you can put in a tracking javascript pretty much any sales tracking script is going to need at the very least the orderid, and total, and most accept list of products price name etc too. I'm actually rather surprised that this hasn't already been included and analytics ecommerce tracking added. I have added it to my site, and it is very useful.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I can understand this as well, I have a client that would like to track orders etc in Google Analytics. The following page explains the method:
http://code.google.com/apis/analytics/d ... merce.html
Sorry to hijack this thread, but I was also looking to do a complete xml, order, items, qty, price, stock etc etc to go off to a fulfillemt house, rather than do this on the success.php page, I think I can do it on model/checkout/order, where the order emails are generated? What do you think?
EDIT:
http://forum.opencart.com/viewtopic.php ... ss#p113938
http://code.google.com/apis/analytics/d ... merce.html
Sorry to hijack this thread, but I was also looking to do a complete xml, order, items, qty, price, stock etc etc to go off to a fulfillemt house, rather than do this on the success.php page, I think I can do it on model/checkout/order, where the order emails are generated? What do you think?
EDIT:
http://forum.opencart.com/viewtopic.php ... ss#p113938
I don't mean to steal the thread, but can I ask where you find the variables?katalin wrote:I found the vars for order id and total, now I need product names, I will need them like: prod1, prod2, prod3, etc...Hope you guys can help me.
PS: I will use this var in templates... success.
Who is online
Users browsing this forum: No registered users and 71 guests