FreeShipping image in category but not showing in listing?
Hello, for some reason I have the FreeShipping image showing up in the categories, but not in my listing. I have verified that it is indeed turned on in the Admin / Product Types / Edit Layout. And I have confirmed that if I do turn off the setting it stops showing up in the category.
I have found the code that displays the image and all seems to be default there.
I also tried disabling the styles sheets to see if that was hiding anything.
I ran some debugging code and as far as I can tell it is not passing a "true" value to turn on the image... so I'm thinking database issue.
BUT its working fine in the category view!
Very frustrating!
Does anyone have any ideas I can try? Is there another setting somewhere that turns on the image just for the listing page independent of the category?
The site is http://www.keystonepestsolutions.com...ing-offers-26/
Thank you,
Jacob Bushnell
Re: FreeShipping image in category but not showing in listing?
Check what setting you are using on the Catalog ... Product Types ... EDIT SETTING ...
Quote:
Product Free Shipping Image Status - Catalog
Show the Free Shipping image/text in the catalog?
Re: FreeShipping image in category but not showing in listing?
Been there, done that. A hundred times already... :(
For both product types General and Free Shipping. Set to "1" or Yes.
Jacob
Re: FreeShipping image in category but not showing in listing?
What happens if you switch to the Classic Template ... does it show?
What happens if you turn off the SEO/rewrites ... does it show?
Re: FreeShipping image in category but not showing in listing?
Thanks for the tips, I tried the classic template and it did not show.
I also disabled the URL re-writer temporarily and it still did not show.
Any other ideas?
Jacob
Re: FreeShipping image in category but not showing in listing?
Check your tpl_product_info_display.php and see if you have a section for:
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 -->
Also, in the Tools ... Developers Tool Kit ... in the bottom input box enter:
TEXT_PRODUCT_FREE_SHIPPING_ICON
and select Catalog and click Search ...
Do you have a define statement for this similar to:
Code:
define('TEXT_PRODUCT_FREE_SHIPPING_ICON', zen_image(DIR_WS_TEMPLATE_IMAGES . 'always-free-shipping.gif', 'Always Free Shipping')); // for an image or comment out to use another
What is the Product Type on one of the Product's that is not displaying this on the product_info page?
Re: FreeShipping image in category but not showing in listing?
Ok, thanks for your help.
In the developers tool kit I found that TEXT_PRODUCT_FREE_SHIPPING_ICON
was defined at two places :
/includes/extra_datafiles/languages/english/extra_definitions/product_free_shipping.php
Code:
Line #24 : //define('TEXT_PRODUCT_FREE_SHIPPING_ICON', 'FREE SHIPPING'); // for text or set to '' for nothing
Line #25 : define('TEXT_PRODUCT_FREE_SHIPPING_ICON', zen_image(DIR_WS_TEMPLATE_IMAGES . 'always-free-shipping.gif', 'Always Free Shipping')); // for an image or comment out to use another
And I also found a define at:
/includes/languages/english/extra_definitions/product_free_shipping.php
Code:
Line #24 : //define('TEXT_PRODUCT_FREE_SHIPPING_ICON', 'FREE SHIPPING'); // for text or set to '' for nothing
Line #25 : define('TEXT_PRODUCT_FREE_SHIPPING_ICON', zen_image(DIR_WS_TEMPLATE_IMAGES . 'always-free-shipping.gif', 'Always Free Shipping')); // for an image or comment out to use another
The product type is: Product - General
When I select Free shipping shouldn't that make the item become a FREE SHIPPING product?
Thank you,
Jacob Bushnell
Re: FreeShipping image in category but not showing in listing?
Ok, in order to troubleshoot this I placed the following code in the page: includes\templates\classic\templates\tpl_product_info_display.php
right after the code:
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 } ?>
<?php
//echo "code is: ";
//echo (zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping);
?>
<!--eof free ship icon -->
echo "code is: ";
echo (zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping);
That displays a null value when the product is viewed.
Not sure if that helps any but at least we know that the display code is correct.
Thank you,
Jacob Bushnell
Re: FreeShipping image in category but not showing in listing?
Quote:
Originally Posted by
JacobBushnell
The product type is: Product - General
When I select Free shipping shouldn't that make the item become a FREE SHIPPING product?
Do you mean when you select the Product Type:
Product - Free Shipping
or when you add/edit the Product and mark it as:
Code:
Always Free Shipping: Yes, Always Free Shipping
Re: FreeShipping image in category but not showing in listing?
The 2nd option:
Quote:
or when you add/edit the Product and mark it as:
Code:
---------
Always Free Shipping: *Yes, Always Free Shipping *
---------
I don't actually see an option to mark a product type "Product Type:
Product - Free Shipping" in the edit item page.
Maybe I am missing something there?
Jacob
Re: FreeShipping image in category but not showing in listing?
The Always Free Shipping is a choice when you are Adding or Editing a Product in the Catalog ... Categories/Products ...
The Product Type is what you can select when you go to add a NEW PRODUCT right next to that button is a dropdown for the Product Type, unless the Category is set to a specific product type ...
I am trying to find out if when you add your products if you are marking them as:
Quote:
Always Free Shipping: Yes, Always Free Shipping
It sounds like you are not, so I am trying to understand why you expect to see the Free Shipping Icon on the Product Info or the listing for that matter when the Product is not marked as Always Free Shipping ...
Did you touch something in the code to make the Free Shipping Icon show in the Product Listing?
Re: FreeShipping image in category but not showing in listing?
Ok, I follow you now.
No, all the products were create a "General Products" and some of them have the free shipping option selected.
That method had worked for the other 3 ZenCarts I run. I even have an almost exact copy of this site that I run here: dev.keystonepestsolutions.com
It works on my dev site. But not on my production site! The last time I had something not work on my production site that did work on the dev site was a bad Google analytics install.
I have not edited the category listing code except for debugging purposes. It is the excat same code that works on the development site and the exact same template as well.
Thank you,
Jacob Bushnell
Re: FreeShipping image in category but not showing in listing?
Did you try putting the code:
Code:
echo "code is: ";
echo (zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping);
on the site where it is not working?