VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: caseyd on September 04, 2012, 16:43:58 PM

Title: Product Details Page Override does not save selection from product page
Post by: caseyd on September 04, 2012, 16:43:58 PM
I have made a copy of the default.php file in the views/productdetails folder and named it default-equipbundles.php in same folder.
I then go to the product edit page in admin backend and select the new file under "Product Details Page" setting and click save.
When the page refreshes, my selection is not still selected and the current select is "no Override"

Why isn't it keeping this selection when saving?
Title: Re: Product Details Page Override does not save selection from product page
Post by: vigier on September 04, 2012, 21:46:53 PM
Hi, it could be the - sign in the name. Rename the file to default_equipbundles.php (with an _ instead of - ) and try it again.
I had this about 2 months ago and I think this is how I fixed it.
Title: Re: Product Details Page Override does not save selection from product page
Post by: caseyd on September 04, 2012, 22:59:54 PM
I've changed the filename to : default_equipbundles.php and now it doesn't display in the selection list at all..... so I changed it to: defaultequipbundles.php (no special characters) and it displays again, but still does not show the saved selection after saving.
Title: Re: Product Details Page Override does not save selection from product page
Post by: Rocked on September 10, 2012, 19:58:28 PM
Ran into this myself today... found the answer and thought I'd share!

Rename the file something SHORTER - debugged it and found it saves the file name as a char(16) in the database.  Renamed my file to 8 characters and Bingo!

Hope this helps someone.

:D
Title: Re: Product Details Page Override does not save selection from product page
Post by: caseyd on September 10, 2012, 22:08:18 PM
That was it! Renamed the file to a shorter filename - also - I DID NOT have to keep the prefix 'default' for it to show up in the list.
Title: Re: Product Details Page Override does not save selection from product page
Post by: WebStuff on November 20, 2012, 16:41:41 PM
Thanks for pointing out the fix, I was tearing my hair out wondering what I was doing wrong.
Really think a small info popup saying filename must not be longer than 16 characters next to the override box would help.