Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Displaying categories
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

windsurfer
VP-CART New User

Canada
91 Posts

Posted - June 02 2009 :  12:25:29  Show Profile  Visit windsurfer's Homepage  Reply with Quote
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  Show Profile  Visit support's Homepage  Reply with Quote
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
Go to Top of Page

windsurfer
VP-CART New User

Canada
91 Posts

Posted - June 02 2009 :  15:06:11  Show Profile  Visit windsurfer's Homepage  Reply with Quote
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

Go to Top of Page

support
Administrator

4679 Posts

Posted - June 02 2009 :  15:14:03  Show Profile  Visit support's Homepage  Reply with Quote
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
Go to Top of Page

windsurfer
VP-CART New User

Canada
91 Posts

Posted - June 02 2009 :  15:25:02  Show Profile  Visit windsurfer's Homepage  Reply with Quote
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.
Go to Top of Page

support
Administrator

4679 Posts

Posted - June 02 2009 :  16:50:27  Show Profile  Visit support's Homepage  Reply with Quote
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
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