Page 1 of 6 123 ... LastLast
Results 1 to 10 of 60
  1. #1
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Shipping Module Programming Question about weight and free shipping

    I would like to identify if a customer is a USA customer in shipping.php to make a decision on whether or not to add the Free Shipping weight back to $total_weight. Can someone direct me to the correct variable that would allow me to do this?

    Something to the effect of:

    if (USA customer)
    $total_weight -= $_SESSION['cart']->free_shipping_weight();
    else
    $total_weight += $_SESSION['cart']->free_shipping_weight();

    Thanks.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping Module Programming Question

    Did you look at your original post and read the post that I just posted for reference?
    http://www.zen-cart.com/forum/showth...75#post1050375

    NOTE: if you continue to have problems, please respond to this post so we can work on your specific issues ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    Thanks for the reply. This looks like the thing I wanted to do. The only question I have is how or where are the valid_zone_id's defined? I would like have free shipping to all 50 states + DC.

    I assume that I would need to make similar changes to the UPS module as done for the USPS module to have both options?

    Out of curiosity, was the way I was wanting to go about this not going to work or not the right way to do it? The reason I ask is that it seemed to work when testing by changing shipping.php and adding items either as a USA customer or changing shipping.php and adding items as a non-USA customer.

    Thanks.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping Module Programming Question

    To make Always Free Shipping only work for the US 50+ States ... you would first want to make sure it works with the USPS shipping as described in post #11 ...

    If so, then you would need to adapt that code to UPS if you are also using that shipping module ...

    Have you tried the customization on the USPS shipping module:
    /includes/modules/shipping/usps.php

    and the Shipping class file:
    /includes/class/shipping.php

    If so, is the USPS shipping module working correctly?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    Is the $valid_zone_id the number found in the geo_zone_id in table zones_to_geo_zones?

  6. #6
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    I seemed to have answered my question from above. Now, I've implemented to changes but I need to do one more thing. I still need to show all of the shipping options with the actual weight used in the calculations even though Free Shipping is enabled to allow the customer the opportunity to select a faster option if they want. For Free Shipping, we will select the most cost effective method whereas the customer may want to use Express and pay the additional cost. How would I implement this option?

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping Module Programming Question

    What is the full goal here?

    Do you want All US Customers to get Free Shipping plus the regular shipping methods and non-US to get just the regular shipping methods?

    What shipping modules do you have installed?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    Exactly. This way the customer gets to make the shipping choice that best fits their situation. My installed modules are Free Shipping, USPS, and UPS.

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shipping Module Programming Question

    Does the US always get the Free Shipping Option regardless of Products in the cart?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Apr 2011
    Posts
    80
    Plugin Contributions
    0

    Default Re: Shipping Module Programming Question

    No. Only the products marked as Always Free Shipping for USA customers have that option. Everything else should add the associated weight to the total.

 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. upgrade question about Payment and shipping module: notice
    By icikite in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 20 Jan 2013, 11:08 PM
  2. Replies: 14
    Last Post: 11 Jun 2012, 05:39 AM
  3. Replies: 2
    Last Post: 8 Jul 2010, 09:46 PM
  4. Free shipping item weight calculated wrongly for non valid free shipping zone
    By firehorse in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 28 Oct 2006, 05:39 PM
  5. Question about COD Fee and DHL Shipping module
    By rkeppert in forum Addon Shipping Modules
    Replies: 7
    Last Post: 2 Sep 2006, 01:36 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