Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    Default Free shipping code for US only Help

    I have set up a free shipping code but I only want it to be for US ground shipping only How can I set this up. People have been getting free shipping for 2 day and world ship.

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

    Default Re: Free shipping code for US only Help

    The Discount Coupons for Free Shipping only make the Shipping Free by crediting the selected shipping cost to offset it ... it isn't really setting a value ...

    You could, however, customize the code to force a change on the selected shipping so that the Free Shipping offered by the Discount Coupon will appear to be the ground shipping or what have you ...
    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!]
    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
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Free shipping code for US only Help

    Found a cheat for this ... might even work for you ...

    Assuming you are wanting UPS Ground on Discount Coupons that offer Free Shipping ...

    Edit the Order Total module for Discount Coupon ot_coupon.php and change it to read:
    Code:
      function process() {
        global $order, $currencies, $db;
    
    // bof: force UPS ground shipping on Free Shipping
    if ($_SESSION['cc_id'] > 0) {
          $sql = "select coupon_id, coupon_amount, coupon_type, coupon_minimum_order, uses_per_coupon, uses_per_user,
                  restrict_to_products, restrict_to_categories, coupon_zone_restriction, coupon_code
                  from " . TABLE_COUPONS . "
                  where coupon_id= :couponIDEntered
                  and coupon_active='Y'";
          $sql = $db->bindVars($sql, ':couponIDEntered', $_SESSION['cc_id'], 'string');
    
          $coupon_result=$db->Execute($sql);
    
      if ($coupon_result->fields['coupon_type'] == 'S') {
        if ($_SESSION['shipping']['id'] != 'ups_GND') {
          $_SESSION['shipping']['id'] = 'ups_GND';
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL', true, false));
        }
      }
    }
    // eof: force UPS ground shipping on Free Shipping
    
        $order_total = $this->get_order_total();
    What this does is if any other shipping is selected besides ups_GND, it will loop back to the checkout_shipping and have the shipping changed to UPS Ground ... when there is a Discount Coupon that is set for Free Shipping ...

    NOTE: You can do other customizations to make this more elequent, or add a message for this, or make shipping modules disappear, or other choices disappear etc. ... depending on how much work you want to put into this ...
    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!]
    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!

  4. #4
    Join Date
    Jul 2005
    Location
    Brooklyn NY
    Posts
    507
    Plugin Contributions
    0

    Default Re: Free shipping code for US only Help

    Thanks for the help I am new to the programming of znecart but I am willing to learn. How would I make it for us shipping only?

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

    Default Re: Free shipping code for US only Help

    That will physically force the UPS to change to UPS Ground regardless of what they pick when the Discount Coupon has Free Shipping set ...

    They can change it to a higher method as many times as they want to, but it will keep reverting to UPS Ground when that Discount Coupon is set with the Free Shipping ...

    If they don't like it, they can remove the Discount Coupon by entering: remove and take the shipping that they want ...

    If they try to re-add the Discount Coupon, it will again switch it to UPS Ground ...
    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!]
    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!

 

 

Similar Threads

  1. free shipping for USA only for $50+ suddenly gives free shipping to UAE....
    By simpledomaining in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 18 Jun 2013, 06:32 PM
  2. Prompt to qualify for Free Shipping - code help please!
    By Scott_C in forum General Questions
    Replies: 6
    Last Post: 20 Feb 2011, 07:39 AM
  3. Free Shipping for People with Discount Code
    By LandonHell in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 6 Apr 2007, 06:09 AM
  4. Using text area for free shipping code
    By squirrel in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Mar 2007, 05:11 PM

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