VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: baoquocmt159 on September 16, 2013, 09:33:11 AM

Title: Show Custom fields on the view category
Post by: baoquocmt159 on September 16, 2013, 09:33:11 AM
Hi all, so default of virtuemart productsdetail show custom fields.

I wana show custom fields on the list product of category.

Please help me ! Thank.
Title: Re: Show Custom fields on the view category
Post by: Maxim Pishnyak on September 16, 2013, 17:08:40 PM
A lot of threads about this on forum. Try to use forum search button.
Title: Re: Show Custom fields on the view category
Post by: baoquocmt159 on September 19, 2013, 08:37:00 AM
I can't find result !

i use code in plugin :


foreach ($products as $k=>&$product) {
$proSdes = &$product->product_s_desc;
$customFields = &$product->customfields;
$profieldId = $product->virtuemart_customfield_id;
if($customFields) {
foreach($customFields as $fk=>$customField) {
$customfieldId = $customField->virtuemart_customfield_id;
if($profieldId == $customfieldId){
if($customField->custom_element == 'plg_nbvm_music_player') {
if ($customField->display) {
$display = $customField->display;
$proSdes = $display.$proSdes;
}
}
}
}
}
}


But it hapend error !
Title: Re: Show Custom fields on the view category
Post by: Maxim Pishnyak on September 20, 2013, 13:04:50 PM
https://forum.virtuemart.net/index.php?topic=104557.msg351699#new
https://forum.virtuemart.net/index.php?topic=95302.msg342648#new
https://forum.virtuemart.net/index.php?topic=114041.msg342648#new
https://forum.virtuemart.net/index.php?topic=105577.msg352274#new
https://forum.virtuemart.net/index.php?topic=114544.msg346865#new
http://forum.virtuemart.net/index.php?topic=100191.0
http://forum.virtuemart.net/index.php?topic=103145.msg342591#msg360038