Extra Fields in Product

Discussion in 'Customization & add-ons' started by microhellas, Sep 19, 2009.

  1. microhellas

    microhellas New Member

    Joined:
    Nov 21, 2008
    Messages:
    6
    Hello to all,

    As far as I know, there is an option to add extra fields in user's profile. Is there any way to do the same for product? eg to add a text field where the uesr/buyer will write the domain name where he/she will use the product.

    Greetings
    Maria
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Adding a field for the product would be for all, so i think the current add field is more appropriate since it adds it to the specific users record.

    David
  3. vimalm

    vimalm Guest

    Joined:
    Aug 25, 2009
    Messages:
    42
    I too would like this feature. It is different than the signup fields, because you may want it specific to a particular product.

    For example, if you have multiple products you are selling, and 1 of them requires that the user enters a value for the domain (taking the original question's example), you only want to ask for the domain when they are purchasing that particular product. And likewise other products may have different requirements and so need different custom fields.

    The backend already sorta handles this to some degree ( I *think* - Im currently in the process of validating this ). If you add any fields to the form on either the signup or the members page, It will automatically save that field name and value in the data column of the subscriptions table in database.

    So, you should just have to modify the frontend code in the signup and members templates to add your custom fields appropriately based on the package selected - then on submission the data should already be saved for you.

    Ideally in future versions we could see an admin interface for creating custom fields at the subscription level (meaning custom fields associated with a particular user AND product ).
  4. erwinvdb

    erwinvdb aMember Pro Customer

    Joined:
    Aug 30, 2007
    Messages:
    264
  5. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Good info, but from what I can tell that will add a field to the product, but hows it gonna be specific to the user?

    I have a feeling you are gonna need to add a regular field for each product and then display the field specific to each product, or a single field with some custom coding to use it for multiple products.

    If you add a Common field it will add it to the data field, if its an SQL field, it will create a new one.

    David
  6. vimalm

    vimalm Guest

    Joined:
    Aug 25, 2009
    Messages:
    42
    just to follow up here for anyone curious. I played around with this and it indeed does work the way I thought. You can simply add an extra field to the form in the template/member.html file and it will save that data in the database (in the data column of subscriptions table).

    So, if you wanted to ask for them to enter a domain or something else specific to the product they are purchasing - simply adding that field to html will do it.

    Ideally - it could be generated via the admin, similar to the user custom fields.

    +1 for wishlist
  7. erwinvdb

    erwinvdb aMember Pro Customer

    Joined:
    Aug 30, 2007
    Messages:
    264
    And after signup the entered values shows up again in the customer details?
  8. vimalm

    vimalm Guest

    Joined:
    Aug 25, 2009
    Messages:
    42
    Not in what I did. If you want a value to show up in the customer details, then it needs to be a standard custom fields.

    The field I created gets associated with the subscription, not the customer - so you could probably have it show up in the table of subscriptions on the members page using smarty templates - I haven't tried that yet.

Share This Page