I am using joomla 3.x with VirtueMart.
I am trying to add a custom field "Country of Origin" to a product. It would be the best that I can make use of the country list provided by VirtueMart.
How can I accomplish that?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityI am using joomla 3.x with VirtueMart.
I am trying to add a custom field "Country of Origin" to a product. It would be the best that I can make use of the country list provided by VirtueMart.
How can I accomplish that?
Try this,
Components -> Virtuemart -> Products -> Custom Fields -> create new filed as new List option
Then select it in product details page custom fields section
Assume that you are using VM2.x
Hope it helps..
Copy and past this code in to your XML file in the following directory:
administrator\components\com_helloworld\models\forms\helloworld.xml
<field
name="greeting"
type="category"
extension="com_helloworld"
class="inputbox"
default=""
label="Day"
description="COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC"
>
<option value="Plese select 'DAY'">--select days--</option>
<option value="Monday">Monday</option>
<option value="Tuesday">Tuesday</option>
<option value="Wednesday">Wednesday</option>
<option value="Thursday">Thursday</option>
<option value="Friday">Friday</option>
<option value="Saturday">Saturday</option>
<option value="Sunday">Sunday</option>
</field>