Broken images for Add to Cart buttons on Search Results pages
Product: ShopSite Pro
Version: v7.x
Platform: ALL
I have a ShopSite Pro v7.x store and am using the ShopSite Search feature to allow shoppers to search for products in my store. On the search results pages some or all of the products have a broken image for the Add to Cart button, what Can I do about this?
Solution ID: S5509
NOTE: This issue does not affect Manager or Starter stores or Pro stores older than ShopSite v7.x.
This is caused by a certain combination of settings for your products' Add to Cart Button settings and a section incorrect template code in the default product template used on the search results pages. There are 3 solutions:
1) Set all of your products to use the Image setting for the Add to Cart button and select an appropriate add to cart image.
Go to Products and select all of your products in the List of products and click PowerEdit. Select the Add to Cart Button field towards the bottom of the Layout menu, select the 'Global' radio button option, and click Proceed. Now make sure that the Image radio button is selected for the Add to Cart Button setting, and that the image you want to use for your products' Add to Cart button is the image indicated, then Save Changes.
2) Fix the template used by products on the search results page.
Make a copy of the default product template used by the search results page by going to Merchandising -> Custom Templates, click on the Copy ShopSite Template in the Product Templates section, and select search_default and make a copy of it. Once the copy is made, select the copy from the list in the Product Templates section in Merchandising -> Custom Templates and click the Edit Template button to the right. Find the two sections of the template with the following code:
=======
[-- IF STORE.Type "PROFESSIONAL" --]
[-- IF AddImage "none" --]
<a href="[-- PRODUCT.AddToCartURL --]">[-- AddText --]</a>
[-- ELSE --]
<a href="[-- PRODUCT.AddToCartURL --]"><img alt="Add to Cart" src="[-- Output_Directory_URL --]/media/[-- AddImage Image_Name --]" border="0"></a>
[-- END_IF --]
[-- ELSE --]
========
And change them to the following code:
========
[-- IF STORE.Type "PROFESSIONAL" --]
[-- IF AddImage? --]
<a href="[-- PRODUCT.AddToCartURL --]"><img alt="Add to Cart" src="[-- Output_Directory_URL --]/media/[-- AddImage Image_Name --]" border="0"></a>
[-- ELSE --]
<a href="[-- PRODUCT.AddToCartURL --]">[-- AddText --]</a>
[-- END_IF --]
[-- ELSE --]
=========
After saving these changes to your copy of the search_product template, go to Preferences -> Search Settings -> Search Layout and select your copy from the pull-down list in the section labeled 'Product Template Override'.
3) Upgrade to ShopSite Pro v8.0 or newer which already has these changes made to the default search_product template.
Related Articles
No related articles were found.
Attachments
No attachments were found.
Visitor Comments
Article Details
Last Updated
13th of November, 2008