Viewing 8 replies - 1 through 8 (of 8 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    What code are you entering, and where? Are you using another plugin for this aside from just WooCommerce?

    Thread Starter Kim L

    (@kimbupamu)

    I first used a plugin, this one. This plugin is supposed to do everything including the badge code, but I still got the same error. So I tried to put the code manually (I disabled the plugin first) in the thankyou.php template. Here’s the code I put:

    <!-- START Google Trusted Stores Order -->
    <div id="gts-order" style="display:none;" translate="no">
    
      <!-- start order and merchant information -->
      <span id="gts-o-id"><?php echo $order->get_order_number(); ?></span>
      <span id="gts-o-email"><?php echo $order->billing_email; ?></span>
      <span id="gts-o-country"><?php echo $order->billing_country; ?></span>
      <span id="gts-o-currency"><?php echo $order->order_currency; ?></span>
      <span id="gts-o-total"><?php echo $order->order_total; ?></span>
      <span id="gts-o-discounts"><?php echo $order->cart_discount; ?></span>
      <span id="gts-o-shipping-total"><?php echo $order->order_shipping; ?></span>
      <span id="gts-o-tax-total"><?php echo $order->order_tax; ?></span>
      <span id="gts-o-est-ship-date"><?php echo date('Y-m-d', strtotime('+1 weekday')); ?></span>
      <span id="gts-o-est-delivery-date"><?php echo date('Y-m-d', strtotime('+6 weekday')); ?></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 -->
      <span class="gts-item">
    
      <?php
    	$gts_cart_items = $order->get_items();
    	foreach ( $gts_cart_items as $gts_line_item ) {
    		print ("\t<span class='gts-i-name'>$gts_line_item[name]</span>\n");
    		print ("\t<span class='gts-i-price'>$gts_line_item[line_total]</span>\n");
    		print ("\t<span class='gts-i-quantity'>$gts_line_item[qty]</span>\n");
    	}
      ?>
    
      </span>
      <!-- end repeated item specific information -->
    
    </div>
    <!-- END Google Trusted Stores Order -->
    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Unfortunately I don’t know much about Google Trusted Stores. This forum is only for WooCommerce core issues and this is an addon/customization.

    Perhaps try reaching out to the plugin authors? https://github.com/enollo/woocommerce-google-trusted-stores-integration/issues

    Thread Starter Kim L

    (@kimbupamu)

    The thing is I didn’t use the plugin this time. I added the codes manually without the help of any plugin and the problem is still there. I’m hoping if someone was able to encounter the same issue and managed to fix it. But thanks, I will also try to message the plugin authors about this. They might have some input.

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    While waiting for the plugin authors ..

    This error indicates that the order confirmation module was implemented more than one time on the same page: https://support.google.com/tagassistant/answer/3203009?hl=en#order_more

    I’d recommend (if you’re not using the plugin anymore), that you completely deactivate/remove this before adding in the code manually (and add it only once).

    Cheers!

    Thread Starter Kim L

    (@kimbupamu)

    I’m back, sadly I haven’t heard back from the plugin author. ??

    @rynald0s
    I did try that. I actually did that first before finding out about this plugin so I tried it and I got the same error. ??

    Thread Starter Kim L

    (@kimbupamu)

    I’m back to revive this thread.. in the hopes that someone can still help me. I haven’t used a plugin this time and it’s still showing the same error. ??

    I don’t know if this is relevant but I’m trying to integrate Trusted Store too. I’ve also tried manually inserting the JS direct into the theme but no luck.

    I do not even get a progress bar when testing it out from the Google link supplied. However, the JS code is definitely there when I check the source code.

    I’ll raise this with Google in the hope they may have an explanation but I’d be interested to find out if anyone ever got this to work with Woocommerce and, if so, how they tackled it!

    • This reply was modified 7 years, 9 months ago by Mark. Reason: typo
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Google Trusted Store problem with validation’ is closed to new replies.