VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: paolo69 on December 22, 2012, 19:48:18 PM

Title: Product default layout
Post by: paolo69 on December 22, 2012, 19:48:18 PM
Hi guys,

I've just upgraded from 2.0.14 to .16 and unfortunately it looks like the "Product Layout" in Configuration->Templates and "Default Product Details Page" in Products-> Product Categories are being ignored.
Under Product Categories is not even saving the selected view I've created.
It works if I set the template manually in each product.

The product template view I've created worked perfectly in 2.0.14 just selecting it as the default one from the configuration page.

Is it a regression or an undocumented features?
Any suggestion?

Thanks
Title: Re: Product default layout
Post by: jenkinhill on December 23, 2012, 12:58:26 PM
The live update changelist is on http://virtuemart.net/index.php?option=com_content&id=416

Updating did not affect my layouts.
Title: Re: Product default layout
Post by: Milbo on December 23, 2012, 14:05:53 PM
The overwrite ordering is:
vm config, global
category,
product.

So you say the vm config and the category is ignored? Strange I worked on this, fixed something there, tested it and some users tested it also, so I am very suprised.
Title: Re: Product default layout
Post by: Milbo on December 23, 2012, 14:30:55 PM
Please exchange in FE/views/productdetails/view.html.php line 333


shopFunctionsF::setVmTemplate($this, $category->category_template, $product->product_template, $category->category_layout, $product->layout);


with


shopFunctionsF::setVmTemplate($this, $category->category_template, $product->product_template, $category->category_product_layout, $product->layout);
Title: Re: Product default layout
Post by: paolo69 on December 23, 2012, 21:16:31 PM
Thanks Milbo,

that did the trick.

I thought it was something silly but I don't have enough experience on the inner workings of VM2 yet to find the issue by myself.

Thanks again.

Paolo
Title: Re: Product default layout
Post by: Milbo on December 23, 2012, 22:08:43 PM
I even found another problem, thanks to PatBe60. I prepare an "a"version.
Title: Re: Product default layout
Post by: patrik60 on January 03, 2013, 10:24:11 AM
QuoteI even found another problem, thanks to PatBe60. I prepare an "a"version.

Unfortunately the problem is not completely solved in the "a" version:

The layouts are now working correctly. But the path in breadcrumbs is still wrong, when selecting a child variant of the parent product. (The child product is not assigned to any category.)

e.g. I select a subcategory (Various) of a maincategory (Arrangements) and after I select a product from the product module then the path is correct:

shop->arrangements->correct-subcategory->productname (look at pic 1)

After I select a child variant of the product in the dropdown menu and the path looks like this:

shop->arrangements->various->arrangements->correct-subcategory->productname (pic 2)

After selecting the parent product and childproduct again the path is shown correctly.



[attachment cleanup by admin]