News:

Support the VirtueMart project and become a member

Main Menu

variable products (how to put SKU in the dropdown list)

Started by whoaloic, July 04, 2014, 00:35:49 AM

Previous topic - Next topic

whoaloic

Hi!
I struggle to build variable product.
I have a parent product with three child products.
I choose parent product to be an option and choose reference in the dropdown list (I get length,  alias options too).
I uncheck ParentOrderable (I use Viruemart only as catalog).

My problem is that in frontend, I get names of the products (and not reference or sku).
That's a problem because I get the same name for parent and child products.
For example: TSHIRT NIKE for all products are displaying in the dropdow list. So it's confusing for the user. 
Only the SKU is unique (with size information in the SKU).
For example TS NIKE XL, TS NIKE L, etc..
So how to put SKU in the dropdown list to choose child product and not the product name.

Also when the user is on a child prouct, the dropdown list is gone, so he can't navigate throug parent and child products.
How to do that please?

Any help would be really appreciated.
Regards

whoaloic

Up?
Does anybody could help me on this?
Here's a link: http://www.literies-andco.com/index.php/component/virtuemart/matelas/matelas-ressorts/matelas2014-07-03-03-29-44342722131-detail?Itemid=122 to see my problem.
Select an item in the dropdown list (You will see that every item displays the title of the child product, but as I have the same title for each child product, the  dropdown list display same item).
Then, if I choose a child item, the dropdow list disappears so I can't select back the parent item or another child product.

whoaloic

Hi!
I reopen this topic.
I really can't find a solution to put SKU in the dropdown list when variable products.

Matt_Ginn

There's no good way to do this! You need to modify this file - /web/administrator/components/com_virtuemart/models/customfields.php. Change the function 'displayProductCustomfieldFE'  to show 'product_sku' instead on 'product_name'. However since this is a core file it'll get overwritten each time you upgrade VM and you'll have to re-edit the file. I do the same on some of my sites to show the product short description.