Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Free shipping image on product listing

    zen 2.10
    php8.3
    how would i change this line
    Code:
    $lc_buy_now .= (wt_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  : '') : '');
    					break;
    to something like this
    Code:
    <?php if(zen_products_lookup((int) $_GET['products_id'], 'product_is_always_free_shipping') == 0 and zen_products_lookup((int) $_GET['products_id'], 'products_price') <= 99 and $products_options->fields['options_values_price'] == 0) { ?>
                                <div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_UNDER; ?> 
                            <?php } ?>

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,821
    Plugin Contributions
    96

    Default Re: Free shipping image on product listing

    What is your goal in changing that non-as-shipped Zen Cart line of code (there's no core function named wt_get_show_product_switch).

  3. #3
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Free shipping image on product listing

    i put this in tpl product info display
    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  -->
    
    						<!--bof free ship Under 100 icon  -->
                            <?php if(zen_products_lookup((int) $_GET['products_id'], 'product_is_always_free_shipping') == 0 and zen_products_lookup((int) $_GET['products_id'], 'products_price') <= 99 and $products_options->fields['options_values_price'] == 0) { ?>
                                <div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_UNDER; ?> </br>Spend $100 or more and this product qualifies for free shipping!</div>
                            <?php } ?>
                            <!--eof free ship Under 100 icon  -->
    						
    						<!--bof free ship Under w/attributes 100 icon  -->
                            <?php if(zen_products_lookup((int) $_GET['products_id'], 'product_is_always_free_shipping') == 0 and zen_products_lookup((int) $_GET['products_id'], 'products_price') == 0 and $products_options->fields['options_values_price'] <= 99) { ?>
                                <div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_UNDER; ?></div>
                            <?php } ?>
                            <!--eof free ship Under w/attributes 100 icon  -->
    						
    
    						<!--bof free ship over 100 icon  -->
                            <?php if(zen_products_lookup((int) $_GET['products_id'], 'product_is_always_free_shipping') == 0 and zen_products_lookup((int) $_GET['products_id'], 'products_price') >= 100 and $products_options->fields['options_values_price'] == 0) { ?>
                                <div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
                            <?php } ?>
                            <!--eof free ship over 100 icon  -->
    						
    						<!--bof free ship over w/attributes 100 icon  -->
                            <?php if(zen_products_lookup((int) $_GET['products_id'], 'product_is_always_free_shipping') == 0 and zen_products_lookup((int) $_GET['products_id'], 'products_price') == 0 and $products_options->fields['options_values_price'] >= 100) { ?>
                                <div id="freeShippingunder"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
                            <?php } ?>
                            <!--eof free ship over w/attributes 100 icon  -->
    i would like the product list to show the same

  4. #4
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Free shipping image on product listing

    Code:
    product_is_always_free_shipping') == 3
    do not ship free no image needed
    Code:
    product_is_always_free_shipping') == 0
    normal shipping rules - ships free over 99 dollars
    Code:
    product_is_always_free_shipping') == 1
    always free shipping - i dont want to click the radio button in product edit for this

  5. #5
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Free shipping image on product listing

    Quote Originally Posted by lat9 View Post
    What is your goal in changing that non-as-shipped Zen Cart line of code (there's no core function named wt_get_show_product_switch).
    no there is not but there is this
    Code:
    zen_get_show_product_switch
    which is same thing if i can do this one than i can do other

  6. #6
    Join Date
    Jan 2013
    Location
    New Port Richey, Florida
    Posts
    967
    Plugin Contributions
    0

    Default Re: Free shipping image on product listing

    ok added this into product listing
    Code:
    if ($listing->fields['product_is_always_free_shipping']==0 and $listing->fields['products_price'] < 99 ) { 
                        $lc_buy_now .=  TEXT_PRODUCT_FREE_SHIPPING_UNDER;
                       }else if ($listing->fields['product_is_always_free_shipping']==0 and $listing->fields['products_price'] > 100 ) {
                        $lc_buy_now .=  TEXT_PRODUCT_FREE_SHIPPING_ICON;
                       }else{
    					$lc_buy_now .= (wt_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  : '') : '');
                          }

  7. #7
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,875
    Plugin Contributions
    0

    Default Re: Free shipping image on product listing

    Quote Originally Posted by lat9 View Post
    What is your goal in changing that non-as-shipped Zen Cart line of code (there's no core function named wt_get_show_product_switch).
    wokiee template
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

 

 

Similar Threads

  1. Replies: 3
    Last Post: 7 Dec 2014, 03:15 PM
  2. v139h Product FREE Shipping IMAGE not showing up on Main & Product Page:
    By rlexyd in forum Templates, Stylesheets, Page Layout
    Replies: 43
    Last Post: 29 Jan 2013, 05:42 AM
  3. v151 Free shipping image not appearing on product pages.
    By woodlandsprite in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 28 Oct 2012, 02:11 AM
  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

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