VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: effettoMapet on July 10, 2023, 20:50:50 PM

Title: Custom fields in category page
Post by: effettoMapet on July 10, 2023, 20:50:50 PM
HI,
I inserted the custom fields in the product sheet, and everything works fine, now I want some of these custom fields to be present also in the same products present in the category list.

I'm editing this file:
html > com_virtuemart > sublayouts > products.php

inserting this code that doesn't work:

<?php echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product,'position'=>'box_example','class'=> 'box_example'));?>

Do you know PLEASE tell me which code I have to use?
Thanks for your patience.
Title: Re: Custom fields in category page
Post by: jenkinhill on July 11, 2023, 11:14:31 AM
No need to code.

Make sure each custom is set with Cart Attribute on.

In VM Configuration/Shopfront tab under Product Listing turn on "Show product customfields in browse views"
Title: Re: Custom fields in category page
Post by: effettoMapet on July 11, 2023, 12:18:22 PM
Thank you jenkinhill, you have been invaluable!

I just had to put the customizations in the active cart.

I don't need these customizations during the cart stage, so I thought I could not set them 'in cart'.

THANK YOU