Where are global variables defined?

General ShopSite user discussion

Where are global variables defined?

Postby bubblefast » Fri Apr 20, 2007 9:53 am

Hi. My name is Mark. I am a new user still trying to learn my way through an initial setup.

I have copied the Shopsite custom Include template, "Subproduct-AddToCartButton" so that I can customize some changes.

In this template there is a line that reads:

<input type=image class="add" src="[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.Media --]/[-- VAR.AddButtonGraphic --]" name="Add to Cart" alt="Add to Cart">

My question is: Where are the variables VAR.Media and VAR.AddButtonGraphic defined? I want to change the graphic, but cannot locate the path.

Any help you can give me will be greatly appreciated.

Thanks,
Mark
mark@bubblefast.com
bubblefast
 
Posts: 9
Joined: Sat Apr 07, 2007 4:16 pm

Postby Jim » Fri Apr 20, 2007 10:22 am

VARs can be defined in any file and will be active during the publish until it is reset by being assigned a different value. It would probably depend on the page or product template that you are using where they are defined. There are a number of include files that are named so they end with "vars.sst" that may contain the information that you are looking for. here are a few of them.

classy_pa_vars.sst
classy_pr_moreinfo_vars.sst
elite_001_pa_vars.sst
elite_001_pr_vars.sst
elite_001_se_vars.sst
gradient1-vars.sst

The pa or pr in the name indicates a page or product template.

NOte that you do not have to use VARs for the media directory or the image name if you don't want to. You can just hard code the value if it will always be the same.

<input type=image class="add" src="http://mydomain.com/media/AddButtonGraphic.jpg" name="Add to Cart" alt="Add to Cart">

Would work just as well as using the
<input type=image class="add" src="[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.Media --]/[-- VAR.AddButtonGraphic --]" name="Add to Cart" alt="Add to Cart">

if the add to cart image is always in the store's media directory and is named AddButtonGraphic.jpg. The use of VARs just adds some flexibility for the way the store can be configured.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 40 guests