how to add "back up 1 level button"?

General ShopSite user discussion

how to add "back up 1 level button"?

Postby gracefuli » Thu Aug 18, 2016 3:58 pm

I am using bb-with side menus template. So left side category may say SHIRTS. when click goes to a general page where i have links to other sub-categories ie short sleeve, long sleeve... they click a sub-category to then see products. all very good so far... they choose to view A PRODUCT (ie red shirt short sleeves) and are taken to that more info page. i want to add a button/link here that will take them back 1 level when done viewing - so now they can easily choose blue shirt short sleeves. i know they can hit back button on browser. but some site testers are instead hitting the left navigation button again and going all the way back to the main categories (shirts) and getting frustrated that they then have to drill down again to short sleeves... thanks you all have been great!
gracefuli
 
Posts: 58
Joined: Thu Aug 02, 2007 7:27 pm

Re: how to add "back up 1 level button"?

Postby ShopSite Lauren » Fri Aug 19, 2016 10:07 am

You could add the following code in the product more information template where you want the "back" button to go. You are likely using the BB-Product.sst product template, so the code should go in the (Merchandising > Custom Templates > Includes > Copy A ShopSite Include, make a copy of the include, save, then recopy your copy and rename it the exact same as the original to override the original) BB-ProductPageContent.sst file.

Code: Select all
[-- IF VAR.PageFileName NE "index.html" --]
<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.PageFileName --]" title="[-- VAR.LinkTitle --]">Return to [-- VAR.LinkName --]</a>
[-- END_IF --]
- 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

Re: how to add "back up 1 level button"?

Postby gracefuli » Mon Aug 22, 2016 10:54 am

Hi- i am using bb-Product-WithMenus template. when i copy and add the code to the BB-pagecontent with menus includes file.. i lose the whole page and am left with code nonsense on the page:
shopsite pro
store id:
add category here...

i guess i am doing something wrong... do i need a <div> code?
i am trying to place it just under the social buttons

looking for just "back" button. Nothing fancy or "back to short sleeve shirts"
thanks
gracefuli
 
Posts: 58
Joined: Thu Aug 02, 2007 7:27 pm

Re: how to add "back up 1 level button"?

Postby ShopSite Lauren » Mon Aug 22, 2016 11:32 am

Try this. I changed the VAR tags to just VAR.FileName because they shouldn't have had "Page" in them, but that wouldn't have broken the page, the new code would have just been ignored.

1. Go to Merchandising > Custom Templates > Includes > New Include and name the include file BB-ProductPageContent-WithMenus.sst and save changes.

2. Edit the include file and paste the following code inside, then save changes.

Code: Select all
[-- VAR.ProductInfoWidth "" --]
[-- IF VAR.AboveSideMenus "no" --][-- IF VAR.NarrowResponsiveDesign NE "fullwidth" --]<div id="bb-menuscontainer">[-- END_IF --][-- INCLUDE BB-RightMenu.sst PROCESS --]<div id="bb-content"><div id="bb-inner">[-- END_IF --]
[-- IF VAR.Breadcrumbs "yes" --] [-- VAR.BreadPosition 0 --]<div id="bbbread" itemscope itemtype="http://schema.org/BreadcrumbList"><div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a id="bbbreadhome" href="[-- MyStoreURL --]" title="[-- STORE.Name REMOVE_HTML --]" itemprop="item"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick="__utmLinker(this.href);"[-- END_IF --]><span itemprop="name">[-- STORE.Home --]</span><meta itemprop="position" content="[-- VAR.BreadPosition INC --][-- VAR.BreadPosition --]"></a></div><span class="bbbread-div">[-- VAR.BreadcrumbDivider --]</span>[-- IF VAR.PageFileName NE "index.html" --]<div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.PageFileName --]" title="[-- VAR.LinkTitle --]" itemprop="item"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick="__utmLinker(this.href);"[-- END_IF --]><span itemprop="name">[-- VAR.LinkName --]</span><meta itemprop="position" content="[-- VAR.BreadPosition INC --][-- VAR.BreadPosition --]"></a></div><span class="bbbread-div">[-- VAR.BreadcrumbDivider --]</span>[-- END_IF --]<div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="#" itemprop="item" title="[-- IF PRODUCT.MoreInformationTitle --][-- PRODUCT.MoreInformationTitle --][-- ELSE --][-- PRODUCT.Name REMOVE_HTML --][-- END_IF --]" itemprop="url"><span itemprop="name">[-- PRODUCT.Name REMOVE_HTML --]</span><meta itemprop="position" content="[-- VAR.BreadPosition INC --][-- VAR.BreadPosition --]"></a></div></div>[-- END_IF --]
[-- IF VAR.AboveSideMenus "yes" --][-- IF PRODUCT.DisplayName --]<h1 id="bbnme">[-- PRODUCT.Name REMOVE_HTML --]</h1>[-- END_IF --]<div id="bb-abovedivider"></div>[-- IF VAR.NarrowResponsiveDesign NE "fullwidth" --]<div id="bb-menuscontainer">[-- END_IF --][-- INCLUDE BB-RightMenu.sst PROCESS --]<div id="bb-content"><div id="bb-inner">[-- END_IF --]
[-- IF PRODUCT.MoreInformationGraphic --]<div id="bb-miimghalf">[-- INCLUDE BB-ProductGraphicZoom.sst PROCESS --]</div>[-- VAR.ProductInfoWidth "half" --][-- ELSE_IF PRODUCT.Graphic --][-- IF PRODUCT.DisplayGraphic --]<div id="bb-miimghalf">[-- PRODUCT.Graphic ONLY_ALT_TAG --]</div>[-- VAR.ProductInfoWidth "half" --][-- END_IF --][-- END_IF --]
<div id="bb-miinfo[-- VAR.ProductInfoWidth --]" itemscope itemtype="http://schema.org/Product" class="lmt">
[-- IF PRODUCT.VariableName? --][-- ELSE --]
  [-- IF VAR.AboveSideMenus "no" --][-- IF PRODUCT.DisplayName --]<h1 id="bbnme" itemprop="name">[-- PRODUCT.Name REMOVE_HTML --]</h1>[-- END_IF --][-- ELSE --]<span class="hidden" itemprop="name">[-- PRODUCT.Name REMOVE_HTML --]</span>[-- END_IF --]
  [-- IF VAR.DisplayGoogleInfo "yes" --][-- IF PRODUCT.Brand --][-- STORE.By --] [-- IF SearchOnStorePages --]<a href="[-- SHOPPING_CART_URL Base --]/productsearch.cgi?storeid=[-- STORE.ID --]&search_field=[-- PRODUCT.Brand --]" title="[-- STORE.86 --] [-- PRODUCT.Brand --]">[-- PRODUCT.Brand --]</a>[-- ELSE --]<span class="bb-mibrand">[-- PRODUCT.Brand --]</span>[-- END_IF --][-- END_IF --][-- END_IF --]
  [-- IF REVIEWS --][-- IF Reviews_Count_Number LT 1 --]<span id="bb-writerev">[-- REVIEWS_WRITE_FIRST --]</span>[-- ELSE --]<div id="bb-mirev">[-- REVIEWS_STARS --] [-- REVIEWS_COUNT --] [-- REVIEWS_READ_REVIEWS_LINK --]</div>[-- END_IF --][-- END_IF --]
[-- END_IF --]
[-- INCLUDE VAR.PriceDisplay PROCESS --]

[-- MOREINFOINVENTORYACTUAL --]
[-- IF PRODUCT.ProductDescription --]<div itemprop="description" id="bb-midesc" class="[-- PRODUCT.DescriptionStyle --] [-- PRODUCT.DescriptionSize --]">[-- PRODUCT.ProductDescription --]<div class="clear"></div></div>[-- END_IF --]
  [-- IF PRODUCT.VariablePrice? --][-- ELSE --][-- IF PRODUCT.VariableSku? --][-- ELSE_IF PRODUCT.Sku --][-- IF PRODUCT.DisplaySku --]<span itemprop="sku" content="[-- PRODUCT.Sku --]" id="bb-misku" class="[-- PRODUCT.SKUStyle --] [-- PRODUCT.SKUSize --]">[-- PRODUCT.Sku --]</span>[-- END_IF --][-- END_IF --][-- END_IF --]
[-- IF PRODUCT.DisplayAddtoCart NE "Not Displayed" --]
<form id="bb-miform" action="[-- SHOPPING_CART_URL Base --]/order.cgi" method="post"[-- IF PRODUCT.SubProduct --][-- IF VAR.SubProductType NE "select" --] onsubmit="return checkSubproducts(this);"[-- END_IF --][-- ELSE_IF PRODUCT.OptionFiniteText --][-- IF PRODUCT.UseMultiMenus checked --][-- ELSE --] onsubmit="return selectCheck(this);"[-- END_IF --][-- END_IF --]><input type="hidden" name="storeid" value="[-- STORE.ID --]"><input type="hidden" name="dbname" value="products"><input type="hidden" name="function" value="add">
[-- IF PRODUCT.SubProduct --]<div id="bb-misub">[-- IF VAR.SubProductType "select" --]<select name="itemnum">[-- END_IF --][-- LOOP SUBPRODUCTS --][-- SUBPRODUCTS BB-Product.sst --][-- END_LOOP SUBPRODUCTS --][-- IF VAR.SubProductType "select" --]</select>[-- END_IF --]</div>
[-- ELSE --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
[-- IF PRODUCT.VariablePrice? --][-- IF PRODUCT.VariableName? --]<span class="bb-mivar"><span id="bb-mivarnmet" class="bb-mivart">[-- VAR.ProductName --]:</span><input name="[--PRODUCT.RecordNumber--]:name" size="20" value="" type="text" id="bb-mivarnme"></span>[-- END_IF --] [-- IF PRODUCT.VariableSku? --]<span class="bb-mivar"><span id="bb-mivarskut" class="bb-mivart">[-- VAR.Sku --]:</span><input name="[--PRODUCT.RecordNumber--]:sku" size="10" value="" type="text" id="bb-mivarsku"></span>[-- END_IF --][-- IF PRODUCT.VariablePrice? --]<span class="bb-mivar"><span id="bb-mivarprct" class="bb-mivart">[-- VAR.Price --]:</span>[-- STORE.CurrencySymbol --]<input name="[--PRODUCT.RecordNumber--]:price" size="4" value="" type="text" id="bb-mivarprc"></span>[-- END_IF --][-- END_IF --]
[-- IF PRODUCT.DisplayOrderingOptions --]<div id="bb-miopt">[-- IF PRODUCT.OptionText --]<span id="bb-mioptt">[-- PRODUCT.OptionText --]</span>[-- END_IF --][-- Order_Option_Menu Column --][-- IF PRODUCT.OptionsBox --][-- IF PRODUCT.OptionsBoxHeader --]<span id="bb-mitxtt"[-- IF PRODUCT.OptionFiniteText --] class="bb-padt"[-- END_IF --]>[-- PRODUCT.OptionsBoxHeader --]</span>[-- END_IF --]<textarea name="[-- PRODUCT.Recordnumber --]:freeopt" cols="[-- PRODUCT.OptionsBoxColumns --]" rows="[-- PRODUCT.OptionsBoxRows --]"></textarea>[-- END_IF --] </div>[-- END_IF --]
[-- IF PRODUCT.DisplayOrderQuantity --]<span id="bb-miqty">[-- STORE.Qty --]: <input type="text" size="3" value="[-- IF PRODUCT.MinimumQuantity GE "1" --][-- PRODUCT.MinimumQuantity --][-- ELSE --]1[-- END_IF --]" name="[-- PRODUCT.RecordNumber --]:qnty"></span>[-- END_IF --]
# end if for subproducts
[-- END_IF --]
[-- IF ADDIMAGE? --]<input id="bb-miaddimg" type="image" [--ADDIMAGE--] alt="[-- PRODUCT.AddToCartButton --]">[-- ELSE --]<input id="bb-miaddtxt" class="bb-bigsubmit" type="submit" value="[-- ADDTEXT --]">[-- END_IF --]
</form>
<div class="clear"></div>
# end if for displaying add to cart on pages
[-- END_IF --]
[-- IF WishList --][-- WishList --][-- END_IF --]
<div id="bbsocialshare">[-- SOCIAL_SHARE tag --][-- IF TellAFriend --]<span id="tellafriend">[-- TellAFriend VAR.ProductName --]</span>[-- END_IF --]</div>
[-- IF VAR.FileName NE "index.html" --]<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.FileName --]" title="[-- VAR.LinkTitle --]">Back to [-- VAR.LinkName --]</a>[-- END_IF --]
</div><!-- closing bb-miinfo -->
  <div class="clear"></div>
 
[-- IF PRODUCT.MoreInformationText --]<div id="bb-mi-moreinfotext" class="bb-mi-regsection lmt">[-- PRODUCT.MoreInformationText --]</div>[-- END_IF --]
[-- IF PRODUCT.Specifications --]<div id="bb-mi-specifications" class="bb-mi-regsection lmt"><span class="bb-mi-regtitle">[-- STORE.Specifications --]</span>[-- PRODUCT.Specifications --]</div>[-- END_IF --]
<div id="bb-mi-createdtable" class="bb-mi-regsection lmt">
  [-- IF PRODUCT.HowToUse --]<div class="bb-mi-createdtable"><span class="bb-mi-createdcell-title">[-- STORE.HowToUse --]</span><div class="bb-mi-createdcell">[-- PRODUCT.HowToUse --]</div></div>[-- END_IF --]
  [-- IF PRODUCT.Materials --]<div class="bb-mi-createdtable"><span class="bb-mi-createdcell-title">[-- STORE.Materials --]</span><div class="bb-mi-createdcell">[-- PRODUCT.Materials --]</div></div>[-- END_IF --]
  [-- IF PRODUCT.Warranty --]<div class="bb-mi-createdtable"><span class="bb-mi-createdcell-title">[-- STORE.Warranty --]</span><div class="bb-mi-createdcell">[-- PRODUCT.Warranty --]</div></div>[-- END_IF --]
  [-- IF PRODUCT.ShippingDetails --]<div class="bb-mi-createdtable"><span class="bb-mi-createdcell-title">[-- STORE.ShippingDetails --]</span><div class="bb-mi-createdcell">[-- PRODUCT.ShippingDetails --]</div></div>[-- END_IF --]
  [-- IF PRODUCT.Returns --]<div class="bb-mi-createdtable"><span class="bb-mi-createdcell-title">[-- STORE.Returns --]</span><div class="bb-mi-createdcell">[-- PRODUCT.Returns --]</div></div>[-- END_IF --]
[-- IF VAR.SizeFitRadio "yes" --]<div class="bb-mi-createdtable"><span class="bb-mi-createdcell-title">[-- STORE.SizeFitGuide --]</span><div class="bb-mi-createdcell">[-- IF PRODUCT.SizeFitGuide EQ I --]<img src="[-- PRODUCT.SizeFitGuideImage URL_ONLY --]" alt="[-- IF PRODUCT.SizeFitGuideImageDesc --][-- PRODUCT.SizeFitGuideImageDesc --][-- ELSE --][-- PRODUCT.Name REMOVE_HTML --] [-- STORE.SizeFitGuide --][-- END_IF --]">[-- ELSE --][-- PRODUCT.SizeFitGuideText --][-- END_IF --]</div></div>[-- END_IF --]
</div>
[-- IF PRODUCT.Video --]<div id="bb-mi-video" class="bb-mi-regsection">[-- PRODUCT.Video --]</div>[-- END_IF --]
[-- IF REVIEWS --][-- IF Reviews_Count_Number GE 1 --]<div id="bb-mireviews" class="bb-mi-regsection lmt">[-- REVIEWS_STARS --]  [-- REVIEWS_COUNT --]<br>[-- REVIEWS_WRITE_REVIEW_LINK --] [-- REVIEWS_READ_REVIEWS_LINK --][-- REVIEWS_FEATURED --]<div class="clear"></div></div>[-- ELSE_IF VAR.DoubleReviewSummary "no" --]<div class="clear">[-- REVIEWS_WRITE_FIRST --]</div>[-- END_IF --][-- END_IF --]
[-- IF PRODUCT.AsSeenInImage --]<div id="bb-mi-asseenin" class="bb-mi-regsection"><span class="bb-mi-regtitle">[-- STORE.AsSeenIn --]</span><img src="[-- PRODUCT.AsSeenInImage URL_ONLY --]" alt="[-- IF PRODUCT.AsSeenInImageDesc --][-- PRODUCT.AsSeenInImageDesc --][-- ELSE --][-- PRODUCT.Name REMOVE_HTML --] [-- STORE.AsSeenIn --][-- END_IF --]"></div>[-- END_IF --]
<div class="clear"></div></div></div>
[-- INCLUDE BB-LeftMenu.sst PROCESS --]
[-- IF PageLinks.Left --]<div class="clear"></div></div>[-- ELSE_IF PageLinks.Right --]<div class="clear"></div></div>[-- END_IF --]

[-- VAR.CrossSell "no" --]
[-- IF PRODUCT.MoreInformationProductCrossSell --][-- IF PRODUCT.CrossSell NE "0" --][-- VAR.CrossSell "yes" --][-- END_IF --][-- END_IF --]
[-- IF PRODUCT.MoreInformationGlobalCrossSell --][-- VAR.CrossSell "yes" --][-- END_IF --]
[-- IF VAR.CrossSell "yes" --]
<section id="bb-bestsellers"><div id="bb-divbestsellers"><h2 id="bb-globalcrosssellhdr"[-- IF VAR.DisplayColumnBorders --][-- ELSE --] class="bb-bottomborder"[-- END_IF --]>[-- IF PRODUCT.MoreInformationProductCrossSell --][-- IF PRODUCT.CrossSell NE "0" --][-- STORE.CartCrossSellHeader --][-- ELSE --][-- STORE.GlobalCrossSellHeader --][-- END_IF --][-- ELSE --][-- STORE.GlobalCrossSellHeader --][-- END_IF --]</h2><div id="bbgcrosssell" class="loopinfinite5[-- IF VAR.DisplayColumnBorders --] infinitecrossborders[-- END_IF --]"><ul id="bb-loopgcross" class="bb-loopheight">
[-- IF PRODUCT.MoreInformationProductCrossSell --][-- IF PRODUCT.CrossSell NE "0" --][-- VAR.CrossProductType "productcross" --][-- VAR.ProductCrossCount 0 --][-- LOOP Product_Cross_Sell --]<li class="prod">[-- VAR.ProductCrossSellDefine.sst BB-ProductCrossSellDefine-Infinite.sst --][-- PRODUCT_CROSS_SELL BB-Product.sst --]</li>[-- END_LOOP Product_Cross_Sell --][-- END_IF --][-- END_IF --]
[-- IF PRODUCT.MoreInformationGlobalCrossSell --][-- VAR.ProductGlobalCrossCount 0 --][-- LOOP GLOBAL_Cross_Sell --]<li class="prod">[-- VAR.ProductCrossSellDefine.sst BB-ProductCrossSellDefine-Infinite.sst --][-- GLOBAL_CROSS_SELL --]</li>[-- END_LOOP Global_Cross_Sell --][-- END_IF --]
</ul><div class="clear"></div></div></div></section>
[-- END_IF --]


3. Publish your store under Utilities > Publish > Regenerate.
- 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 User Forum

Who is online

Users browsing this forum: No registered users and 60 guests