Post by Dusty » Wed Sep 01, 2010 12:10 am

Hi
I'm trying to install GC on v 1.4.9 on a local test site using a GC module designed for v 1.4.8. All appears well except I get the following error when I click the GC button on the site:

Fatal error: Call to undefined function curl_init() in C:\wamp\www\system\google\library\googlerequest.php on line 610
Can anyone tell me what I have to do to correct this?? I would like to use v 1.4.9 but if its not compatible I'll have to go with v 1.4.8
All & any help appreciated.

Newbie

Posts

Joined
Wed Sep 01, 2010 12:00 am

Post by Xsecrets » Wed Sep 01, 2010 1:05 am

curl_init is not an opencart function it's a php function. Sounds like you don't have curl compiled with your php. In this case it won't matter what version you go with. And a large percentage of the payment modules use curl so you really need it.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Dusty » Wed Sep 01, 2010 2:13 am

Thanks for your help. Turned curl on in PHP extensions and that seems to have sorted the problem. Thanks again for your prompt assistance.

Newbie

Posts

Joined
Wed Sep 01, 2010 12:00 am

Post by kathlk » Tue Dec 07, 2010 10:32 pm

Hi All,

Shipping get £0 cost always:
========================
I have setup latest GC with API 2.5 - v 1.4.9. But still I’m not getting correct shipping amount in the GC. When I looked at to GC integration consol, below error exist per each checkout call.

Error in GC log:
=============
Merchant Calculations: We were looking for data in your merchant-calculation-results, but were not able to find it: result: address-id:146020686898590 shipping-name: Flat Rate

<?xml version="1.0" encoding="utf-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
<results>
<result shipping-name="Flat Rate" address-id="623679875976966">
<shipping-rate currency="GBP">105</shipping-rate>
<shippable>true</shippable>
</result>
</results>
</merchant-calculation-results>

<?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="04a687c1-591b-4be5-8e90-7b08a4e0438d">
<shopping-cart>
<merchant-private-data>
<reference>b035fca4d44d17fba70c5a64d83197c1</reference>
<currency>GBP</currency>
<language-id>1</language-id>
</merchant-private-data>
<items>
<item>
<item-weight value="2.2046" unit="LB" />
<tax-table-selector>Taxable Goods</tax-table-selector>
<item-name>Test Model:Test product</item-name>
<item-description>product #352</item-description>
<unit-price currency="GBP">0.1</unit-price>
<quantity>1</quantity>
<merchant-item-id>352</merchant-item-id>
</item>
</items>
</shopping-cart>
<buyer-id>905281438866203</buyer-id>
<calculate>
<addresses>
<anonymous-address id="146020686898590">
<country-code>GB</country-code>
<city>Flackwelheath</city>
<region>BUCKS</region>
<postal-code>HP101GG</postal-code>
</anonymous-address>
<anonymous-address id="623679875976966">
<country-code>GB</country-code>
<city>Heath</city>
<region>BUCKINGHAMSHIRE</region>
<postal-code>HP109JN</postal-code>
</anonymous-address>
</addresses>
<shipping>
<method name="Flat Rate" />
</shipping>
<tax>false</tax>
<merchant-code-strings />
</calculate>
<buyer-language>English</buyer-language>
</merchant-calculation-callback>

Any thoughts would be appriciated!

Thanks
-kathlk-

New member

Posts

Joined
Sun Jun 08, 2008 3:07 pm
Location - London UK

Post by JNeuhoff » Fri Dec 10, 2010 7:08 pm

Please don't do double-posting on this forum!

Anyway, I am unable to reproduce your error, the Free Shipping method works fine on my test server. If you send me a PM with your Opencart admin and FTP login details then I can take a look at it and test it with my sandbox accounts.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kathlk » Mon Dec 13, 2010 1:44 am

Sorry I didn't noticed this double posting issue.

Thanks for your reply. Finally I found the problem in the checkout module.

The reason is my Google checkout page had more than one address. Google expecting shipping result per each address.

The error "Merchant Calculations: We were looking for data in your merchant-calculation-results, but were not able to find it: result: address-id:146020686898590 shipping-name: Flat Rate" because of open cart module only return shipping for one address.

The missing shipping is corresponds to the address which has the region "BUCKS". If I change the region to "BUCKINGHAMSHIRE", then it works. So there is possibility of specify short region name in UK. So this could be a problem?

So as a quick fix I added below lines to shipping calculation.

OLD:
if (!isset($address['zone_id'])) {
continue;
}

NEW:
if (!isset($address['zone_id'])) {
$merchant_result = new GoogleResult($curr_id);
$merchant_result->SetShippingDetails('Flat Rate', 0, 'false');
$merchant_calc->AddResult($merchant_result);
continue;
}

So is this something missing in the checkout module or Am I missing something in the Google configuration (Sellers Account)?

Thanks
kath
Last edited by kathlk on Mon Dec 13, 2010 5:13 am, edited 1 time in total.

New member

Posts

Joined
Sun Jun 08, 2008 3:07 pm
Location - London UK

Post by kathlk » Mon Dec 13, 2010 2:17 am

Hi Neuhoff,

Thanks for your help regarding this GC module. I really appreciate it.

Q:
After the completion of Google checkout and successful returns to the Open cart, What we can see?

- We can see the cart is empty.
- But Do we create a corresponding order in open-cart too? I mean can we see the order in our dashboard?

What's the real reason for maintaining temp Google order in open-cart tables?

Thanks,
kath

New member

Posts

Joined
Sun Jun 08, 2008 3:07 pm
Location - London UK

Post by JNeuhoff » Wed Dec 15, 2010 12:51 am

About your proposed Google Checkout fix in file catalog/controller/checkout/gcheckout.php:

Use something like this in method callback:

Code: Select all

					....
					if ( (!isset($address['country_id'])) || (!isset($address['zone_id'])) ) {
						$merchant_result = new GoogleResult($curr_id);
						$merchant_result->SetShippingDetails($curr_ship['name'], 0.00, 'false');
						$merchant_calc->AddResult($merchant_result);
						continue;
					}
					....

As regards the order fulfillment: This has to be done via the Google Checkout merchant account, as the orders are only stored on Google, not in Opencart, this being a genuine guest checkout, without having the customer to enter his address and shipping details on Opencart, he only does it once on the Google Checkout payment gateway.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kathlk » Wed Dec 15, 2010 1:04 am

Thanks Neuhoff, This make sense!

New member

Posts

Joined
Sun Jun 08, 2008 3:07 pm
Location - London UK

Post by JNeuhoff » Wed Dec 15, 2010 5:55 am

In fact, I have now added this fix to the Google Checkout module and uploaded it to Opencart's extensions section, as well as to my own website.

Thanks again for bringing it to my attention.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kathlk » Fri Dec 17, 2010 7:24 pm

Continuing with the Google checkout module. I also found below issue. May be this might be useful as well?
Google recommending specifying default shipping cost for all shipping methods. This is because if the callback failed for some reason then Google would not charge any shipping and result is seller losing shipping cost.

I have found this as a issue when slow HTTPS request or bugs in shipping callback for some reason.

So below code helped seller to specify default shipping cost for Google in a case shipping call back fails.

Code: Select all

Existing:
$shipping = new GoogleMerchantCalculatedShipping( $names[$code], 0);

Recommending:
$shipping = new GoogleMerchantCalculatedShipping( $names[$code], config->get('gcheckout_merchant_default_shipping'));
In the admin configuration we can keep Google default shipping cost.
But I didn't test with different currencies as I use single currency in my test case.

Hope this will useful unless specified different solution.

Thanks
kath

New member

Posts

Joined
Sun Jun 08, 2008 3:07 pm
Location - London UK

Post by kathlk » Fri Dec 17, 2010 7:30 pm

Hi Neuhoff,

I have seen the coupon functionality of the Google checkout module is commented out? Any thoughts when this can available?

I have just remove commented lines in shipping callback and also updated below block in request to allow google to display Coupon box in the G cart.

Code: Select all

$cartGoogle->SetMerchantCalculations( $url , "false", "true", "true"); 
But still I cannot see Google displaying the coupon box in sandbox. If you have any comments I would really appreciate.

Thanks

New member

Posts

Joined
Sun Jun 08, 2008 3:07 pm
Location - London UK

Post by JNeuhoff » Tue Dec 21, 2010 7:58 am

In order to support coupons, the callback method must actually provide the coupon data for the products during the merchant-calculation-callback, too. As far as I know, Opencart can apply a coupon to the subtotal, whereas in Google it might be different, I have to study up on its documentation for this.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Tue Dec 21, 2010 8:16 am

OK, according to Google's documentation, coupons are only supported for US-based merchants, not for UK merchants. Other than that, all the callback really has to do is to get the coupon value, received from Google, then check it against the list of valid coupons from the Opencart database and apply the same coupon rules as with a regular Opencart checkout. The devil here is in the details, especially when we have to replicate all the coupon rules in the Google Checkout callback method.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by developer » Thu Feb 03, 2011 6:25 am

I'm also having shipping problem with GC. Can you check that please?
http://forum.opencart.com/viewtopic.php?f=20&t=26599

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by hellogoodbye » Wed May 04, 2011 5:18 pm

When checking out with Google Checkout, does the stock and order history in OpenCart get updated? I did a test order using sandbox and it didn't.

New member

Posts

Joined
Wed May 04, 2011 6:33 am

Post by JNeuhoff » Wed May 04, 2011 6:13 pm

hellogoodbye wrote:When checking out with Google Checkout, does the stock and order history in OpenCart get updated? I did a test order using sandbox and it didn't.
The product stocks are updated. However, no orders nor order history are stopred in Opencart. Order fulfilment has to be done via the Google account.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by everlaster03 » Thu May 12, 2011 8:53 am

I have the mod installed, but when I add a item to the cart it sais "Not available for thies items". The entire mod box grey's out also. what did i miss?

Newbie

Posts

Joined
Thu May 12, 2011 8:50 am

Post by JNeuhoff » Fri May 13, 2011 12:53 am

Check your Opencart's system/log/error.txt log file, it should have some more details as to why your products aren't accepted for Google Checkout.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by everlaster03 » Fri May 13, 2011 5:37 am

I got it thank you. My "user" didn't have an address. Why this would effect the google checkout I don't know but it seems to work now.

Newbie

Posts

Joined
Thu May 12, 2011 8:50 am
Who is online

Users browsing this forum: No registered users and 5 guests