VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: zorigo on July 12, 2022, 19:22:10 PM

Title: Custom fields no longer showing
Post by: zorigo on July 12, 2022, 19:22:10 PM
I have a couple of sites that I have updated to VM 4.0.6.  Within these sites I had custom fields that were pulled into the product details page.  However, they are no longer showing on the page.  Specifically, one is a custom field that is supposed to show is an editor type custom field that shows the ingredients for the the product.  Previously, the below worked.  Has this changed?

<?php echo shopFunctionsF::renderVmSubLayout('customfieldstabs',array('product'=>$this->product,'position'=>'ingredients'));?>
Title: Re: Custom fields no longer showing
Post by: pinochico on July 12, 2022, 23:55:27 PM
Why don't you look inside origin template from VM for compare code?

Oh men, do it you anything self :)
Title: Re: Custom fields no longer showing
Post by: zorigo on July 13, 2022, 14:24:30 PM
I did and the logic is the same in the original product details page.  It's just simply not pulling in custom fields from my custom sublayout.
Title: Re: Custom fields no longer showing
Post by: pinochico on July 13, 2022, 16:40:20 PM
and your sublayout is only in template override?
Title: Re: Custom fields no longer showing
Post by: zorigo on July 14, 2022, 16:18:18 PM
Yes, that is correct.

Sub Layout is in /templates/template_name/html/com_virtuemart/sublayouts
Product Details is in /templates/template_name/html/com_virtuemart/productdetails

And everything worked correctly until I updated virtuemart to VM 4.0.6
Title: Re: Custom fields no longer showing
Post by: GJC Web Design on July 14, 2022, 17:36:15 PM
if u temp rename your sublayout folder?
Title: Re: Custom fields no longer showing
Post by: zorigo on July 15, 2022, 17:09:04 PM
Doesn't the product details look for sublayouts in the sublayouts folder?  Won't that break the page entirely?  Maybe I'm not understanding what you are saying.
Title: Re: Custom fields no longer showing
Post by: pinochico on July 15, 2022, 18:07:00 PM
no, temporary rename your folder - name sublayout in template folder in
html/com_virtuemart/sublayout

to html/com_virtuemart/_sublayout

and check on your website if cusotmfiled show on product detail or not == now you use not override from template but original sublayout forlder from core VM.
Title: Re: Custom fields no longer showing
Post by: zorigo on July 15, 2022, 19:49:53 PM
That worked!  SO weird. Thank you so much!
Title: Re: Custom fields no longer showing
Post by: GJC Web Design on July 15, 2022, 19:54:51 PM
it's not weird .. it simply proves that the override in  /templates/template_name/html/com_virtuemart/sublayouts is not compatible with VM4