Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Free Shipping Icon

    Is there a way to modify this code, so that the Free Shipping Icon will appear *IF* the individual product meets the Free Shipping price point, currently set at $99 in the Free Shipping Options shipping module.

    PHP Code:
    <!--bof free ship icon  -->
    <?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON?></div>
    <?php ?>
    <!--eof free ship icon  -->
    Thank you,
    autoace

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

    Default Re: Free Shipping Icon

    You can add to the IF that the Product Price is >= 99.00 ...

    I would use the products_price_sorter field as that price is a pre-calculated "lowest" price for the 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!]
    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 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Free Shipping Icon

    Quote Originally Posted by Ajeh View Post
    You can add to the IF that the Product Price is >= 99.00 ...

    I would use the products_price_sorter field as that price is a pre-calculated "lowest" price for the Product ...
    Could you explain 'products_price_sorter' field and how to incorporate it into the IF statement. I have only entry-level knowledge of programming (working to improve that tho!).
    Thank you,
    autoace

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

    Default Re: Free Shipping Icon

    See if this helps you out by changing that code to read:
    Code:
    <!--bof free ship icon  -->
    <?php if(zen_products_lookup((int)$_GET['products_id'], 'products_price_sorter') >= 99 && zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
    <?php } ?>
    <!--eof free ship icon  -->
    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!

  5. #5
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Free Shipping Icon

    Quote Originally Posted by Ajeh View Post
    See if this helps you out by changing that code to read:
    Code:
    <!--bof free ship icon  -->
    <?php if(zen_products_lookup((int)$_GET['products_id'], 'products_price_sorter') >= 99 && zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
    <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
    <?php } ?>
    <!--eof free ship icon  -->
    I made the changes as you suggested and made sure my configurations were correct in my admin for this to show, however, the Free Shipping Icon is not displaying (Im testing on a product that I know satisfies the price point).

    I thought there was a 'Free Shipping' Image that comes with the default ZC package or am I mistaken?
    Thank you,
    autoace

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

    Default Re: Free Shipping Icon

    That's 'cause I goobered ...

    I forgot you are not using the Always Free Shipping, just the price for this ...

    Change the && to || in this line:
    Code:
    <?php if(zen_products_lookup((int)$_GET['products_id'], 'products_price_sorter') >= 99 || zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
    See if that doesn't work better off the price ...
    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!

  7. #7
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Free Shipping Icon

    Quote Originally Posted by Ajeh View Post
    That's 'cause I goobered ...

    I forgot you are not using the Always Free Shipping, just the price for this ...

    Change the && to || in this line:
    Code:
    <?php if(zen_products_lookup((int)$_GET['products_id'], 'products_price_sorter') >= 99 || zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
    See if that doesn't work better off the price ...
    Thank you - it works! I even tested to make sure it works in both conditions and lowered the price of the item below the price point and the Free Shipping Icon DID NOT display!

    One last question, is it possible to have this work on the product listing pages and if so can you guide me in the right direction.

    Thanks very much for your help.
    Thank you,
    autoace

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

    Default Re: Free Shipping Icon

    You can do something similar any where that you find the free shipping code and adapt the new code ...

    The products_id will be called in a variety of ways based on where you are in the code ... if you look through code in the general area, you should be able to find how it is referenced ...
    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!

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

    Default Re: Free Shipping Icon

    For example, in the product_listing.php module, you will see the code:
    Code:
            $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
    In this case, the products_id is referenced with:
    $listing->fields['products_id']
    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!

  10. #10
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Free Shipping Icon

    Ajeh,

    On the product info page, I want to have the Free Shipping Icon display right above the Qty Box and Add to Cart button. Any suggestions on how to go about this?

    It currently display right below the main product image, I've tried a few things but I keep on breaking the page, so I know I'm not doing it right
    Thank you,
    autoace

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Free Shipping Icon
    By sendmenews in forum General Questions
    Replies: 6
    Last Post: 19 Sep 2011, 05:23 PM
  2. Free Shipping Icon placement
    By Berserker in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Jan 2011, 05:58 AM
  3. Free Shipping Icon
    By ttmb33 in forum Customization from the Admin
    Replies: 2
    Last Post: 27 Feb 2010, 07:15 AM
  4. Free shipping icon
    By wwwursa in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 17 Apr 2008, 01:15 PM
  5. Change Free Shipping Icon
    By jhoulston in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Mar 2007, 08:29 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