Forums / Templates, Stylesheets, Page Layout / Product FREE Shipping IMAGE not showing up on Main & Product Page:

Product FREE Shipping IMAGE not showing up on Main & Product Page:

Started by rlexyd on 2 Oct 2012, 4:58 AM · Views: 4,800

Results 41 to 44 of 44
29 Jan 2013, 1:20 AM
#41
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Product FREE Shipping IMAGE not showing up on Main & Product Page:

If anyone can help me get this code placed I would really appreciate it. I've been trying for hours with no luck. I've tried php debuggers etc too.
Sorry for the lack of knowledge. My entire /modules/My_Template/specials_index.php is shown above with Linda's code attempted inserts in red.

29 Jan 2013, 1:42 AM
#42
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product FREE Shipping IMAGE not showing up on Main & Product Page:

On this line:

$chk_free_shipping = zen_get_product_is_always_free_shipping($featured_products->fields['products_id']);

try using:

$chk_free_shipping = zen_get_product_is_always_free_shipping($specials_index->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!

29 Jan 2013, 4:40 AM
#43
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Re: Product FREE Shipping IMAGE not showing up on Main & Product Page:

Thank you Linda, that was definitely one of my mistakes. This is how I got it to display nicely for me in
/includes/modules/My_Template/specials_index.php

if (SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS > 1 && $num_products_count > 1) {
	
		if ($col > 0 && $col < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS) {
			$tm_param = 'style="margin-left:2px;"';
		} else {
			$tm_param = '';
		}
	
	$chk_free_shipping = '';
    $chk_free_shipping_image = '';
    $chk_free_shipping = zen_get_product_is_always_free_shipping($specials_index->fields['products_id']);
    if ($chk_free_shipping) {
      $chk_free_shipping_image = TEXT_PRODUCT_FREE_SHIPPING_ICON;
    }
	
	
	
    $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => 
	
			'<div class="product product_border" align="center" ' . $tm_param . '>
				<div class="margin_col">
					' . $products_img . '<br />
					' . $products_name . '<br />
					<div class="text">
						' . $products_desc . '<br />
					</div>
					Price: <strong>' . $products_price . '</strong><br>
					' . $products_######## . '</a><br />' . ($chk_free_shipping_image ? '<br>' . $chk_free_shipping_image : ''));
	
	} else {

    $list_box_contents[$row][$col] = array ('params' =>'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
29 Jan 2013, 4:42 AM
#44
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product FREE Shipping IMAGE not showing up on Main & Product Page:

Thanks for the update that this is now working and for posting your final solution ... :smile:

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!