where can I edit [-- INCLUDE VAR.PriceDisplay PROCESS --]

Questions and answers about ShopSite Custom Templates

where can I edit [-- INCLUDE VAR.PriceDisplay PROCESS --]

Postby ecomshopsite » Wed Jul 15, 2015 3:58 pm

Hi,

Due to legal restrictions around advertising supplements

I have two types of products
regular pricing with a sale price. (GENERAL) These need to say "Regular Price You Save - so the defaults are fine.
R.R.P with a sale price (NPC) I need to change the wording on the product template for these to be different and say RRP and Your price.

I am running the BBProduct-2ColumnTabs.sst on General Products (which is running as needed with the right wording)
I have created a new template called BBNPCProduct-2ColumnTabs.sst and assigned it to the products that need to have different wording.

With subsequent BB-ProductPageContent-2ColumnsTabs.sst and BB-NPCProductPageContent-2ColumnsTabs.sst

- - - - - - - - - - - - - - - - - - - -
ON A COLLECTION CATERGORY PAGE
- - - - - - - - - - - - - - - - - - - -
The pricing layout on the catergory/collection page of BBProduct-2ColumnTabs.sst and BBNPCProduct-2ColumnTabs.sst is controlled by either

[-- VAR.Price STORE.Price --]
[-- INCLUDE VAR.ProductDefine PROCESS --]

I tried to create a version of BB-ProductDefine.sst called BB-ProductDefineNPC.sst and tweaked the wording.
I tried to replace -- INCLUDE VAR.ProductDefine PROCESS --] with -- INCLUDE VAR.ProductDefineNPC PROCESS --]
But this just returned a red error message saying it wasn't working.

- - - - - - - - - - - - - - - - - - - -
ON A PRODUCT PAGE
- - - - - - - - - - - - - - - - - - - - - - - -

The Pricing Layout on a more info page is controlled by a tag called [-- INCLUDE VAR.PriceDisplay PROCESS --] found in Merchanding tools > Custom Templates > Includes > BB-ProductPageContent-2ColumnTabs.sst

Where can I find this [-- INCLUDE VAR.PriceDisplay PROCESS --] to edit it it? I cant find an include called PriceDisplay

Where the product template is BBProductPageContent-2ColumnTabs.sst I want things to say as is
Where the product page is BBProductPageContent-2ColumnTabs.sst

How and where can I control the wording and layout of

Original price + Sale Price?
i,e, where do I edit these ?
[-- INCLUDE VAR.PriceDisplay PROCESS --]
[-- VAR.Price STORE.Price --]
[-- INCLUDE VAR.ProductDefine PROCESS --]
Lucy Ross – Business Growth Hacker
www.ecommercemarketing.co.nz | www.getmorelocalcustomers.co.nz
ecomshopsite
 
Posts: 6
Joined: Wed Jul 15, 2015 3:42 pm
Location: Auckland, New Zealand

Re: where can I edit [-- INCLUDE VAR.PriceDisplay PROCESS --

Postby Jim » Thu Jul 16, 2015 9:25 am

A VAR... is a variable that has been configured somewhere in the template code itself.

In the case of [-- VAR.Price STORE.Price --] that you mentioned it is creating a Variable name "VAR.Price" and assigning the value of STORE.Price to it. "STORE.Price" is the template tag for the text in the Price field configured on Preferences > Store Text > Store Pages . I'm not sure why they are assigning that text to a variable but it may be that the template tag [-- STORE.Price --] can't be used in some other template so they are putting in a variable that can be use.

The tag [-- INCLUDE VAR.PriceDisplay PROCESS --] is trying to INCLUDE a filename which is stored in the variable VAR.PriceDisplay. That variable will probably change based on setting you have assigned for pricing options such as quantity pricing, variable pricing, sale pricing etc. It can be difficult to find where in the template(s) a particular var is being defined. If you have access to the server and you are familiar with grep you can go to the templates directory and grep for the particular VAR and see if you can find it that way. Another thing I do is just output the value of the VAR to see what it is. I would do something like this in the place where you want to change [-- INCLUDE VAR.ProductDefine PROCESS --] with [-- INCLUDE VAR.ProductDefineNPC PROCESS --] insert a statement <p>VAR- Product define = [-- VAR.ProductDefine --] <p> in a place where it will display on the html page then you can look at the html page and see what the actual value of VAR.ProductDefine is.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: where can I edit [-- INCLUDE VAR.PriceDisplay PROCESS --

Postby ShopSite Lauren » Fri Jul 17, 2015 3:22 pm

On the 2 include files, those are part of the BB theme, so that (1) different pricing layouts can be used, and (2) so that different product layouts can be used by different pages with the same product. I've given more information about each of these below. [-- VAR.Price STORE.Price --] is just replaced by the basic text "Price" that is configured under Preferences > Store Text > Store Pages.

[-- INCLUDE VAR.PriceDisplay PROCESS --]
With the BB theme files, there are 8 different product price layouts all in 8 different include files. Some are simple and used on category pages, some are more advanced layouts and only used on more information pages. If you want to edit the price display, I would suggest copying the code from the price display being used, and paste it into your custom template, then modify it there. To find out what price display is being used, you will want to look in the product template. Go to Merchandising > Custom Templates > Page/Product > Copy ShopSite Product Template, and make a copy of the product template your products are using. The default include file for the price display for BB themes is BB-PriceTwoLine.sst. If you are using the regular BB-Product.sst product template, then your product pages are using the BB-PriceTwoLine.sst include file to control the way the price is formatted. If you are using a different -.sst product template, there might be other product displays. You will look in the template for a tag that is formatted like the following [-- VAR.PriceDisplay BB-PriceTwoLine.sst --]. The second part of the tag will tell you what include file is being used for the price display.

If you want to quickly test out the other 7 price displays to see if any of them fit your needs, you can go to Merchandising > Custom Templates > Page/Product > Edit Product Template, to edit the product template your products are currently using. Just after the [-- INCLUDE BB-VARs-DOCTYPE.sst PROCESS --] tag, enter one of the following 7 tags (try one out, then publish, then try another out and publish, etc). Save changes, then go to Utilities > Publish > Regenerate. ShopSite will recreate all your product pages with the new price display layout. If you don't like it, try another price display layout. The link below has an example of all 8 price layouts with the sale price being used.
[-- VAR.PriceDisplay BB-PriceOneLine.sst --]
[-- VAR.PriceDisplay BB-PriceOnly.sst --]
[-- VAR.PriceDisplay BB-PriceOnlyPlus.sst --]
[-- VAR.PriceDisplay BB-PriceQuickNDirty.sst --]
[-- VAR.PriceDisplay BB-PriceRounded.sst --]
[-- VAR.PriceDisplay BB-PriceTable.sst --]
[-- VAR.PriceDisplay BB-PriceTitled.sst --]

http://shopsite.com/templates/cookbook/builtintemplates-bbthemes-pricing.html



[-- INCLUDE VAR.ProductDefine PROCESS --]
With original ShopSite functionality, a product has a single product template assigned. The product template that is assigned is used to format the product information on all category pages the product is assigned to, plus the format for the more information page. There are a few page templates that need a specific product layout in order to work correctly (such as multi-add-to-cart page templates), so those page templates will force a particular product template, overriding the merchant's ability to change the product layout and can end up affecting the layout of the product's more information page. The VAR tag for the product layout allows the best of both worlds, the page template can control the product layout on that page only, and the merchant's choice for the product template can control the layout of the more information page. So every BB page template specifies the product layout/define/definition for that page, meaning that each BB page template may have a different VAR tag for the product define. The default for most page templates is the BB-ProductDefine.sst include file.

In version 12 sp 1, there are only 2 possible product defines, one for regular product pages, and one for multi-add-to-cart situations. So it is likely that in order to modify the code that is output by the VAR.ProductDefine, you would simply need to go to Merchandising > Custom Templates > Includes > Copy ShopSite Include, and make a copy of the BB-ProductDefine.sst include file. Then make a copy of your copy and rename it the exact same name as the original. This will make it so that your newly copied include file will override the original include file.

If you wanted to create your own -.sst include file, you could create the file, then go to Merchandising > Custom Templates > Page/Product > and edit the Page template your pages use, and change the current VAR.ProductDefine BB-ProductDefine.sst tag to now include your new include file name.
- 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 25 guests

cron