VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: hex187 on October 20, 2013, 09:49:42 AM

Title: Custom field name in child list
Post by: hex187 on October 20, 2013, 09:49:42 AM
Hi all,

Is it possible to set in the generic child variant plugin, to show a custom field value in the list, not the names of the child product?

For eaxmple, if i have pens with same name, but in different colours, i don't want the same names in the list, but the colours, like black, blue.

Is this possible?
Vm 2.0.24

Thank You,
Gabor
Title: Re: Custom field name in child list
Post by: hex187 on October 26, 2013, 10:58:07 AM
Quote from: hex187 on October 20, 2013, 09:49:42 AM
Hi all,

Is it possible to set in the generic child variant plugin, to show a custom field value in the list, not the names of the child product?

For eaxmple, if i have pens with same name, but in different colours, i don't want the same names in the list, but the colours, like black, blue.

Is this possible?
Vm 2.0.24

Thank You,
Gabor
Title: Re: Custom field name in child list
Post by: hex187 on October 27, 2013, 18:17:37 PM
What kind of tips do you mean? :)
I just insterted my question again, maybe someone can give me the solution.
Title: Re: Custom field name in child list
Post by: mhuebler on October 28, 2013, 13:22:45 PM
hello,

It is located in this file: /administrator/components/com_virtuemart/models/customfields.php

(VM 2.0.24) line 1074:
$options[] = array('value' => JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $virtuemart_category_id . '&virtuemart_product_id=' . $child['virtuemart_product_id'],FALSE), 'text' => $child['product_name']);

change to:
$options[] = array('value' => JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $virtuemart_category_id . '&virtuemart_product_id=' . $child['virtuemart_product_id'],FALSE), 'text' => $child[$value]);

Title: Re: Custom field name in child list
Post by: hex187 on October 28, 2013, 14:32:12 PM
Thanks mhuebler for your answer, i will check it at home.
just one more question: how can i select here, which custom field should it print? I need the value for the custom filed name "Szín".
Title: Re: Custom field name in child list
Post by: hex187 on November 01, 2013, 11:56:11 AM
Does somebody know, what should i write in the code to solve this problem?

Thanks
Title: Re: Custom field name in child list
Post by: hex187 on November 02, 2013, 22:29:29 PM
Anyone? :)
Title: Re: Custom field name in child list
Post by: hex187 on November 06, 2013, 08:29:23 AM
I'm still waiting for someone to make my life happier :)
Title: Re: Custom field name in child list
Post by: hex187 on November 24, 2013, 19:39:29 PM
Please somebody can help me regarding this issue?
I'd like to show the custom field value in the generic child select list instead of the product name. Is it possible? I know how to change the name into product sku, but i need the value of an exact custom field.
Pls check it here: http://91.82.58.33/~holleihu/index.php/component/virtuemart/iroszer/golyostoll/blaxo-golyostoll-?Itemid=0 (http://91.82.58.33/~holleihu/index.php/component/virtuemart/iroszer/golyostoll/blaxo-golyostoll-?Itemid=0)

Best regards,
Gabor
Title: Re: Custom field name in child list
Post by: hex187 on December 01, 2013, 11:17:09 AM
Somebody? :)