Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to let a product detailed page use different template?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 04-01-2015, 11:26 AM
 
Eyeglasses Expert Eyeglasses Expert is offline
 

eXpert
  
Join Date: May 2010
Posts: 307
 

Default How to let a product detailed page use different template?

My new site www.glassespeople.com need 3 different templates for eyeglasses, sunglasses, and help.
because these 3 categories related products have3 different contents to display.

Say:
category Eyeglasses: need prescription form
category Sunglasses: no need prescription form
category Help: only need prodcut description function
Reply With Quote
  #2  
Old 04-02-2015, 05:00 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: How to let a product detailed page use different template?

The easiest way to handle these needs is to assign a custom variable to the product details page in admin. In your case you have a checkbox "this is a prescription product". If you uncheck it the prescription options go away.

In the case of your category "Help" the plan is to not have product pages, rather use categories and subcategories to display the content. If you need a specific product page template for your Help category, a new checkbox can easily be added to the product details page, and you can mark the product as help. Then we can take action in the templates based on this checkbox.

For example:
Code:
{if $product.help eq 'Y'} {include file="customer/main/help.tpl} {else} {include file="customer/main/product.tpl} {/if}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 04-02-2015, 05:22 AM
 
Eyeglasses Expert Eyeglasses Expert is offline
 

eXpert
  
Join Date: May 2010
Posts: 307
 

Default Re: How to let a product detailed page use different template?

good idea, would you pls add this function for www.glassespeople.com ?
tks
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:34 PM.

   

 
X-Cart forums © 2001-2020