Display custom user fields based on number of products purchased?

Discussion in 'Customization & add-ons' started by kinitex, Apr 3, 2017.

  1. kinitex

    kinitex Member

    Aug 28, 2009
    I use my amember to sell software and license it through account numbers users enter into custom fields in their profile page. The number of custom license fields displayed to them depends on how many/which products they have purchased.

    For example:

    Silver membership = 1 license so 1 custom field is displayed to enter an account number for activation
    Gold membership = 2 licenses so 2 custom fields are displayed
    Additional license = +1 additional license but can only be purchased if they already have a silver or gold.

    For the additional licenses, I have to go in manually and give them access to a 3rd, 4th, 5th, etc custom field depending how many extra licenses they purchased.

    What would be the best way to automate this better? Some kind of check to see which products they have, assign a count to each one and then display that number of custom fields? What file(s) should I be looking at to make this sort of customization?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Oct 16, 2009

    I am afraid there is not ability to display custom field based of number of product but you can do it based on product.

    So display first field if user has access to either Silver membership or Gold membership.
    Display second field only if user has access to Gold membership.

    You can define it within custom field settings (Access Permissions)
    aMember CP -> Configuration -> Add User Fields

    Another option to handle licenses is usage of SoftSale module

    ...and always it is possible to implement custom plugin to do exactly what you need. aMember is flexible enough
    and allow to change/add almost any feature without changes in core files (upgrade proof way).

    Best Regards.

Share This Page