I am struggling getting this google confirmation code working correctly, I am willing to pay anyone that can get this to work.
I'm running OC 1.5.4 and here's what i have so far
Here's what i have in catalog/controller/checkout/success.php
Code: Select all
<?php
class ControllerCheckoutSuccess extends Controller {
public function index() {
if ( isset($this->session->data['order_id']) && ( ! empty($this->session->data['order_id'])) ) {
$this->session->data['last_order_id'] = $this->session->data['order_id'];
}
if (isset($this->session->data['order_id'])) {
$this->data['order_id'] = $this->session->data['order_id'];
$this->data['email'] = $this->session->data['email'];
$this->data['iso_code_2'] = $this->session->data['iso_code_2'];
$this->data['order_total'] = $this->session->data['order_total'];
$this->data['discounts'] = $this->session->data['discounts'];
$this->data['shipping'] = $this->session->data['shipping'];
$this->data['tax'] = $this->session->data['tax'];
$this->data['product_name'] = $this->session->data['product_name'];
$this->data['price'] = $this->session->data['price'];
$this->data['quantity'] = $this->session->data['quantity'];
$this->cart->clear();
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);
unset($this->session->data['payment_method']);
unset($this->session->data['payment_methods']);
unset($this->session->data['guest']);
unset($this->session->data['comment']);
unset($this->session->data['order_id']);
unset($this->session->data['coupon']);
unset($this->session->data['reward']);
unset($this->session->data['voucher']);
unset($this->session->data['vouchers']);
}
$this->language->load('checkout/success');
Code: Select all
<!-- START Google Certified Shops Order -->
<div id="gts-order" style="display:none;" translate="no">
<!-- start order and merchant information -->
<span id="gts-o-id"><?php echo $order_id; ?></span>
<span id="gts-o-domain">www.mysite.com</span>
<span id="gts-o-email"><?php echo $email; ?></span>
<span id="gts-o-country"><?php echo $iso_code_2; ?></span>
<span id="gts-o-currency">GBP</span>
<span id="gts-o-total"><?php echo $order_total; ?></span>
<span id="gts-o-discounts"><?php echo $discounts; ?></span>
<span id="gts-o-shipping-total"><?php echo $shipping; ?></span>
<span id="gts-o-tax-total"><?php echo $tax; ?></span>
<span id="gts-o-est-ship-date">YYYY-MM-DD</span>
<span id="gts-o-est-delivery-date">YYYY-MM-DD</span>
<span id="gts-o-has-preorder">N</span>
<span id="gts-o-has-digital">N</span>
<!-- end order and merchant information -->
<!-- start repeated item specific information -->
<!-- item example: this area repeated for each item in the order -->
<span class="gts-item">
<span class="gts-i-name"><?php echo $product_name; ?></span>
<span class="gts-i-price"><?php echo $price; ?>]</span>
<span class="gts-i-quantity"><?php echo $quantity; ?></span>
<span class="gts-i-prodsearch-id">123456</span>
<span class="gts-i-prodsearch-store-id">123456</span>
<span class="gts-i-prodsearch-country">GB</span>
<span class="gts-i-prodsearch-language">en</span>
</span>
<!-- end item 1 example -->
<!-- end repeated item specific information -->