google checkout why isn't the product info display

  • Posts: 24
  • Thank you received: 0
12 years 11 months ago #33510

Why isn't the product and order information showing when the information is transferred from my shop to google checkout? All I get is the total price with an order number.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33538

That's because it is not supported by the plugin for now. Here is more information about that:
www.hikashop.com/en/support/forum/4-how-...uct-names.html#26619

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
12 years 11 months ago #33837

I see that this user found a solution with this code change in plugins/hikashoppayment/googlecheckout.php:

$data = '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n";
$data .= '<checkout-shopping-cart xmlns=" checkout.google.com/schema/2 "><shopping-cart><items>';

foreach($order->cart->products as $product){

$data .= '<item><item-name>Order #'.$order->order_id.' - '.$product->order_product_name.'</item-name><item-description></item-description><unit-price currency="'.$currency->currency_code.'">'.$product->order_product_price.'</unit-
price><quantity>'.$product->order_product_quantity.'</quantity></item>';

}
$data .= '<item><item-name>Order #'.$order->order_id.' - Shipping</item-name><item-description></item-description><unit-price currency="'.$currency->currency_code.'">7.95</unit-price><quantity>1</quantity></item>';
$data .= '</items></shopping-cart><checkout-flow-support><merchant-checkout-flow-support/></checkout-flow-support></checkout-shopping-cart>';

Then you said to add: $order->order_shipping_price to get a variable shipping function

I don't know any php could you tell me where I would insert this and what I replace and what I don't replace? or better yet just send me a copy of the updated googlecheckout.php with this code in it?
Thanks for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33857

You would need to change <unit-price currency="'.$currency->currency_code.'">7.95</unit-price> by <unit-price currency="'.$currency->currency_code.'">'.$order->order_shipping_price.'</unit-price>

for the shipping price.

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
12 years 11 months ago #33917

Where in this document, plugins/hikashoppayment/googlecheckout.php, do I insert the code and do I remove any of the current code? Sorry I am php illiterate.

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33949

I said that you need to change :
<unit-price currency="'.$currency->currency_code.'">7.95</unit-price>

by:
<unit-price currency="'.$currency->currency_code.'">'.$order->order_shipping_price.'</unit-price>

and not to insert or delete code :)

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
12 years 10 months ago #34169

You are talking about changing it so the code is variable shipping correct? This is my minor concern.

My primary issue that I am talking about is the entire string of code, so that when a customer orders through google checkout all of the information from my beautiful hika shop transfers over to google, including item description, item price, item quantity etc.

so my question is, if this code works -

$data = '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n";
$data .= '<checkout-shopping-cart xmlns="checkout.google.com/schema/2">&l...<items>';

foreach($order->cart->products as $product){

$data .= '<item><item-name>Order #'.$order->order_id.' - '.$product->order_product_name.'</item-name><item-description></item-description><unit-price currency="'.$currency->currency_code.'">'.$product->order_product_price.'</unit-
price><quantity>'.$product->order_product_quantity.'</quantity></item>';

}
$data .= '<item><item-name>Order #'.$order->order_id.' - Shipping</item-name><item-description></item-description>
<unit-price currency="'.$currency->currency_code.'">'.$order->order_shipping_price.'</unit-price><quantity>1</quantity></item>';
$data .= '</items></shopping-cart><checkout-flow-support><merchant-checkout-flow-support/></checkout-flow-support></checkout-shopping-cart>';

:woohoo: Where in this document - plugins/hikashoppayment/googlecheckout.php do I put the above code? So that hika shop communicates to google all of the order information including item description, quantity, etc. This is my primary concern please help me out with specifics,like what do I need to do - just add it anywhere, or replace lines, or put it in a specfic place, or what?

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34180

You have to replace these lines:
$data = '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n";
$data .= '<checkout-shopping-cart xmlns=" checkout.google.com/schema/2 "><shopping-cart><items>';
$data .= '<item><item-name>'.JText::_('CART_PRODUCT_TOTAL_PRICE').' #'.$order->order_id.'</item-name><item-description></item-description><unit-price currency="'.$currency->currency_code.'">'.$price.'</unit-price><quantity>1</quantity></item>';
$data .= '</items></shopping-cart><checkout-flow-support><merchant-checkout-flow-support/></checkout-flow-support></checkout-shopping-cart>';

in that file plugins/hikashoppayment/googlecheckout.php, by the code you found in that other thread.

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
12 years 10 months ago #35318

Okay, when I inserted the new code into the place of that above. Now during checkout with google I register then hit next and instead of taking me to google checkout. I go back to the product page. What do you think is wrong with the code? or where I am putting it? Thanks for you patients and help.

$data = '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n";
$data .= '<checkout-shopping-cart xmlns="checkout.google.com/schema/2">&l...<items>';

foreach($order->cart->products as $product){

$data .= '<item><item-name>Order #'.$order->order_id.' - '.$product->order_product_name.'</item-name><item-description></item-description><unit-price currency="'.$currency->currency_code.'">'.$product->order_product_price.'</unit-
price><quantity>'.$product->order_product_quantity.'</quantity></item>';

}
$data .= '<item><item-name>Order #'.$order->order_id.' - Shipping</item-name><item-description></item-description>
<unit-price currency="'.$currency->currency_code.'">'.$order->order_shipping_price.'</unit-price><quantity>1</quantity></item>';
$data .= '</items></shopping-cart><checkout-flow-support><merchant-checkout-flow-support/></checkout-flow-support></checkout-shopping-cart>';

Please Log in or Create an account to join the conversation.

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35353

Hi,

Please make sure that the line:
$data .= '<checkout-shopping-cart xmlns="checkout.google.com/schema/2">&l...<items>';

is the correct line, not with &l... but with <shopping-cart>

Also, I see that you added a return carriage between:
</unit-
and:
price>

but it should be: </unit-price>
So please check on that code too.

The following user(s) said Thank You: wrworkman

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum