News:

Looking for documentation? Take a look on our wiki

Main Menu

Custom field name in child list

Started by hex187, October 20, 2013, 09:49:42 AM

Previous topic - Next topic

hex187

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

hex187

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

hex187

What kind of tips do you mean? :)
I just insterted my question again, maybe someone can give me the solution.

mhuebler

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]);


hex187

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".

hex187

Does somebody know, what should i write in the code to solve this problem?

Thanks


hex187

I'm still waiting for someone to make my life happier :)

hex187

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

Best regards,
Gabor