Skip to main content

Google Checkout Issue - Missing product names?

More
15 years 8 hours ago #26619 by joelstad
The plugin appears to be working and customers are being charged for their orders but the product list is not correct or is missing and it's causing questions. Attached is a sample of what it looks like. What's causing this?

Thanks in advance!

--Joel

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

More
15 years 1 hour ago #26625 by nicolas
The google checkout plugin only sends to google checkout the total amount of the order. That's why you don't have the details of the order in the google checkout plateform.

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

More
14 years 11 months ago #26653 by joelstad
Customers are saying it looks/feel suspicious because the itemized list they see on Google is nothing like the itemized list they agreed to purchase in the shopping cart of Hikashop. How difficult would it be to pass the item names to Google during checkout?

--Joel

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

More
14 years 11 months ago #26658 by nicolas
If it's just the name of the products, you can change the code:
'.JText::_('CART_PRODUCT_TOTAL_PRICE').' #'.$order->order_id.'

of the file plugins/hikashoppayment/googlecheckout.php

in order to set the products name (and quantity) instead of just the order id.

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

More
14 years 11 months ago #26692 by joelstad
So, I've been working on this for a couple of hours and I've got nothing so far (other than a ton of errors in my integration console).

I've been looking at cart.php in com_hikashop/views/checkout... and I can see how the items are being listed there along with the unit price and quantity but these variables don't work in the checkout module. I'd like the quantity, product name and unit price to work correctly so it looks less suspicious during checkout but I can't figure out how to display them.

Can you give me any more hints?

Thanks in advance, I really appreciate it. I'm trying to get it on my own, just not having luck.

--Joel

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

More
14 years 11 months ago #26693 by joelstad
Oh, and I'm pretty sure changing the item name messes with
Code:
function parseResponse(&$xml) {
on line 293 later. Do I need to worry about line 307 and 308 if I change the item name?
Code:
if( preg_match('/<item-name>.* #(.*)<\/item-name>/iU', $xml, $ggreg) ) { $vars['order-num'] = trim($ggreg[1]);

--Joel

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

More
14 years 11 months ago #26697 by nicolas
You need to add the name and quantity of the products but you need to keep the order id in there.

Maybe it would be simpler to put that in the item-description.

Here is a piece of code you might wanna try (I didn't test):
$description = '';
foreach($order->cart->products as $product){
$description.=$product->order_product_quantity.' '.$product->order_product_name.'&#x3c;br/&#x3e;';
}

and then change <item-description></item-description> to <item-description>'.$description.'</item-description>

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

More
14 years 11 months ago #26773 by joelstad
Excellent, with this I was able to work through it. Here is what I changed:
Code:
$data = '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n"; $data .= '<checkout-shopping-cart xmlns="http://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>';

The last issue is, as you can see above, I had to manually set the shipping cost. Is there a way to make this dynamic as well? Other than that, it appears to be working correctly. (image attached)

Also, to support the project and support, I'll be purchasing the business version of HikaShop within the hour. Thanks again for everything!

--Joel

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

More
14 years 11 months ago #26792 by nicolas
The shipping price can be accessed in the variable:
$order->order_shipping_price

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

More
14 years 11 months ago #26809 by joelstad
Thanks!

Upgraded to essential last night and lost my changes. Realized it was essential and not business (doh) and ordered the upgrade and lost my changes again, lol. Now, I think I'm good to go. Thanks for all the help!

--Joel

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

More
14 years 11 months ago #26810 by nicolas
You might want to replace googlecheckout to something else everywhere in the files of the plugin and install that modified version so that it is not overwritten when you update HikaShop in the future.

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

Time to create page: 0.224 seconds
Powered by Kunena Forum