-- url of the page with the problem -- :
sewingmachinesuk.uk/
-- HikaShop version -- : 4.4.2
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.2.34
Hi again,
I'm trying currently to implement the opt in reviews to the checkout and am having a bit on an issue.
I'm not a coder and therefore it could be anything.
I was going off of one of your previous forum topics on the same thing, however what was missing was how the code itself was placed into the view/checkout/end.php its self. I don't know anything about syntax and could use some help.
I have tried just doing it myself and have ended up breaking the end screen so that it displayed nothing. I have also tried searching a lot, but there's not a lot written on it surprisingly.
<!-- BEGIN GCR Opt-in Module Code -->
<script src="https://apis.google.com/js/platform.js?onload=renderOptIn"
async defer>
</script>
<script>
window.renderOptIn = function() {
window.gapi.load('surveyoptin', function() {
window.gapi.surveyoptin.render(
{
"merchant_id": 428958528,
"order_id": "<?php echo $this->order->order_number; ?>",
"email": "<?php echo $this->order->customer->user_email; ?>",
"delivery_country": "<?php echo $this->order->shipping_address->address_country_code_2; ?>",
"estimated_delivery_date": "<?php echo hikashop_getDate($this->order->order_created,'Y-m-d'); ?>",
"opt_in_style": "CENTER_DIALOG"
});
});
}
</script>
<!-- END GCR Opt-in Module Code -->
<!-- BEGIN GCR Language Code -->
<script>
window.___gcfg = {
lang: 'en-US'
};
</script>
<!-- END GCR Language Code -->
This is the snippit that I have pieced together with help from the google page explaining the whole thing, and also your old form topic.
I just need to know where to paste it in basically.
I'm using the default checkout/end.php
<?php
/**
* @package HikaShop for Joomla!
* @version 4.4.2
* @author hikashop.com
* @copyright (C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(empty($this->html)) {
echo JText::_('THANK_YOU_FOR_PURCHASE');
if(!empty($this->url))
echo '<br/>'.JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE', $this->url);
} else {
echo $this->html;
}
$this->nextButton = false;
The google help page also talks about DOCTYPE which I'm not sure if I need to worry about.
Here is the page for ref
support.google.com/merchants/answer/7106244
Any help would be amazing,
cheers