Question about ShopSite variables.

General ShopSite user discussion

Question about ShopSite variables.

Postby volemax » Fri May 16, 2008 7:17 am

Hello.

If I set a variable on one page([-- VAR.tmp "string" --]), should it have this value on another page of the same template?

Thanks in advance.
volemax
 
Posts: 10
Joined: Thu Jan 31, 2008 4:27 am

Postby Jim » Fri May 16, 2008 7:25 am

During the same publish session it will retain the value until it is set to something else. So if you have the same variable name used in different page templates or in product templates it will be the same. However if it is changed by any other template it will be changed for all.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Question about ShopSite variables.

Postby volemax » Fri May 16, 2008 7:32 am

I use cr_default template.

On the New Customer Registration Page I wrote

[-- VAR.tmp " some text " --]

On the Main View/Edit Page with Buttons I wrote

[-- Var.tmp --]


And when I load the page in the browser I do not see nothing, even in the source.

Thanks a lot.
volemax
 
Posts: 10
Joined: Thu Jan 31, 2008 4:27 am

Question about ShopSite variables.

Postby volemax » Fri May 16, 2008 8:10 am

If I will try to display the variable on the same page, then it will be displayed.
volemax
 
Posts: 10
Joined: Thu Jan 31, 2008 4:27 am

Postby Jim » Fri May 16, 2008 9:26 am

The customer registration pages are not associated with the store product pages so variable set on those templates will have not affect on pages when the store is generated.

Vars set in Page or Product templates will be active during the publish of pages with products on them and only during that particular publish cycle.

Vars set in registration, shopping cart, search, giftcertificate, tell a friend templates will only be active on the screen that that particular template creates. This is because these screens are generated dynamically and are not static html pages like the ones containing products so the vars are removed when the process used to create the screen completes.
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 98 guests