Apologies if this has been asked and answered, I couldn't find it.
I want to have the words "Please Select" as the default option for all of my Drop Down Custom Fields. I need it to be static and DOESN'T act as a value. If the customer doesn't change to a value/option then they can't proceed with "Add to Cart".
Obviously adding the value "Please Select" as an option in each custom field isn't going to work. I just need it as the set default globally for custom field drop downs.
Probably best to also have a fail message popup reminding them to select an option.
Using VM 2.0.10 currently (I assume this hasn't been added yet for 2.0.14 anyway)
J 2.5.8
Please help!
Hoping someone can help. Even a little.
I don't even know how to make a dropdown in virtuemart at all...
I would like this as well...
Thanx!
check here:
http://knowledgebase.inzinc.com/joomla-issues-and-fixes/creating-a-custom-field-in-virtumart-2.html
I have the same issue. :(
Quote from: alvinwang21 on August 20, 2013, 08:13:20 AM
I have the same issue. :(
I don't know what is your specific issue :(
We want to set up the default value of dropdown box is select size. If customer click "add on" or "buy now" button, we can pop up a form said "please select the size of product". So, we don't have any chance that customer may accidently click on the wrong product size and get wrong product. :)#
EDIT BY MODERATOR: This is not the issue raised by the OP
You could use parent(product)-child(sizes) relation.
You can create the drop-down using the cart variant custom field and set the values you like but you should create on your own the validation rule and alert.
Can you please give a detail explaination? :)
Hi
here is the explanation for the cf:
http://www.ostraining.com/blog/joomla/custom-field-virtuemart/
As type select "cart variant"
As for the validation rule you should find a lot of stuff if you google it.
I think that you should get the selected value and if its the value of the default option "select something" to alert a message
"select something" should be set as option too, to your products
Check this tutorial http://awebsupport.com/vm2-set-up-child-product-with-stock-control
And the demo site: http://awebsupport.com/virtuemart-child-product-with-stock-control/productdetails/5
Did you mean this?
Some other useful information: We made +1 custom child called "Please Choose" ,and made a little modification in the default addtocart layour (not show add to cart button for this child product), and this works fine.
To bring this back on track after alvinwang21 almost derailed the thread.......... (@alvinwang21, see your first post. Changing the issue of a thread does not help. So make sure you understand the issue before posting)
I noticed this issue with the drop down (where there is no default 'please select' in the drop down list). I think I've got a fix. It needs more testing though.
To clarify, this fix changes the parent product name in the drop down to "-Please Select-".
This works only if the custom field in the parent product has the 'Display parent as option' checked, and should only be used if the 'Parent orderable' option is unchecked.
In file administrator\components\com_virtuemart\models\customfields.php, change this:
foreach ($uncatChildren as $child) {
$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']);
to this:
foreach ($uncatChildren as $child) {
// -- Dropdown modification start (MikeUK)
if ($child['product_name'] != $product->product_name) {
$adapted_text = $child['product_name'];
}
else {
$adapted_text = "-Please Select-";
}
$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' => $adapted_text);
// -- Dropdown modification end
}
Developers, thank you for this wonderful free software. That said, this is basic functionality that is still broken, even after all this time. If I have 2 child items, and the parent is not orderable, I can't add the first selected child to the cart. I actually have to chose the second child item, then select the first again for it to be enabled to be added to the cart. This is a bug that needs to be fixed.
Yes, this is very annoying...
MikeUK - thanks fo your mod - it works! I have changed
$adapted_text = "-Please Select-";
to
$adapted_text = JText::_ ('COM_VIRTUEMART_LIST_EMPTY_OPTION');
This is better for multilingual sites.
This was very useful, thank you very much MikeUK and Darkheart.
The only problem is that when on a child product page that "--Please Select--" is selectable again and leads back to the parent product.
Is there any way to make it unselectable?