Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2005
    Posts
    39
    Plugin Contributions
    0

    Default How to show free shipping icon when product weight is zero?

    I would like to show the free shipping icon on the product info page when the weight of the product is "0".
    All Products are marked as:
    Always Free Shipping NO

    Shipping/Packaging I have chosen 0 weight does NOT mean Free shipping ...

    I have the following shipping modules turned on:
    Zones
    Free Shipping Options freeoptions
    I have set the total >= 0.00


    How do I change the code to show the shipping icon when the product weight is "0"?
    I have looked at a similar thread but here Ajeh forced the shipping icon to show on all product info pages.

    Quote Originally Posted by Ajeh View Post
    Okay ... this is very different ...

    If you want to see the Free Shipping icon, you need to force that by modifying the IF in the tpl_product_info_display.php ...

    Copy that to your templates and overrides directory and edit this section:
    PHP Code:
    <!--bof free ship icon  -->
    <?php if(zen_get_product_is_always_free_shipping($products_id_current)) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON?></div>
    <?php ?>
    <!--eof free ship icon  -->
    Change to read:
    PHP Code:
    <!--bof free ship icon  -->
    <?php if(true || zen_get_product_is_always_free_shipping($products_id_current)) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON?></div>
    <?php ?>
    <!--eof free ship icon  -->
    That makes it always true so the Free Shipping icon will show ...

    Then if you need this on the listings, you need to do something similar ...

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

    Default Re: How to show free shipping icon when product weight is zero

    Change the IF condition to check the Product's Weight and if 0, then the Free Shipping icon will show ...

    You should be able to use:
    $products_weight

    Note: if you also use attribute weight then you will need to consider how you want to manage this for attributes that might add weight to a 0 weight product ...
    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
    Jun 2005
    Posts
    39
    Plugin Contributions
    0

    Default Re: How to show free shipping icon when product weight is zero?

    Thanks Ajeh,
    I have tried the following code but it works the other way around; the freeshipping icon is showing up on products that weigh over 0 .
    Can you help me out?


    <!--bof free ship icon when weight is 0 -->
    <?php if ($products_weight !=0) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
    <?php } ?>
    <!--eof free ship icon when weight is 0 -->

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: How to show free shipping icon when product weight is zero?

    Quote Originally Posted by slitter View Post
    Thanks Ajeh,
    I have tried the following code but it works the other way around; the freeshipping icon is showing up on products that weigh over 0 .
    Can you help me out?


    <!--bof free ship icon when weight is 0 -->
    <?php if ($products_weight !=0) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
    <?php } ?>
    <!--eof free ship icon when weight is 0 -->

    You're asking to show the icon when the weight is NOT 0

    You need to change it as follows:
    <!--bof free ship icon when weight is 0 -->
    <?php if ($products_weight ==0) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
    <?php } ?>
    <!--eof free ship icon when weight is 0 -->

  5. #5
    Join Date
    Jun 2005
    Posts
    39
    Plugin Contributions
    0

    Default Re: How to show free shipping icon when product weight is zero?

    Thanks a lot Clyde, that did the job. Zen Cart rocks...

 

 

Similar Threads

  1. v138a Force to show free shipping icon w/ freeoptions on
    By prettyodd in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Dec 2012, 12:09 PM
  2. Shipping cost = weight. Show free delivery
    By LamboNero in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 6 Nov 2011, 03:06 PM
  3. Display Handling Fee & Shipping Weight Even When Providing Free Shipping
    By Stenrique in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 2 Jan 2009, 04:47 PM
  4. How to enable the FREE SHIPPING icon next to product listing?
    By kenix in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Aug 2008, 06:28 PM
  5. Either show free shipping icon w/ freeoptions OR show other modules w/ freeshipper
    By tvadpro in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 3 Dec 2006, 02:53 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