Results 1 to 7 of 7
  1. #1
    Join Date
    May 2012
    Posts
    137
    Plugin Contributions
    0

    Default Free Shipping for cheapest option only

    Is there a way to create a coupon that allows free shipping but for the cheapest option only. Currently I allow a few shipping options and I want to create a coupon for free shipping. But I only want the customer to be able to use the cheapest option.

    Thanks
    Corey

  2. #2
    Join Date
    Aug 2011
    Posts
    6
    Plugin Contributions
    0

    Default Re: Free Shipping for cheapest option only

    I wanna know as well. Did you find the answer?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Free Shipping for cheapest option only

    Judging from the titles of the posts listed below in the "Similar Threads" section I'm guessing one of those probably contains an answer.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    May 2012
    Posts
    137
    Plugin Contributions
    0

    Default Re: Free Shipping for cheapest option only

    ryguylivinlife - I never could find the answer. I ended up only providing the cheapest shipping option, when I was running the free shipping promotion. It;s not the way I would like to do it, but I could never figure it out.

    DrByte - The "Similar Threads" below do not seem to answer my question. I did a lot of searching on here before I asked the question and it seemed like the only threads that had were asking this question, were never answered.

    If anyone finds out the answer to this, it would be greatly appreciated.

    Thanks
    Corey

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

    Default Re: Free Shipping for cheapest option only

    What shipping module(s) do you normally run on your site?

    What shipping module or shipping method are you trying to use for the "cheapest" when you are giving Free Shipping via a coupon?
    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!

  6. #6
    Join Date
    May 2012
    Posts
    137
    Plugin Contributions
    0

    Default Re: Free Shipping for cheapest option only

    I only use USPS shipping module. For domestic shipping I give the option of first class, priority, or express mail. I currently have a free shipping coupon with any order so I removed express mail as an option until I stop the promotion.

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

    Default Re: Free Shipping for cheapest option only

    You could try this by adding the code in RED by editing the file:
    /includes/modules/pages/checkout_payment/header_php.php

    Code:
    $order_total_modules->collect_posts();
    $order_total_modules->pre_confirmation_check();
    
    // bof: change shipping for free shipping discount coupon
      $chk_coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_id = '" . (int)$_SESSION['cc_id'] . "'");
    //echo 'Coupon ORIGINAL $_SESSION[shipping][id]: ' . $_SESSION['shipping']['id'] . '<br>';
      if ($chk_coupon->fields['coupon_type'] == 'S' or $chk_coupon->fields['coupon_type'] == '0') {
    //echo 'Discount Coupon: Free Shipping! Country: ' . $order->delivery['country']['id'] . ' $_SESSION[shipping][id]: ' . $_SESSION['shipping']['id'] . '<br>';
    //echo '<pre>'; echo var_dump($_SESSION['shipping']); echo '</pre>';
        if ($order->delivery['country']['id'] == '223') {
          if ($_SESSION['shipping']['id'] != 'usps_PRIORITY') {
            $_SESSION['shipping']['id'] = 'usps_PRIORITY';
            $messageStack->add_session('header', 'Shipping changed for Free Coupon - Please continue checkout', 'caution');
            zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
          }
        } else {
          if ($_SESSION['shipping']['id'] != 'usps_Priority Mail International') {
            $_SESSION['shipping']['id'] = 'usps_Priority Mail International';
            $messageStack->add_session('header', 'Shipping changed for Free Coupon - Please continue checkout', 'caution');
            zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
          }
        }
      }
    //echo 'Coupon CHANGED $_SESSION[shipping][id]: ' . $_SESSION['shipping']['id'] . '<br>';
    // eof: change shipping for free shipping discount coupon
    
    //  $_SESSION['comments'] = '';
    $comments = $_SESSION['comments'];
    This assumes you want to use Priority mail for both US and the Rest of the World ...

    You can adjust which shipping methods you want to use based on your needs ...
    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!

 

 

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. Only free shipping option showing?
    By silvershack in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 10 Feb 2012, 08:04 PM
  3. Only show cheapest shipping option?
    By Steven300 in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 18 Mar 2008, 04:59 PM
  4. Shipping option only shows as free shipping - i want all options
    By RomanSon3625 in forum Addon Shipping Modules
    Replies: 8
    Last Post: 14 Nov 2007, 04:13 PM
  5. Free shipping only option available??
    By canemasters in forum General Questions
    Replies: 2
    Last Post: 2 Jul 2007, 06:33 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