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

HELP: Category Browse Template for Different Category Not Working?

Started by DPM, March 28, 2013, 06:43:21 AM

Previous topic - Next topic

DPM

I'm not sure what I'm doing wrong here but I hope someone can shed some light on this.  I'm only using one Joomla template for the site (running Joomla 2.5.9/VM 2.0.20b) but I want a slightly different Category Browse template for some categories (ones that include bundled products, since the images used need to be slightly bigger).  I've created the subdirectory in my site template directory (templates/template-name/html/com_virtuemart/category/) and have copied both the default.php file as well as a copy renamed wideCategory.php (for the wider images).  VM sees the wideCategory and provides it as an option for "Category Browse Page" when editing the specific category in VM.  I've selected the wideCategory option and yet it still gives me the default option.  It doesn't matter if I have the template option set to "Use Shop Default" or the specific template I'm using, or even if I have it set to one of the default Joomla templates.

Does anyone know why this isn't working?  Any help would be greatly appreciated.

Thanks,
Matt

DPM

Would this work correctly if I just completely duplicated my Joomla template and simply modified the default.php file in the /html/com_virtumart/category directory, then set the template override in the Joomla menu link?  It sure doesn't seem like it should have to be done this way, but I need to get this site completed ASAP and a little duct tape is fine for now.  Again, any help is greatly appreciated.

PRO

this should be working correctly.

So, in the category you have

For
Category Browse Page    ('slected wideCategory')
?


what happens when you remove

widecategory   FROM the REGULAR  views folder?

and only have it in your override folder?

does the default.php   override correctly?


DPM

Thanks for replying.

Removing the wideCategory.php file from the VM views folder (views/category/tmpl/) didn't change anything.  It appears that if a default.php file exists in the templates directory (templates/template-name/html/com_virtuemart/category/), it overrides, regardless of the settings in the master VM config or the individual category settings pages.  I also tried removing the default.php file from that directory so that all that was left was the wideCategory.php file.  VM still recognized it in the list of choices, but setting it (main config or category config) didn't do anything.  Just for clarity, here's the two files that exist:

Joomla-root/components/com_virtuemart/views/category/tmpl/default.php (plus the other standard files that come with VM)
Joomla-root/templates/template-name/html/com_virtuemart/category/wideCategory.php (no default.php file in that folder)

Any ideas?

PRO


DPM

Quote from: PRO on March 28, 2013, 22:56:38 PM
does the default.php   override correctly?

Yes and no.  Yes in that it overrides the core default.php file (in views) if it exists (in templates).  No in that it does so automatically regardless of whether the configuration settings are set or not (if it exists in templates, it overrides, if not, it doesn't).

PRO

in regular vmart config


what do you have for "Category Layout " ?

DPM

Right now  I have it set for "No Override", but either way it overrides if there is a default.php file in the templates/template-name/html/com_virtuemart/category directory.  Same thing for the category settings on one of the categories I want to override.

http://i.minus.com/jglCDnXZnfvu1.png

http://i.minus.com/jl4RbAwwwroUE.png

PRO

mine is set to

default

&& i can override it with another per category

DPM

Very strange.  I tested with the productdetails default.php file in templates/template-name/html/com_virtuemart/productdetails/ and the same thing happens.  Settings are still the same as above, but it's overriding anyway.

PRO

you are doing something wrong, or overlooking something.

what about joomla template settings? are you using more than 1 template?

DPM

Already thought about that.  I'm only using one template.  I did try using the template override with one of the menu links to see if it made a difference, but it still did the same thing.  I'm going to try zipping up the site and putting it on a different server, just to see what happens.