Re: Google Checkout module for Zen Cart (beta)
I recently installed the google-checkout-zencart-v1.2RC3. When the cart is empty, I get the following error message at the bottom of my shopping cart page:
Fatal error: Cannot redeclare selfurl() (previously declared in /public_html/crm/shop/googlecheckout/gcheckout.php:38) in /public_html/crm/shop/googlecheckout/gcheckout.php on line 37
I looked up the selfurl string in developer's toolkit, but could not find it. Looking at the gcheckout.php I commented out the selfURL function call at line 37 and the curly bracket at line 42. See my change below. Will this change break my google checkout install? BTW, doing this removed the above error from that page. Now I can't get my checkout button to show up on the checkout page. I will go back and read up on the button issue since it appears there are some posts here related to that.
PHP Code:
require_once('admin/includes/configure.php');
require('includes/languages/' . $_SESSION['language'] . '/' .'modules/payment/googlecheckout.php');
require_once('includes/modules/payment/googlecheckout.php');
//function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
// }
Thanks,
BlumCafe
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
blumcafe
I recently installed the google-checkout-zencart-v1.2RC3. When the cart is empty, I get the following error message at the bottom of my shopping cart page:
Fatal error: Cannot redeclare selfurl() (previously declared in /public_html/crm/shop/googlecheckout/gcheckout.php:38) in
/public_html/crm/shop/googlecheckout/gcheckout.php on line
37
I looked up the selfurl string in developer's toolkit, but could not find it. Looking at the gcheckout.php I commented out the selfURL function call at line 37 and the curly bracket at line 42.
See my change below. Will this change break my google checkout install? BTW, doing this removed the above error from that page. Now I can't get my checkout button to show up on the checkout page. I will go back and read up on the button issue since it appears there are some posts here related to that.
PHP Code:
require_once('admin/includes/configure.php');
require('includes/languages/' . $_SESSION['language'] . '/' .'modules/payment/googlecheckout.php');
require_once('includes/modules/payment/googlecheckout.php');
//function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
// }
Thanks,
BlumCafe
Blum
nono, thats an error, if you comment, you should comment the whole function, not just the declaration :P
if you do so, the body of it will be part of the script an alter the sequence of the program.
ropu
Re: Google Checkout module for Zen Cart (beta)
I installed GC 1.2rc3 on my zc1.3.7 everything works with no errors, except the shipping rates, for some reson i cannot get the actual UPS, FedEx or USPS rates to shgow up on google checkout pages...
if i set prices in admin they will show, even those that i don't need or use so i have about 15 shipping methods to chose from but none are the acctual rates as on site.
is this something that hasn't been fixed or is it something i didn't install the right way?
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
Blum
nono, thats an error, if you comment, you should comment the whole function, not just the declaration :P
if you do so, the body of it will be part of the script an alter the sequence of the program.
ropu
Ok. so I should comment out everything like so?
PHP Code:
/* function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
// }
*/
There is another reference to the selfURL further down in the code. Will doing this above affect that function call?
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
BlessIsaacola
Ropu,
any response to the above post? GCV1.2RC3 does not work when Taxable Good is enable. please read the above scenarios for recreating the rror.
Thanks!
Bless, thanks for your feedback, i think i found the bug
I was using a different way to find out If there are multiple shipping options selected and they use different shipping tax tables or some dont use tax tables.
I was comparing count(DV) instead of count(shipping providers), its a bug from the time i added Merchant calculations.
Thanks again.
change this in googlecheckout/gcheckout.php line 431
PHP Code:
if(sizeof($tax_class_unique) == 1 &&
sizeof($options) == sizeof($tax_class)) {
for
PHP Code:
if(sizeof($tax_class_unique) == 1 &&
sizeof($module_info) == sizeof($tax_class)) {
and
change this in googlecheckout/gcheckout.php line 469
PHP Code:
if(sizeof($tax_class_unique) > 1 ||
(sizeof($tax_class_unique) == 1 &&
sizeof($options) != sizeof($tax_class) )) {
$googlepayment->variant = "disabled";
$current_checkout_url = selfURL();
}
for
PHP Code:
if(sizeof($tax_class_unique) > 1 ||
(sizeof($tax_class_unique) == 1 &&
sizeof($module_info) != sizeof($tax_class) )) {
$googlepayment->variant = "disabled";
$current_checkout_url = selfURL();
}
im updating the SVN, and later the RC
and issa, please tell us if this worked for you.
ropu
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
Alik
I installed GC 1.2rc3 on my zc1.3.7 everything works with no errors, except the shipping rates, for some reson i cannot get the actual UPS, FedEx or USPS rates to shgow up on google checkout pages...
if i set prices in admin they will show, even those that i don't need or use so i have about 15 shipping methods to chose from but none are the acctual rates as on site.
is this something that hasn't been fixed or is it something i didn't install the right way?
Hi alik
that is the time out issue that is not completely solved. Not any install error, try using the Multisocket feature, You can set it from the Admin UI.
ropu
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
blumcafe
Ok. so I should comment out everything like so?
PHP Code:
/* function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
// }
*/
There is another reference to the selfURL further down in the code. Will doing this above affect that function call?
yes it should, but i can tell you way, that function is already declared. i think your installation is mixed or not fully v1.2. Or you have a other contribution with the same function name.
im adding to the TODO list,
- add "gc_" to all GC internal functions
ropu
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
yes it should, but i can tell you way, that function is already declared. i think your installation is mixed or not fully v1.2. Or you have a other contribution with the same function name.
im adding to the TODO list,
- add "gc_" to all GC internal functions
ropu
Ropu,
Not sure I understand. I had 1.0.4r installed before. I reversed modifications by 1.0.4r before I installed 1.2RC3. I guess I can go back through the install docs for 1.2RC3 to make sure everything is ok. Also, I have seen mention here of a GC 1.5. What is that? Is it another checkout module version for GC? If so, where is it located? I want to make sure I am using most up to date version.
Thanks
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
jhaase83
Ok. I already have all this so I went in and changed what it said to change in the files.
This did not make since sorry.
What I meant. I have the folders you where taling about already. I went into them and changed what the instructions said to change. DO I need to just replace them all. I think they are there for Paypal. Which I am not going to use. Unless I just can not get this to work at all.
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
ropu
Hi alik
that is the time out issue that is not completely solved. Not any install error, try using the Multisocket feature, You can set it from the Admin UI.
ropu
did the above and now i get a message on GC Sandbox page
Quote:
"My_Store Does not ship to this address"
tried a few diff. addresses non work.
-did i miss anything else ?