cancel
Showing results for 
Search instead for 
Did you mean: 

Google Tag Manager module is missing a template?

Google Tag Manager module is missing a template?

Hello, I was fiddling around in the GoogleTagManager code, and in the Observer (SetGoogleAnalyticsOnCheckoutObserver) there is a call to the template 

Magento_GoogleTagManager::checkout/set_checkout_option.phtml (line 98 and 123). The problem is I can't seem to find it anywhere... Google searches are also futile... Can anybody help me please?

 

6 REPLIES 6

Re: Google Tag Manager module is missing a template?

@rok_delak you can find this inside app/design/frontend/vendor/themename/Magento_GoogleTagManager/templates/checkout/set_checkout_option.phtml

 

Please let me know if you stuck.

 

Thanks

Re: Google Tag Manager module is missing a template?

Thank you for the response, but on a fresh install, the file isn't there...

Re: Google Tag Manager module is missing a template?

@rok_delak can you please let me know where have you check this error/warning?

 

Thanks

Re: Google Tag Manager module is missing a template?

@rahul Gupta  I was making customisations to the GoogleTagManager, specifically sending the Shipping and Payment methods, and while looking at the Observer I came across this template that gets included on SaveShippingMethod and SavePayment... But after a search it doesn't exist... No error whatsoever, probably silent.. But either way, I want to see the content of the template to get an idea how to do the customisation...

Long story short, I would really need that template Smiley Happy And it's really strange that it doesn't exist in the installation, but it's being included in the Observer... What am I missing?

Do you maybe have it in your installation?

Re: Google Tag Manager module is missing a template?

@rok_delak can you let me the observer file which is calling that template file?

 

Thanks

Re: Google Tag Manager module is missing a template?

@rahul Gupta the observer file is found in vendor/magento/module-google-tag-manager/Observer/SetGoogleAnalyticsOnCheckoutObserver.php

Line 98 -->setTemplate('Magento_GoogleTagManager::checkout/set_checkout_option.phtml')

 

Thank you for the effort.