Hi,
Say I have a t-shirt that comes in different sizes. I can setup the sizes and different prizes for them using the Custom Field Cart Variant. Is it possible to make it a required field ie the user has to choose a size from the dropdown.
I realise this can be done with cart control but for this shop it is not required.
Any suggestion most appreciated.
Johk
This is also a problem I am facing.
Currently the site I'm creating allows for colour selection, although this doesn't affect the price of the product. So it's currently set up with a cart attribute drop down list of colours. Someone can add the item to the basket regardless of selecting a colour, and this isn't ideal.
To the OP, did you find a solution? Or to anyone else is there a solution out there?
I'm quite new to VM so I might be misunderstanding terminlogy and the use of certain attributes, and such, so apologies if I'm misunderstanding things.
Thank you.
Haven't tried this but the code for the Add to cart is in
components/com_virtuemart/helpers/shopfunctionsf.php ~ line 98
I would copy this code into a components/com_virtuemart/views/productdetails/tmpl/default_addtocart.php template overide (i.e. call it directly)
if($this->product->orderable){
vmJsApi::jPrice();
$html = '<input type="submit" name="addtocart" class="addtocart-button" value="'.JText::_('COM_VIRTUEMART_CART_ADD_TO') .'" title="'.JText::_('COM_VIRTUEMART_CART_ADD_TO') .'" />';
} else {
$html = '<input name="addtocart" class="addtocart-button-disabled" value="'.JText::_('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT') .'" title="'.JText::_('COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT') .'" />';
}
and try detecting your attribute with jquery etc to manipulate the add to cart.. maybe hide the <span class="addtocart-button"> span if dropdown not selected
i just want to know that how to put written text box on item details page? and if client complete that text box than how to get that text box value.?
You can do this with a custom field, customer input text.