I would like to be able to allow users to select from a drop down box to receive a free sample of a product (specified in the dropdown) on the checkout page. This dropdown can only be visible for users who are actually making a purchase. Otherwise, this dropdown should not display.
Any ideas on how this can be accomplished?
Thank you.
create a userfield and show it on cart only
to display it only if the cart is not empty, you can make a override for the sublayout customfield ... or you can write your own userfield plg
http://docs.virtuemart.net/manual/general-concepts/216-shopperfields.html
"The userfield "custom" allows to create customised shopperfields, which use as layout file the name of the shopperfield. For example the shopperfield tos, uses the layout file tos.php in /components/com_virtuemart/sublayouts"
So then I should be able to place this custom field anywhere within the Cart/Checkout page? Or am I at the mercy of VM? I'm using VM 2.x and there is no 'sublayouts' folder.
You should update your VM to the latest VM 3 to use the new sublayouts.
So then with the upgrade, what sort of issue will I run across? We've already experienced issues with minor upgrades of VM 2.x with clashes of extensions we use in conjunction with it. I'd just like to know how much more work I'll be getting myself into just for the sake of the use of 'sublayouts'.
Then you should check all your extensions if they are compatible with VM3 or if a compatible version is available.