Post by khnaz35 » Fri May 29, 2020 2:51 pm

screwtape_mk wrote:
Fri May 29, 2020 6:50 am
did you end up winning here. i need to accomplish the same thing
I found one paid extension https://prnt.sc/spv38l for this purpose and the developer is really helpful to.
I would suggest give it a short.

Code: Select all

https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=25965

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by fguzels » Wed Nov 04, 2020 6:00 pm

pprmkr wrote:
Sun Sep 23, 2018 2:52 pm
heane33 wrote:
Sat Sep 22, 2018 12:18 am
I'm talking about this. Screenshot from google ads below.
Do you load global tag.js file elsewhere ?

First edit catalog/controller/checkout/success.php:
After:

Code: Select all

if (isset($this->session->data['order_id'])) {
Paste:

Code: Select all

			$data['transaction_id'] = $this->session->data['order_id'];
			$data['cart_total'] = $this->cart->getTotal();
Then edit catalog/view/theme/default/template/common/success.twig:
Before:

Code: Select all

{{ footer }}
Paste:

Code: Select all

{% if transaction_id is defined %}
	transaction ID = {{ transaction_id }}
	cart Total = {{ cart_total }}
	Use these values if needed as parameter in tag.js
	for example:
	<!-- Event snippet for Example conversion page -->
    <script>
      gtag('event', 'conversion', {'send_to': 'AW-123456789/AbC-D_efG-h12_34-567',
        'value': {{ cart_total }},
        'currency': 'USD',
        'transaction_id': '{{ transaction_id }}'
      });
    </script>

{% endif %}
Edit code to fit your needs.

Thank you so much, it work.

Newbie

Posts

Joined
Sat Oct 17, 2020 2:35 am
Who is online

Users browsing this forum: lockiedownunder and 15 guests