Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Free shipping image on product listing

Free shipping image on product listing

Views: 695

Results 1 to 7 of 7
26 Dec 2025, 1:21 PM
#1
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Free shipping image on product listing

zen 2.10
php8.3
how would i change this line ```
$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 ```
<?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 } ?>
26 Dec 2025, 3:33 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,068
Plugin Contributions:
56

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).

26 Dec 2025, 7:33 PM
#3
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Free shipping image on product listing

i put this in tpl product info display

<!--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

26 Dec 2025, 7:38 PM
#4
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Free shipping image on product listing

product_is_always_free_shipping') == 3
``` do not ship free no image needed

product_is_always_free_shipping') == 0

product_is_always_free_shipping') == 1

27 Dec 2025, 2:03 AM
#5
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Free shipping image on product listing

lat9:

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 ```
zen_get_show_product_switch

28 Dec 2025, 8:17 PM
#6
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Free shipping image on product listing

ok added this into product listing ```
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 : '') : '');
}

28 Dec 2025, 8:55 PM
#7
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Free shipping image on product listing

lat9:

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