VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: gain on September 17, 2013, 12:10:11 pm

Title: Product category layouts not works if the category is unpublished
Post by: gain on September 17, 2013, 12:10:11 pm
Hi all,
I have an unpublished category I use in other part of the site with  mod_virtuemart_product.

I need a custom layout for these products, but I noticed that if the category is unpublished layout specification in category edit is not used: the default one is loaded.

Is that the correct behaviour or a little bug?

Thanks in advance for the support.
Hope in a reply.

Bye
Title: Re: Product category layouts not works if the category is unpublished
Post by: jenkinhill on September 17, 2013, 15:32:15 pm
http://forum.virtuemart.net/index.php?topic=79800
Title: Re: Product category layouts not works if the category is unpublished
Post by: gain on September 17, 2013, 15:54:54 pm
Joomla 2.5.14
VirtueMart 2.0.22a
PHP 5.3.10
No live url, I'm working in localhost, sry... and I use custom overrides but no Joomla template with VirtueMart styling...

Sry for the inaccuracy...
Title: Re: Product category layouts not works if the category is unpublished
Post by: Maxim Pishnyak on September 18, 2013, 09:51:05 am
I have an unpublished category I use in other part of the site with  mod_virtuemart_product.
Why you can't use published category?
Title: Re: Product category layouts not works if the category is unpublished
Post by: gain on September 18, 2013, 13:15:17 pm
I have an unpublished category I use in other part of the site with  mod_virtuemart_product.
Why you can't use published category?

My customer sells products and want to add events (with an entrance fee) where he presents and test his products.
So we have put events as products under an "events" category and created a part of the site for browsing them.

Quite cool, but we want not to show the "events" category and event-products related in the main part of the shop...
Title: Re: Product category layouts not works if the category is unpublished
Post by: Maxim Pishnyak on September 18, 2013, 20:56:35 pm
Quite cool, but we want not to show the "events" category and event-products related in the main part of the shop...
Why not hide them then with the help of template overrides?
Title: Re: Product category layouts not works if the category is unpublished
Post by: gain on September 18, 2013, 21:04:57 pm
Quite cool, but we want not to show the "events" category and event-products related in the main part of the shop...
Why not hide them then with the help of template overrides?

Thanks for the idea. Its not so simple cause I use the custom filters plugin, but I'll try that way...
Title: Re: Product category layouts not works if the category is unpublished
Post by: Milbo on September 21, 2013, 11:35:23 am
Unpublished categories are considered for calculation. I do not understand your setup. The layout is taken, when you call the category. But when the category is unpublished, you cant display the category, therefore there is no possibility to take the layout.
Title: Re: Product category layouts not works if the category is unpublished
Post by: gain on September 21, 2013, 11:47:58 am
Unpublished categories are considered for calculation. I do not understand your setup. The layout is taken, when you call the category. But when the category is unpublished, you cant display the category, therefore there is no possibility to take the layout.

When the category is unpublished you can't display the category, but you can display published products inside that category (ie with mod_virtuemart_product)...

Well... if the product layout is set on category and the category is unpublished, that layout is unpublished too... quite right behaviour, I think... :)