Author |
Topic |
|
windsurfer
VP-CART New User
Canada
91 Posts |
Posted - June 02 2009 : 12:25:29
|
I have asked VPASP before if the catagories can be displayed using templates and the answer was “By setting the template under the category record, the template will only apply to the the products of that particular category. The template only apply in shopdisplayproducts.asp page, but not in shopdisplaycategories.asp page.” Item # 3.15.2 says 1.1.1 “Category Display with Templates If you want more control over how your categories are displayed, it is possible to replace the default formatting of categories with your own unique HTML using templates. A template can be created using your favorite editor and is simply plain HTML with the addition of some special syntax that tells VP-ASP where it needs to fill in information from the database.
To use templates, you need to change the first Shop Configuration value. Xcategoryusetemplate Setting this to Yes switches to template mode xcategorydisplaytemplate This is the folder and name of the template to use. The default is tmp_categorytemplate.htm “ Now to me that means that a category can be displayed using a template by specifying on the creating a category page the template to use in the template file field, why else is that field there. So if I have a category called A (with subcaytegory B) then subcategory B should be able to be displayed using a template specified in the template file field of category A So here is what I did in the shop configuration: xcategorydisplaytemplate
The template used to format categories ________________________________________ xcategorydisplaytext
When categories are displayed, any data in the catmemo field is displayed under the category name and image ________________________________________ xcategoryproductsonly
When displaying categories, do not generate the words "products" and "subcategories" underneath the category image. Also, if this is Yes, you can only add products to bottom level categories. ________________________________________ xcategoryproducttemplates
Yes means to use the category template for formatting products associated with this category. This causes slightly more overhead. Templates cannot be mixed so a search for example, ignores this setting. ________________________________________ xcategoryusetemplate
Yes means to use templates when formatting categories ________________________________________
I specified in the category A template file field to use a certain template and now when I want to display Category B it tells me that there is no template specified. If I specify a name in the xcategorydisplaytemplate field then that template is used by all categories which means I can’t use different templates for different categories. I am not treying to display products I am trying to display the different categories and subcategories with a different template. I am not a genius but I am stupid either but I have been spending a lot of time on this and can’t figure it out. So if you want to take some points away here because your manual doesn’t explain this go ahead.
|
|
support
Administrator
4679 Posts |
Posted - June 02 2009 : 14:19:42
|
Sorry for any confusion with this.
As our support team has told you each time you have asked the category template setting in the category record allows you to control the layout of the products in shopdisplayproducts.asp on a category basis.
Unfortunately you can only use the one template by default for the category display on shopdisplaycategories.asp. This is defined in the config setting xcategorydisplaytemplate.
If you want to control the display on the categories page it would require custom coding to achieve.
You can tell what page you are on by checking the url as to whether it is a category or a product page.
Hope this helps.
Thanks Cam
VPASP Support |
|
|
windsurfer
VP-CART New User
Canada
91 Posts |
Posted - June 02 2009 : 15:06:11
|
I just tried to figure out what the field "xcategoryproducttemplates" means and there is absolutely nothing about that in the manual. In the shop setup there are 2 fields xcategoryproducttemplates YesNo Yes means to use the category template for formatting products associated with this category. This causes slightly more overhead. Templates cannot be mixed so a search for example, ignores this setting.
-------------------------------------------------------------------------------- xcategoryusetemplate YesNo Yes means to use templates when formatting categories
You will have to excuse me if i am i little ignorent here but they don't really explain a whole lot and what does it mean when one is set to yes and one is set to no , and vice versa bot set to no or both set to yes. Wil
|
|
|
support
Administrator
4679 Posts |
Posted - June 02 2009 : 15:14:03
|
Wil,
1. xcategoryproducttemplates set to Yes allows you to control what template is used for the shopdisplayproducts.asp page on a category basis.
So products under category A for example will use template tmp_productformatA.htm
Products under category B would use template tmp_productformatB.htm
The above are just examples and do not exist in the list.
2. xcategoryusetemplate allows you to use a template for the category page on shopdisplaycategories.asp. You only have limited flexibility with this as all category pages will use this template.
3. You cannot control the template used on a category level. Period.
I hope this explains how this works.
Thanks Cam
VPASP Support |
|
|
windsurfer
VP-CART New User
Canada
91 Posts |
Posted - June 02 2009 : 15:25:02
|
Hi Cam yes it does explain as a matter of fact a you have explained in a few lines what the manual manages to confuse in 200 pages. To be honest with you it's not in the manual but it soon will be.
|
|
|
support
Administrator
4679 Posts |
Posted - June 02 2009 : 16:50:27
|
Hi Wil,
I will have a look through the manual and see if we can clarify it for the new release.
Thanks for bringing this up.
Thanks Cam
VPASP Support |
|
|
|
Topic |
|