Cross Sell Without Add To Cart Button

Questions and answers about ShopSite Custom Templates

Cross Sell Without Add To Cart Button

Postby kevin » Wed Sep 10, 2014 5:28 pm

I need to add cross sell items to the bottom of my product pages which I can do. But, how do I add these without the add to cart button displayed? I'm using flex build template, shopsite pro 12.
kevin
 
Posts: 11
Joined: Thu Apr 17, 2014 1:10 pm

Re: Cross Sell Without Add To Cart Button

Postby Jim » Thu Sep 11, 2014 10:06 am

The global cross-sell layout is defined in the shopping cart template. The Flex-Build themes have two possible shopping cart templates, Flex-Build-Cart-11.sst and Flex-Build-Cart.sst. You need to determine which of those is being used for the theme you have selected by going to Commerce Setup > Order System > Layout Info and see what template is being used. You would then need to edit that template and remove the Add to cart code from the DEFINE GLOBAL_CROSS_SELL code.

Note that the purpose of cross-sell is to try to entice someone to purchase an item, so I'm not sure why you would want to remove the ability for them to add the item to the cart.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Cross Sell Without Add To Cart Button

Postby ShopSite Lauren » Thu Sep 11, 2014 10:08 am

1. Go to Merchandising > Custom Templates > Page/Product Templates > Copy ShopSite Template, and make a copy of the Flex-Build-Product.sst.

2. Make a copy of your copy and rename it the exact same name as the original, Flex-Build-Product.sst. You can then delete your copy that does not have the exact same name.

3. Find the following line in the template, and either add a # sign as the VERY FIRST character on the line (even before the spaces, a # at the begining of a line comments the entire line out in ShopSite), or just delete the line:
Code: Select all
    <tr>[-- IF PRODUCT.UseMultiMenus  checked --][-- IF CROSS_SELL_LINK --][-- IF MOREINFOIMAGE? --]<td class="pcs_product_add_to_cart"><a href="[-- CROSS_SELL_LINK --]" class="pcs_addtocart_button"><img [-- MOREINFOIMAGE --] border="0" class="pcs_addtocart_button"></a></td>[-- ELSE --]<td class="pcs_product_add_to_cart"><a href="[-- CROSS_SELL_LINK --]" class="pcs_addtocart_button">[-- MOREINFOTEXT --]</a></td>[-- END_IF --][-- END_IF --][-- ELSE_IF AddImage? --]<td class="pcs_product_add_to_cart"><a class="pcs_addtocart_button" href="[-- PRODUCT.AddToCartURL --]"><img class="pcs_addtocart_button" alt="Add to Cart" [-- AddImage --] border="0"></a></td>[-- ELSE --]<td class="pcs_product_add_to_cart"><a class="pcs_addtocart_button" href="[-- PRODUCT.AddToCartURL --]">[-- AddText --]</a></td>[-- END_IF --]</tr>

This line is within the [-- DEFINE PRODUCT_CROSS_SELL --] [-- END_DEFINE PRODUCT_CROSS_SELL --] tags.

4. Go to Utilities > Publish > Regenerate, to recreate all your product pages with the updated template.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 887
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 27 guests

cron