VirtueMart Forum

VirtueMart 2 + 3 + 4 => 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
Quote from: gain on September 17, 2013, 12:10:11 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?
Title: Re: Product category layouts not works if the category is unpublished
Post by: gain on September 18, 2013, 13:15:17 PM
Quote from: Maxim Pishnyak on September 18, 2013, 09:51:05 AM
Quote from: gain on September 17, 2013, 12:10:11 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
Quote from: gain on September 18, 2013, 13:15:17 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
Quote from: Maxim Pishnyak on September 18, 2013, 20:56:35 PM
Quote from: gain on September 18, 2013, 13:15:17 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
Quote from: 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.

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... :)