Hey all!
Back with another question. I am trying to integrate OpenCart with a company we use for affiliates (affiliatly). What they told me is that I need to place a piece of code on the "thank you" page, which must have these:
{{order_name}} :: must be dynamically replaced with the order ID/name, required
{{subtotal_price}} :: must be dynamically replaced with the order subtotal, required
{{discount_code}} :: must be dynamically replaced with the used coupon code, if any, optional (needed only if you are using the coupon code tracking).
{{email}} :: must be dynamically replaced with the customer’s email, optional. Used for the email tracking and if you want to block certain customer emails from being tracked.
Can you please provide me with the appropriate calls for order name, subtotal, discount code and email, so I can replace them in the code I have, so I can get this working?
Also any idea where the "thank you" page is located, so I can ssh into the server and edit it?
Thanks!
Hi
Controller file:
catalog\controller\checkout\success.php
Find:
Add after:
View File:
catalog\view\theme\default\template\common\success.twig
Where you want add:
You need to make sure that you've cleared all caches and refreshed the modifications.
Controller file:
catalog\controller\checkout\success.php
Find:
Code: Select all
if (isset($this->session->data['order_id'])) {
Code: Select all
$this->load->model('checkout/order');
$data['order_info'] = $this->model_checkout_order->getOrder($this->session->data['order_id']);
catalog\view\theme\default\template\common\success.twig
Where you want add:
Code: Select all
{% if order_info is defined %}
{{ order_info.order_id }}
{{ order_info.email }}
{% endif %}
Who is online
Users browsing this forum: JNeuhoff, vourlismenos and 18 guests