Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Master template based on categories
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

g3nnin
VP-CART Super User

209 Posts

Posted - August 18 2014 :  16:22:07  Show Profile  Reply with Quote
Hi,

I know there is a master template (shoppage_header.htm & shoppage_trailer.htm) for the store.

But this template applied on all pages. How can I set this based on categories? For example:

- category01 = shoppage_header_cat01.htm & shoppage_trailer_cat01.htm
- category02 = shoppage_header_cat02.htm & shoppage_trailer_cat02.htm
- category03 = shoppage_header_cat03.htm & shoppage_trailer_cat03.htm


Thanks for the help!

Sharon
VP-CART Super User

357 Posts

Posted - August 20 2014 :  04:37:07  Show Profile  Visit Sharon's Homepage  Reply with Quote
As far as I know you can only use different templates for different categories on the actual product (extended description) pages.

On the product setup page under Advanced Fields, Template file.

Edited by - Sharon on August 20 2014 04:38:56
Go to Top of Page

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - August 21 2014 :  03:11:59  Show Profile  Reply with Quote
i never tried yet but it seems hard.
diego
Go to Top of Page

g3nnin
VP-CART Super User

209 Posts

Posted - September 11 2014 :  20:08:13  Show Profile  Reply with Quote
Hi,

I guess this would need a deep customization to the software then :(
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - September 15 2014 :  05:46:46  Show Profile  Visit serjtankian's Homepage  Reply with Quote
yeah it will need a deep customization






*serj*
Go to Top of Page

g3nnin
VP-CART Super User

209 Posts

Posted - September 15 2014 :  14:16:52  Show Profile  Reply with Quote
Hi all,

I finally made code changes that is a temporary fix. Simply find below code in shopheaders.asp:

dyninclude xMySite2 & "/templates/" & getconfig("xtemplate") & "/shoppage_header.htm"

dyninclude xMySite2 & "/templates/" & getconfig("xtemplate") & "/shoppage_trailer.htm"

then change it to this:

if (instr(request.ServerVariables("SCRIPT_NAME"), "cat=Dining") = 0) then
dyninclude xMySite2 & "/templates/" & getconfig("xtemplate") & "/shoppage_header_cat01.htm"
else
dyninclude xMySite2 & "/templates/" & getconfig("xtemplate") & "/shoppage_header.htm"
end if

if (instr(request.ServerVariables("SCRIPT_NAME"), "cat=Dining") = 0) then
dyninclude xMySite2 & "/templates/" & getconfig("xtemplate") & "/shoppage_trailer_cat01.htm"
else
dyninclude xMySite2 & "/templates/" & getconfig("xtemplate") & "/shoppage_trailer.htm"
end if

the above code will applies to a category with name of "Dining". You would also need to make sure that both shoppage_header_cat01.htm & shoppage_trailer_cat01.htm templates are created in the same template folder that is currently enabled.


Need your thought about this guys!
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - September 16 2014 :  05:11:07  Show Profile  Visit serjtankian's Homepage  Reply with Quote
so if i want create to other category i only need to change "cat=Dining" to my category name?






*serj*
Go to Top of Page

g3nnin
VP-CART Super User

209 Posts

Posted - September 16 2014 :  15:56:00  Show Profile  Reply with Quote
Hi Serj,


That''s right
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00