Page 48 of 394 FirstFirst ... 3846474849505898148 ... LastLast
Results 471 to 480 of 3932
  1. #471
    Join Date
    Dec 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by BBG View Post
    GldRush98: Glad to hear you have GCO 1.0.5 working properly! I'm sorry for not responding, I assumed I'd have Internet access over the holidays while I was away, unfortunately that was not the case

    dhan99: How I have it set up is most likely different that what you want, I currently have it set up to offer only Priority Mail shipping unless the shopping cart contains all books- then I offer Media Mail and Priority Mail as shipping options. Since I only offer a second shipping method in certain cases, I had to hack and slash my way through a few php files- and left an ugly mess.

    I'm going to check out ropu's latest fix and GldRush98's responsehandler on a fresh 1.0.5 yet this extended weekend to get multiple USPS options working w/o my hacks for Media Mail. I'll report back my progress and try my best to take notes. :)

    Shawn
    Happy New Year, Shawn. I just took a closer look at the responsehandler.php file from GldRush98 and I don't think it would work correctly. It seems to me $total_weight in process_merchant_calculation_callback() would need to be declared global in order for it to be picked up in the shipping function. Also, the $total_weight calculation assumes product_id's can be found in root/shopping-cart/items/item/merchant-item-id entry in the XML from Google, but in all the XML I've seen so far, the merchant-item-id entry simply doesn't exist and the product_id's can be found only in root/shopping-cart/merchant-private-data/product-data. Is it that Google API has changed at some point? Does anybody know? Logically one would think there should be a "merchant-item-id" inside <item>, which corresponds to product_id in ZenCart, but in reality it is simply not there. So I guess we will need to parse the ID's from product-data.
    [FONT=monospace][/FONT]

  2. #472
    Join Date
    Dec 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Ok, I wrote down the steps I took to get multiple USPS shipping options working for me. I DID NOT try it with other non-USPS shipping modules, so your mileage may vary. I should note, I tried GldRush98's responsehandler.php, but as a direct replacement, it did not work. I also tried roku's fix, but that did not work for me either.

    Here's the steps I took:
    1. Installed fresh ZC 1.3.6
    2. Installed fresh GCO 1.0.5 (overwriting any existing ZC files)
    3. Modified includes/modules/payment/googlecheckout.php
      1. Added Media Mail in array
      2. Commented out Bound Printed Material and Library
      3. Note: I moved the ")," at end of Library line to new uncommented line
    4. ZC Admin->Modules->Shipping->USPS->Install
      1. Entered in Web Tools User ID
      2. Changed Shipping methods (only left express, priority, first class, parcel and media selected)
    5. ZC Admin-> Uninstalled all other shipping modules
    6. ZC Admin->Modules->Payment->GoogleCheckout->Install
      1. Entered Merchant ID/Key
      2. Set fallback prices for shipping methods
    7. ZC Admin->Configuration->Postal Code
      1. Set Postal Code
    8. ZC Admin->Catalog->Categories/Products
      1. Added new test category and test products
    9. sandbox.google.com Admin->Settings->Integration
      1. Set API Callback URL
    10. **TEST #1**
      1. Went to new store front-end, added test product (weight was 1lb) to cart
      2. Clicked Estimate Shipping button:
        Express - $25.50
        Priority - $5.60
        Parcel Post - $5.35
        Media Mail - $3.03
      3. Clicked Google Checkout button
      4. Shipping & Handling dropdown on Google Checkout page contained:
        Express - $22.20
        First Class - $22.20
        Priority - $22.20
        Parcel Post - $22.20
        Media Mail - $22.20
      5. None of the numbers match and First Class shouldn't be available!
    11. Modified googlecheckout/responsehandler.php (line 353)
      changed:
      Code:
      global $googlepayment, $order, $db;
      to:
      Code:
      global $googlepayment, $order, $db, $total_weight;
    12. **TEST #2**
      1. Shipping & Handling dropdown NOW contains:
        Express - $25.50
        First Class - $25.50
        Priority - $25.50
        Parcel Post - $25.50
        Media Mail - $25.50
      2. At least one of the numbers match but still not right, and it's still showing First Class as available!
    13. Modified googlecheckout/responsehandler.php (lines 422-441)
      replaced:
      Code:
      if(isset($data[$root]['calculate']['shipping'])) {
      		        $shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
      		        foreach($shipping as $curr_ship) {
      		         	$name = $curr_ship['name'];
      		            
      		            //Compute the price for this shipping method and address id
      		        
      			        list($a, $method_name) = explode(': ',$name);
      		   
      			        //print_r($order);
      			        $methods_hash[$method_name][0]. $methods_hash[$method_name][2]."\n";
      		            $quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
      		            //print_r($shipping_modules);
      		            $price = $quotes[0]['methods'][0]['cost'];
      		            $shippable = "true";
      		            //if there is a problem with the method, i mark it as non-shippable
      		            if(!isset($quotes[0]['methods'][0]['cost']) || isset($quotes[0]['error'])) {
      		            	$shippable = "false";
      		            	$price = "0";
      		            }
      with:

      Code:
      if(isset($data[$root]['calculate']['shipping'])) {
      		        $shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
                              //Let's just get all the quotes at once
      		        $quotes = $shipping_modules->quote();
      		        foreach($shipping as $curr_ship) {
      		         	$name = $curr_ship['name'];
      		         	list($a, $method_name) = explode(': ',$name);
      		         	$quote_id=0;
                              // Not all methods are returned, such as First Class if
                              // weight >13oz, so need to marked as not shippable below
      					while (($quotes[0]['methods'][$quote_id]['id'] != $methods_hash[$method_name][0]) && $quote_id<count($quotes[0]['methods'])) {
      						$quote_id++;
      					}
      		         	$price = $quotes[0]['methods'][$quote_id]['cost'];
      					
      					$shippable = "true";
       					if(!isset($quotes[0]['methods'][$quote_id]['cost']) || isset($quotes[0]['error'])) {
              				$shippable = "false";
              				$price = "0";
          				}
    14. **TEST #3**
      1. Shipping & Handling dropdown NOW contains:
        Express - $25.50
        Priority - $5.60
        Parcel Post - $5.35
        Media Mail - $3.03
      2. Finally, Google Checkout matches the Zen Cart shipping estimate!


    I'm sure there's a more "programmatically correct" way to deal with it, unfortunately my PHP skills are lacking. Again, I have not tested it with other shipping modules enabled so it may not play nicely with others. Also, I didn't get a chance to try it out with tax so I'm not sure if it works with tax. I plan to have a look at that later.

    Happy New Year!

    Shawn

  3. #473
    Join Date
    Dec 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by BBG View Post
    Ok, I wrote down the steps I took to get multiple USPS shipping options working for me. I DID NOT try it with other non-USPS shipping modules, so your mileage may vary. I should note, I tried GldRush98's responsehandler.php, but as a direct replacement, it did not work. I also tried roku's fix, but that did not work for me either.

    Here's the steps I took:
    1. Installed fresh ZC 1.3.6
    2. Installed fresh GCO 1.0.5 (overwriting any existing ZC files)
    3. Modified includes/modules/payment/googlecheckout.php
      1. Added Media Mail in array
      2. Commented out Bound Printed Material and Library
      3. Note: I moved the ")," at end of Library line to new uncommented line
    4. ZC Admin->Modules->Shipping->USPS->Install
      1. Entered in Web Tools User ID
      2. Changed Shipping methods (only left express, priority, first class, parcel and media selected)
    5. ZC Admin-> Uninstalled all other shipping modules
    6. ZC Admin->Modules->Payment->GoogleCheckout->Install
      1. Entered Merchant ID/Key
      2. Set fallback prices for shipping methods
    7. ZC Admin->Configuration->Postal Code
      1. Set Postal Code
    8. ZC Admin->Catalog->Categories/Products
      1. Added new test category and test products
    9. sandbox.google.com Admin->Settings->Integration
      1. Set API Callback URL
    10. **TEST #1**
      1. Went to new store front-end, added test product (weight was 1lb) to cart
      2. Clicked Estimate Shipping button:
        Express - $25.50
        Priority - $5.60
        Parcel Post - $5.35
        Media Mail - $3.03
      3. Clicked Google Checkout button
      4. Shipping & Handling dropdown on Google Checkout page contained:
        Express - $22.20
        First Class - $22.20
        Priority - $22.20
        Parcel Post - $22.20
        Media Mail - $22.20
      5. None of the numbers match and First Class shouldn't be available!
    11. Modified googlecheckout/responsehandler.php (line 353)
      changed:
      Code:
      global $googlepayment, $order, $db;
      to:
      Code:
      global $googlepayment, $order, $db, $total_weight;
    12. **TEST #2**
      1. Shipping & Handling dropdown NOW contains:
        Express - $25.50
        First Class - $25.50
        Priority - $25.50
        Parcel Post - $25.50
        Media Mail - $25.50
      2. At least one of the numbers match but still not right, and it's still showing First Class as available!
    13. Modified googlecheckout/responsehandler.php (lines 422-441)
      replaced:
      Code:
      if(isset($data[$root]['calculate']['shipping'])) {
                      $shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
                      foreach($shipping as $curr_ship) {
                           $name = $curr_ship['name'];
                          
                          //Compute the price for this shipping method and address id
                      
                          list($a, $method_name) = explode(': ',$name);
                 
                          //print_r($order);
                          $methods_hash[$method_name][0]. $methods_hash[$method_name][2]."\n";
                          $quotes = $shipping_modules->quote($methods_hash[$method_name][0], $methods_hash[$method_name][2]);
                          //print_r($shipping_modules);
                          $price = $quotes[0]['methods'][0]['cost'];
                          $shippable = "true";
                          //if there is a problem with the method, i mark it as non-shippable
                          if(!isset($quotes[0]['methods'][0]['cost']) || isset($quotes[0]['error'])) {
                              $shippable = "false";
                              $price = "0";
                          }
      with:

      Code:
      if(isset($data[$root]['calculate']['shipping'])) {
                      $shipping = get_arr_result($data[$root]['calculate']['shipping']['method']);
                              //Let's just get all the quotes at once
                      $quotes = $shipping_modules->quote();
                      foreach($shipping as $curr_ship) {
                           $name = $curr_ship['name'];
                           list($a, $method_name) = explode(': ',$name);
                           $quote_id=0;
                              // Not all methods are returned, such as First Class if
                              // weight >13oz, so need to marked as not shippable below
                          while (($quotes[0]['methods'][$quote_id]['id'] != $methods_hash[$method_name][0]) && $quote_id<count($quotes[0]['methods'])) {
                              $quote_id++;
                          }
                           $price = $quotes[0]['methods'][$quote_id]['cost'];
                          
                          $shippable = "true";
                           if(!isset($quotes[0]['methods'][$quote_id]['cost']) || isset($quotes[0]['error'])) {
                              $shippable = "false";
                              $price = "0";
                          }
    14. **TEST #3**
      1. Shipping & Handling dropdown NOW contains:
        Express - $25.50
        Priority - $5.60
        Parcel Post - $5.35
        Media Mail - $3.03
      2. Finally, Google Checkout matches the Zen Cart shipping estimate!

    I'm sure there's a more "programmatically correct" way to deal with it, unfortunately my PHP skills are lacking. Again, I have not tested it with other shipping modules enabled so it may not play nicely with others. Also, I didn't get a chance to try it out with tax so I'm not sure if it works with tax. I plan to have a look at that later.

    Happy New Year!

    Shawn
    Yep, it seems to work correctly for me as well. Thanks very much for the detailed explanation. (And it is simpler to get $total_weight from _SESSION, as it is done in original v1.0.5 Google Checkout code, instead of trying to calculate from google XML.)

  4. #474
    Join Date
    Dec 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    I was hoping international shipping would work, but no. If address in buyer's google checkout account is not US location (I tried a UK address), when reaching the google checkout page there will be an error message saying "XXXX online store does not ship to this address." This is true even if I set to use flat rate only.

    So does that mean international buyers cannot really use Google Checkout?

  5. #475
    Join Date
    Dec 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by dhan99 View Post
    I was hoping international shipping would work, but no. If address in buyer's google checkout account is not US location (I tried a UK address), when reaching the google checkout page there will be an error message saying "XXXX online store does not ship to this address." This is true even if I set to use flat rate only.

    So does that mean international buyers cannot really use Google Checkout?

    I just tried some bigger companies that use Google Checkout and found none of them seem to ship to that UK address (I am pretty sure that address itself is valid):

    • General Nutrition Centers does not ship to this address.
    • Buy.com does not ship to this address.
    • PETCO Animal Supplies, Inc. does not ship to this address.
    • Toys"R"Us & Babies"R"Us does not ship to this address.

    So is this a current Google Checkout limitation, despite their claim that "Google Checkout merchants can ship goods inside and outside the United States."? (see https://checkout.google.com/support/...871&topic=8664)

  6. #476
    Join Date
    May 2006
    Location
    Texas
    Posts
    565
    Plugin Contributions
    4

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by dhan99 View Post
    I just tried some bigger companies that use Google Checkout and found none of them seem to ship to that UK address (I am pretty sure that address itself is valid):

    • General Nutrition Centers does not ship to this address.
    • Buy.com does not ship to this address.
    • PETCO Animal Supplies, Inc. does not ship to this address.
    • Toys"R"Us & Babies"R"Us does not ship to this address.

    So is this a current Google Checkout limitation, despite their claim that "Google Checkout merchants can ship goods inside and outside the United States."? (see https://checkout.google.com/support/...871&topic=8664)
    Try a canadian address - I'm sure they ship to Canada at least

  7. #477
    Join Date
    Dec 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by samad64 View Post
    Try a canadian address - I'm sure they ship to Canada at least
    Nope. Tried a Canadian address and still got the same thing. I think those shops would gladly ship to Canadian addresses if the buyer choose one of their traditional checkout methods, not the fancy Google checkout. I guess it is a limitation for the time being. See http://code.google.com/apis/checkout...ationalization

    Maybe the limitation is such that if there is any shipping related tag in the initial shopping cart posted to google, and if the destination address (from buyer's Google account) is non-US, the buyer will see that "does not ship to this address" error. But what about flat-rate? What's the reason even a flat-rate cannot work for shipping outside US? I hope somebody can show us a work-around, such as flat international rate for all non-US destinations and USPS/Fedex/UPS for domestic ones....but on second thought, that probably won't work either (if my understanding of this limitation is correct): as long as shipping costs depend on ship-to address in any way, we are going to run into the same wall. So, can we reach the conclusion: if you want to ship outside the US, you cannot use Google Checkout?

  8. #478
    Join Date
    Dec 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by dhan99 View Post
    Maybe the limitation is such that if there is any shipping related tag in the initial shopping cart posted to google, and if the destination address (from buyer's Google account) is non-US, the buyer will see that "does not ship to this address" error. But what about flat-rate? What's the reason even a flat-rate cannot work for shipping outside US? I hope somebody can show us a work-around, such as flat international rate for all non-US destinations and USPS/Fedex/UPS for domestic ones....but on second thought, that probably won't work either (if my understanding of this limitation is correct): as long as shipping costs depend on ship-to address in any way, we are going to run into the same wall. So, can we reach the conclusion: if you want to ship outside the US, you cannot use Google Checkout?
    The workaround for international shipping appears to be to find out BEFORE the customer clicks the Google Checkout where it's being shipped to. If it's a non-US address, add the shipping fee as a shopping cart item and omit the shipping-methods block from the XML sent to Google Checkout.

  9. #479
    Join Date
    Dec 2006
    Posts
    20
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by BBG View Post
    The workaround for international shipping appears to be to find out BEFORE the customer clicks the Google Checkout where it's being shipped to. If it's a non-US address, add the shipping fee as a shopping cart item and omit the shipping-methods block from the XML sent to Google Checkout.
    Yep, we could add a checkbox right underneath the Google Checkout button (if it is enabled), with a label saying "Check this box if you are shipping outside U.S.". And get some javascript in there so that the action of checking that box would trigger what you just said --constructing a new shopping cart with the shipping-methods block taken out and an additional shipping fee item added.

  10. #480
    Join Date
    Dec 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Google Checkout module for Zen Cart (beta)

    Quote Originally Posted by dhan99 View Post
    Yep, we could add a checkbox right underneath the Google Checkout button (if it is enabled), with a label saying "Check this box if you are shipping outside U.S.". And get some javascript in there so that the action of checking that box would trigger what you just said --constructing a new shopping cart with the shipping-methods block taken out and an additional shipping fee item added.
    I was thinking of prompting the user when they first add an item to the shopping cart, something like "Please enter your shipping location so we can calculate shipping costs". Although, I'm not sure if that would violate Google's TOS. As a bonus, for US addresses, you could also send Google the calculated shipping values (instead of the fallback guesstimates) if you knew where it was being shipped to- although I've never seen the live callback timeout yet <knock on wood>.

 

 

Similar Threads

  1. v155 BETA feedback for Responsive-Classic in v155-beta
    By picaflor-azul in forum Addon Templates
    Replies: 51
    Last Post: 5 Mar 2016, 09:14 PM
  2. Google Checkout module support for ZC 1.5.0?
    By Woodymon in forum Addon Payment Modules
    Replies: 2
    Last Post: 21 Jan 2012, 03:18 AM
  3. Google Checkout - is there a module for 1.3.9g?
    By cchan in forum Addon Payment Modules
    Replies: 0
    Last Post: 9 Jan 2011, 05:04 AM
  4. Update Google Checkout Module or Custom Google Checkout?
    By pacificmanagment in forum Addon Payment Modules
    Replies: 1
    Last Post: 24 May 2010, 09:40 AM
  5. Replies: 1
    Last Post: 31 May 2009, 02:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR