Jump to content

Google Checkout Shipping Problem


Recommended Posts

Hey All,

 

I have been having a lot of problems getting the Google Checkout working perfectly. I have gotten it to work OK, but when I first go to checkout I receive this message.

 

<?xml version="1.0" encoding="UTF-8"?>
<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">
 <shopping-cart>
<items>
  <item>
	<item-name>Burley - Weight : 100g</item-name>
	<item-description></item-description>
	<unit-price currency="GBP">13.99</unit-price>
	<quantity>1</quantity>
	<item-weight unit="LB" value="100" />
  </item>
</items>
<merchant-private-data>247|653bf0585129d392fb3c942c9f9c588a</merchant-private-data>
 </shopping-cart>
 <checkout-flow-support>
<merchant-checkout-flow-support>
  <edit-cart-url>https://pureleaf.co.uk/order.php</edit-cart-url>
  <continue-shopping-url>https://pureleaf.co.uk/order-confirmation.php</continue-shopping-url>
  <shipping-methods>
	<flat-rate-shipping name="">
	  <price currency="GBP">4.99</price>
	</flat-rate-shipping>
  </shipping-methods>
  <request-buyer-phone-number>false</request-buyer-phone-number>
</merchant-checkout-flow-support>
 </checkout-flow-support>
</checkout-shopping-cart>

<?xml version="1.0" encoding="UTF-8"?>
<error xmlns="http://checkout.google.com/schema/2" serial-number="5b38ada1-b4c4-48cc-bb47-3c0f66e1a3fe">
 <warning-messages>
<string>XML failed to validate against the schema at line: 20, column 20, with error: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_nameFlatRateShipping'.</string>
<string>XML failed to validate against the schema at line: 20, column 20, with error: cvc-attribute.3: The value '' of attribute 'name' on element 'flat-rate-shipping' is not valid with respect to its type, 'null'.</string>
 </warning-messages>
 <error-message>Error parsing XML; message from parser is: Invalid value for attribute name in checkout-shopping-cart/checkout-flow-support/merchant-checkout-flow-support/shipping-methods/flat-rate-shipping: Required field must not be blank</error-message>
</error>

 

Then when I go back to the cart and change the shipping method it works perfectly, so obviously I assume it's a problem with the first shipping option. I then check out with the original shipping method and it works fine.

 

It's such an odd problem. If anyone has any ideas on how I can get this working I would appreciate it.

 

Kind Regards

Link to comment
Share on other sites

I was a bit premature posting this problem. There was already a fix posted. I can't find the post at the moment, but what you need to do to fix this issue is modify the googleshipping.php from

 

function GoogleFlatRateShipping($name, $price) {
  $this->name = $name;
  $this->price = $price;
   }

 

To this

 

function GoogleFlatRateShipping($name, $price) {
  $this->name = 'Shipping';
  $this->price = $price;
}

Edited by notcrack (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...