Hello, I want to know if there is a plan for adding extra fields to product table. It's good that this option is available in profile table, but I think that it's also good to be available to product too. Is anybody out there, who tried to modify the code on this way? Thanks
It is easy to do - there are some code examples (add to amember/site.inc.php): PHP: add_product_field( 'is_recurring', 'Recurring Billing', 'select', 'should user be charged automatically<br> when subscription expires', '', array('options' => array( '' => 'No', 1 => 'Yes' )); add_product_field('trial1_days', 'Trial 1 Duration', 'period', 'trial period duration' );
hmmm... is it bad to say that I didn't understood it Alex? Or maybe I wasn't clear in my post. What I mean is: Every product record, has id, duration, price etc... I want to add some other fields in every record (that's why I talked about tables). eg to add a field named event_type with, droplist, with values "Type1, Type2...." Thanks Chris
Create a file amember/site.inc.php with the following content PHP: <?phpadd_product_field( 'event_type', 'Event Type', 'select', 'choose a value', '', array('options' => array( '' => '', 'Type1' => 'Type 1', 'Type2' => 'Type 2', 'Type3' => 'Type 3', ));?> then visit aMember CP -> Manage Products and you will see this field.
Hello Alex, A couple of questions: 1: The data 'Type1' is stored in the db when saved in the admin? 2: Each product as many as 200, has a unique Type1. How can one put this in, without manually using an array with 200 key/value pairs? Thanks in advance.