News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How does Category override work?

Started by whoami, December 11, 2011, 22:08:15 PM

Previous topic - Next topic

whoami

Maybe I'm doing something wrong. I've created a category override in my template HTML dir with a different name then default.php. It's called lesson.php

template_dir/html/com_virtuemart/productdetails/lessons.php

In the config of Virtuemart I've selected in the template area "no override" for the product template. In the Category I've selected "lesson.php" as override. Doesn't work. When I select default.php as override it works for the change default.php. Everything else with a different name then default.php do not work.

What I'm doing wrong?

JtouchMobile.com

You are doing a template overwrite, so why not make it easy by changing the lessons.php to default.php ?

(template_dir/html/com_virtuemart/productdetails/default.php)
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com

whoami

I need two different layouts for different productcategories.

BTW, why have an option choosing your layout when this option doesn't work?

JtouchMobile.com

It works with my RC2 J (K now :( )
Here is what I have done:
- From components/com_virtuemart/views/category/tmpl
creata a copy of default.php -> extra.php
modify extra.php to what I want to

- From backend -> Products menu ->Product Categories
edit the category I want to apply this extra template
set "extra" for "Category Browse Page" -> save it (see my screenshot)

- Browse the category on frontend, attached file is what I'm seeing


[attachment cleanup by admin]
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com

whoami

@MobileMeWs: Thanks I've tried the category override and it did work BUT try the same with a productdetail override (that is what I initialty ment, my wrong). The productdetail override doesn't work.

carlos.alonso

Hi,

I was having the same problem, then i realized i had an Uppercase letter in the name of the view, i changed to lower case and now i can override without any problem.

It was silly of me but this was my problem, hope it is useful.