Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Nov 2005
    Posts
    38
    Plugin Contributions
    0

    Default Re: Always Free Shipping

    Also, I've just noticed something when FREE SHIPPING is limited to a particular Zone.

    If a customer with a delivery address in a different Zone (i.e. not entitled to Free Shipping) has a Free Shipping product in their cart, they get the TITLE / TEXT_NO_SHIPPING_AVAILABLE message - so I can at least tell them they have to contact the store to buy the item.

    However if they also have a non-free shipping product in their basket, the free shipping bar on their Zone is ignored, and the the Zone Rate amount for the second product only is displayed / charged. So they'd be ordering 2 items, but paying shipping for only one of them.

    Am I missing something, or is it a wee bug? I'm on v1.3.7.

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

    Default Re: Always Free Shipping

    Free Shipping freeshipper is not really designed for Zones ...
    as a matter of fact, as is, it will not work ...

    The Zone code is in the module for coders who might need it for customization purposes ...

    On trying to make products Free Shipping for a particular Zone or Zones, you would need to really customize the code to manage this ...

    Always Free Shipping is for Free Shipping for everyone ... and cannot, at this time, be used for a given Zone ...
    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. #13
    Join Date
    Nov 2006
    Posts
    69
    Plugin Contributions
    0

    Default Re: Always Free Shipping

    I too was confronted by this very same issue, so put my coding hat on and heres what i came up with. My example applies to Australia but seems to work for any country it will make products marked free shipping only available to the country the store is in and use any of the other shipping mods if being shipped out of the country of origin.

    Step 1
    if you haven't already created a zone for you country do it now
    eg create zone australia with all states included.

    Step 2
    in admin goto modules>shipping>freeshipper and set the zone to the zone you have just created.

    now if you place an order to an overseas address with all freeshipping items in cart you should get a message that you are current not shipping to this region and locally freeshipping should show (this is good this shows you have zones set correctly.

    Step 3
    the file editing
    edit /includes/classes/shopping_cart.php

    find on around line 591
    Code:
    function calculate() { 
        global $db;
    add $order to the globals eg
    Code:
    function calculate() { 
        global $db, $order;
    around line 619 find
    Code:
    // adjusted count for free shipping 
            if ($product->fields['product_is_always_free_shipping'] != 1 and $product->fields['products_virtual'] != 1) { 
              $products_weight = $product->fields['products_weight']; 
            }else{
        $product_weight=0;
        }
    directly after this add
    Code:
    if ($product->fields['product_is_always_free_shipping'] = 1 && $order->delivery['country']['id']!= STORE_COUNTRY) { 
             $products_weight = $product->fields['products_weight'];
    }
    around line 658 find
    Code:
    // shipping adjustments 
            if (($product->fields['product_is_always_free_shipping'] == 1) or ($product->fields['products_virtual'] == 1) or (ereg('^GIFT', addslashes($product->fields['products_model'])))) {
    replace it with
    Code:
    if (($product->fields['product_is_always_free_shipping'] == 1 && $order->delivery['country']['id']== STORE_COUNTRY) or ($product->fields['products_virtual'] == 1) or (ereg('^GIFT', addslashes($product->fields['products_model'])))) {
    on line 1031 find
    Code:
     if ($product->fields['product_is_always_free_shipping'] != 1) { 
              $new_attributes_weight = $attribute_weight_info->fields['products_attributes_weight']; 
            } else { 
              $new_attributes_weight = 0; 
            }
    directly after it add
    Code:
    if ($product->fields['product_is_always_free_shipping'] = 1 && $order->delivery['country']['id']!= STORE_COUNTRY) { 
             $new_attributes_weight = $attribute_weight_info->fields['products_attributes_weight'];
    }
    save file

    now edit /includes/functions/functions_general.php
    find around line 1203
    Code:
    // Always free shipping only true - disable everyone 
          case (($check_cart_free == $check_cart_cnt) and $shipping_module != 'freeshipper'): 
            return false; 
            break;
    replace it with
    Code:
    // Always free shipping only true - disable everyone 
          case (($check_cart_free == $check_cart_cnt && $order->delivery['country']['id']== STORE_COUNTRY)  and $shipping_module != 'freeshipper'):
        return false; 
            break;
    save file and it sould work.
    the last but not least thing to change is the free shipping icon
    /includes/templates/template_default/images/always-free-shipping.gif make a new one to reflect where you are offering free shipping eg free shipping australia only.
    As always no guarantees test test test then retest in your own enviroment. if anyone has anything to add or finds bugs in the system please let me know

  4. #14
    Join Date
    Apr 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Always Free Shipping

    Quote Originally Posted by Mickyelta View Post
    I too was confronted by this very same issue, so put my coding hat on and heres what i came up with.
    Thanks for this

    I've just implemented what you've done for a site and so far all seems to be working very nicely.

  5. #15
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,566
    Plugin Contributions
    74

    Default Re: Always Free Shipping

    A simpler way to have shipping modules display with freeshipper is to change the following lines in functions_general.php:

    Find:
    PHP Code:
    case (ORDER_WEIGHT_ZERO_STATUS == '1' and ($check_cart_weight == and $shipping_module != 'freeshipper')):
            return 
    false
    Replace with:
    PHP Code:
    case (ORDER_WEIGHT_ZERO_STATUS == '1' and ($check_cart_weight == and $shipping_module != 'freeshipper')):
            return 
    true
    Find:
    PHP Code:
    case (($_SESSION['cart']->free_shipping_items() == $check_cart_cnt) and $shipping_module != 'freeshipper'):
            return 
    false
    Replace with:
    PHP Code:
    case (($_SESSION['cart']->free_shipping_items() == $check_cart_cnt) and $shipping_module != 'freeshipper'):
            return 
    true
    Find:
    PHP Code:
    case (($check_cart_free == $check_cart_cnt) and $shipping_module != 'freeshipper'):
            return 
    false
    Replace with:
    PHP Code:
    case (($check_cart_free == $check_cart_cnt) and $shipping_module != 'freeshipper'):
            return 
    true

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v139h Free shipping to just 1 country using free shipper and Yes, Always Free Shipping
    By boomy in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 20 Oct 2014, 01:43 AM
  2. Always Free Shipping: Yes, Always Free Shipping
    By Stuff4Toys in forum General Questions
    Replies: 15
    Last Post: 29 Apr 2011, 10:36 PM
  3. "Always free shipping " option is change all item free shipping?
    By als88 in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 23 Oct 2009, 04:32 AM
  4. Always Free Shipping / Always Virtual Product -- How?
    By pseudonym in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 14 Mar 2009, 08:21 PM
  5. Always free shipping by product but only free in the US?
    By KingBono in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 4 Oct 2008, 10:51 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