- Regards to editing /modules/payment/googlecheckout.php
a. Made the edits as "hinted" by Doug for me to try out in this post:
http://www.zen-cart.com/forum/showpost.php?p=353165&postcount=1006
Inserting code into both mc_ array lists:
mc_shipping_methods = array()
mc_shipping_methods_names = array()
b. After the edits above I observed in Modules > Payment > Google Checkout configuration under "Default Values for Real Time Shipping Rates":
Per Item International
Per Item National
0 Per Item National
And noted a new form field adjacent to "Per Item National" with the number 0 displayed. But I have no idea as to it's function ;-). But there was no corresponding form field for "Per Item International". Strange, huh?
c. I then submitted another order to Google Checkout and observed same error as previous.
<error-message>Duplicate shipping name FREE SHIPPING! found.</error-message>
- So for "testing" purposes I altered edited code in googlecheckout.php to:
'itemnational' => array(
'domestic_types' =>
array(
'itemnational' => 'Per Item National'
),
'international_types' =>
array(
'itemnational' => 'Per Item National'
),
),
'iteminternational' => array(
'domestic_types' =>
array(
'iteminternational' => 'Per Item International'
),
'international_types' =>
array(
'iteminternational' => 'Per Item International'
),
)
Note I added a domestic and international type for each array entry. Probably not correct but thinking maybe nothing in each array might be a problem and wanted to observe the effect of changing (won't hurt testing, afte all I'm playing in the sandbox).
And left in the following previously inserted code in mc_shipping_methods_names = array()
'itemnational' => 'Media Mail',
'iteminternational' => 'Air Mail',
And after making the above edits, I uninstalled the payment module and then reinstalled. I then observed under "Default Values for Real Time Shipping Rates" one form field for each of the following entry:
iteminternationaliteminternational_VD:0,
itemnationalitemnational_VD:0
Not sure what the _VD:0 indicates.
And each form field displayed the numeral zero by default. Again I do not understand what this value represents.
And quite certain this config is not correct.
And to test the theory I then added an item to my shopping cart and submitted order to Google Checkout. But same error as previous.
<error-message>Duplicate shipping name FREE SHIPPING! found.</error-message>
So still at a loss on how to edit googlecheckout.php to match my needs. And I think this exercise might be barking up the wrong tree? (see points 6 and 7 below).
- I have only three shipping modules installed:
- freeshipper
- iteminternational
- itemnational
-
Previously I did not have to worry about the sort order for the three ship modules. All were set for sort order 0 and everything still worked. But just in case I applied sort order of 3 to freeshipper and 1 and 2 to the other two respectively. Not sure if this makes any diff?
-
As a follow-up to Doug's question. In googlecheckout.php I do not observe any 'extra' FREE SHIPPING array entries in the mc_shipping_methods array. I do see one 'freeshipper' and one 'freeoptions'. Same observation applies to mc_shipping_methods_names array.
Related question: What does mc_ represent in the two array names?
-
And following up on something else Doug mentioned, editing the mc_ array code in googlecheckout.php may not be required in my situation since I'm not connecting to any third party shipper and thus no need for "real time shipping rates"?
-
However further down in googlecheckout.php I observe some commented out function code that I'm thinking now applies to my situation.
function getShippingType()
function getShippingPrice()
I have to think about this more thoroughly. And still need to follow-up on a more recent shipping configuration suggestion from Isaac.
Appreciate all the contributed ideas thus far. Keep 'em coming :wink2:
Thanks,
Woody