Page 1 of 1

Cross Sell on Product Page?

PostPosted: Tue Nov 22, 2011 12:02 pm
by criticalslinky
Hi all,

I am trying to install cross-sell code on my product pages via this how-to from ShopSite: http://shopsite.com/templates/cookbook/global-crosssell.shtml

I have successfully added cross-sell to my cart, but I (and by I, I mean my boss) really want product specific cross-sell at the bottom of product more info pages. I follow the tutorial as best I can (I am not too good at code), but end up getting the following error upon site regeneration:

Template Error: Could not find include file: /www/logfinish/cgi-bin/sb/templates/includes/BasicPage-CrossSellDefine.sst



Did I screw up the tutorial, or is the problem more complex? Thanks in advance for any help you all can offer!

Re: Cross Sell on Product Page?

PostPosted: Tue Nov 22, 2011 12:21 pm
by ShopSite Lauren
My guess is that you have an older version of ShopSite which does not have the template file mentioned in the error message, in your store. To fix this issue, go to Merchandising > Custom Templates > Includes > New Include, and name the new include "BasicPage-CrossSellDefine.sst." After you have named the include file, go in and edit the include file, adding the following code into that file:


[-- IF PRODUCT.UseMultiMenus checked --]
[-- ELSE --]
<FORM action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
[-- END_IF --]
[-- IF PRODUCT.DisplayGraphic --][-- IF PRODUCT.Graphic --][-- IF CROSS_SELL_LINK --]<a href="[-- CROSS_SELL_LINK --]">[-- END_IF --][-- PRODUCT.Graphic --][-- IF CROSS_SELL_LINK --]</a>[-- END_IF --][-- END_IF --][-- END_IF --]

[-- IF PRODUCT.VariableName? --][-- IF CROSS_SELL_LINK --]<a href="[-- CROSS_SELL_LINK --]" class="prod_name_vr_[-- PRODUCT.NameStyle --]_[-- PRODUCT.NameSize --]">[-- STORE.ProductName --]</a>[-- ELSE --]<span class="prod_name_vr_[-- PRODUCT.NameStyle --]_[-- PRODUCT.NameSize --]">[-- STORE.ProductName --]</span>[-- END_IF --] <input name="[--PRODUCT.RecordNumber--]:name" size="20" maxlength="100" value="" type="text">
[-- ELSE_IF PRODUCT.DisplayName --][-- IF CROSS_SELL_LINK --]<a href="[-- CROSS_SELL_LINK --]" class="prod_name_[-- PRODUCT.NameStyle --]_[-- PRODUCT.NameSize --]">[-- PRODUCT.Name --]</a>[-- ELSE --]<span class="prod_name_[-- PRODUCT.NameStyle --]_[-- PRODUCT.NameSize --]">[-- PRODUCT.Name --]</span>[-- END_IF --][-- END_IF --]

[-- IF PRODUCT.NumSubProducts "0" --]
[-- IF PRODUCT.VariableSKU? --]<span class="crosssell_sku_[-- PRODUCT.SKUStyle --]_[-- PRODUCT.SKUSize --]">[-- STORE.Sku --] <input name="[--PRODUCT.RecordNumber--]:sku" size="10" maxlength="10" value="" type="text"></span>
[-- ELSE_IF PRODUCT.DisplaySku --]<span class="crosssell_sku_[-- PRODUCT.SKUStyle --]_[-- PRODUCT.SKUSize --]">[-- PRODUCT.Sku --]</span>[-- END_IF --]

[-- IF PRODUCT.QuantityPricing --]
[-- ELSE_IF PRODUCT.VariablePrice? --]
<span class="crosssell_price_[-- PRODUCT.PriceStyle --]_[-- PRODUCT.PriceSize --]">[-- STORE.Price --] [-- STORE.CurrencySymbol --]<input name="[--PRODUCT.RecordNumber--]:price" size="4" maxlength="10" value="" type="text"></span>
[-- ELSE_IF PRODUCT.DisplayPrice --]
<span class="crosssell_price_[-- PRODUCT.PriceStyle --]_[-- PRODUCT.PriceSize --]">[-- IF PRODUCT.SaleAmount --][-- IF PRODUCT.AltPrice --] [-- PRODUCT.AltSaleAmount --][-- END_IF --][-- IF PRODUCT.SaleOn --]<strike>[-- PRODUCT.Price --][-- IF PRODUCT.AltPrice --] [-- PRODUCT.AltPrice --][-- END_IF --]</strike>[-- PRODUCT.SaleAmount --][-- IF PRODUCT.AltPrice --] [-- PRODUCT.AltSaleAmount --][-- END_IF --][-- ELSE --][-- PRODUCT.Price --][-- IF PRODUCT.AltPrice --] [-- PRODUCT.AltPrice --][-- END_IF --][-- END_IF --][-- ELSE --][-- PRODUCT.Price --][-- IF PRODUCT.AltPrice --] [-- PRODUCT.AltPrice --][-- END_IF --][-- END_IF --]</span>
[-- END_IF --]
<input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]>
<div class="crosssell_add">
[-- IF PRODUCT.UseMultiMenus checked --]
[-- IF PRODUCT.DisplayMoreInformationPage --]
[-- IF MOREINFOIMAGE? --]
<br><a href="[-- PRODUCT.MoreInfoURL --]"><img [-- MOREINFOIMAGE --] border="0" class="btn"></a>
[-- ELSE --]
<br><a href="[-- PRODUCT.MoreInfoURL --]" class="btn nobr">[-- MOREINFOTEXT --]</a>
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
[-- IF VAR.AddButtonGraphic --]
<input type="image" src="[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.Media --]/[-- VAR.AddButtonGraphic --]" name="Add to Cart" alt="Add to Cart">
[-- ELSE_IF ADDIMAGE? --]
<input type="image" [--ADDIMAGE--]>
[-- ELSE --]
<input type="submit" value="[-- ADDTEXT --]">
[-- END_IF --]
[-- END_IF --]</div>
[-- ELSE_IF CROSS_SELL_LINK --]
<div class="crosssell_add">
[-- IF MOREINFOIMAGE? --]
<a href="[-- CROSS_SELL_LINK --]">[-- MOREINFOIMAGE --]</a>
[-- ELSE --]
<a href="[-- CROSS_SELL_LINK --]" class="btn">[-- MOREINFOTEXT --]</a>
[-- END_IF --]
</div>
[-- END_IF --]
<div class="clear"></div>
[-- IF PRODUCT.UseMultiMenus checked --]
[-- ELSE --]
</form>
[-- END_IF --]

Re: Cross Sell on Product Page?

PostPosted: Tue Nov 22, 2011 2:28 pm
by Jim
Your store is running ShopSite Pro 10 r7.2 for Linux. The ability to have Cross-sell on product moreinfo pages was not added until ShopSite 10.1. So even with the template that Lauren provided you may get errors when you publish and it might not work.

You should see about getting you ShopSite upgraded to a newer release. There have been 4 major releases since Jan 2009 when the release you are running was issued , 10.1, 10.2, 11.0 and 11.1 and there were multiple patch releases for each of those.

You can see a list of the new features in each release at:
http://shopsite.com/help/10.2/en-US/new-features.html for 10, 10.1, 10.2
http://shopsite.com/help/11.1/en-US/new-features.html for 11 and 11.1

Re: Cross Sell on Product Page?

PostPosted: Wed Nov 23, 2011 7:30 am
by criticalslinky
Thank you Lauren and Jim,

It's true, I am running v9. So, it looks like the first step is getting that upgrade! Thank you both for you great, fast responses!