How to use custom product points or credit points in a popup list instead of radio button

Some customers ask us to setup a list popup for custom points instead of normal usage (radio button). This tutorial WORKS WITH ANY CUSTOM FIELDS - just use what's the best for you, in case you need.

The example is for custom product points, in the end of the page you'll find instructions for credit points.

The first thing to do is create a new Virtuemart custom field. In this example, we wanna create a "popup" so we use "Cart Variant" type. Just publish it and setup as in the example image on the left. Choose a different name from the one already used in order to make no confusion at all! You will be able to change the name after, when deleting the existing one custom field.

Many users thought it was enough, but no! For safety reasons, we use another "flag" to tell our extension that they are really custom points. You MUST specify this in the database.  

It's very very easy!

Go in your database, and locate the table _virtuemart_customs - and show the records.

Now locate the record about your custom field just created. You can find it by the name you specified for this custom field and - obviously - it is the last you created so it has the virtuemart_custom_id highest in your record list.

Here's the tip: you MUST edit your new record and add vmrewardspoints (exactly as it is: copy/paste) into the custom_element field. This is the way we use to tell the extension that you are using custom points in a product.


Now return in your Virtuemart custom field list and DELETE the old one. It is IMPORTANT: there must be present JUST ONE CUSTOM FIELD FOR PRODUCT, not both.

And that's all! Enjoy it.

For credit points: just do the same! Only use vmcreditpoints instead of vmrewardspoints into the custom_element field of your _virtuemart_customs table!