Hi all i think i'm going crazy. I'm sure i had this working before but it's seems to have stopped now. Basically i added a new productfield call boxno which seems to show up the the amember_payment. I have added a text box in member_add_renew with the value {$payment.boxno} and then in the pending email template i have added the line box no: {$payment.boxno} This doesn't seem to work anymore i have checked the sql file and it doesn't seem to be adding the data but there is some data in some of the old subscriptions. Any ideas where i'm going wrong Many Thanks Dan
just to add to that i added the field via the site.inc file like <?php add_product_field('Boxno', 'Box Number', 'text', "Your Box Number"); ?> Many Thanks
Dan, 1. If you want to add field to payment profile you should use add_payment_field and not add_product_field. 2. Correct variable to access this field is: {$payment.data.Boxno}
hi that works great and shows in the emails and on the users payment page but it doesn't seem to add it in the database in the amember_payments boxno column how would i go about doing this many thanks dan
Dan, Custom fields for payments are stored in amember_payments.data column. (serialized array) From php you can access it this way: $payment = $db->get_payment($payment_id); $payment['data']['fieldname'];
hi that doesn't seem to work. I'm trying to add it as a column in the payment history page at the end of the other columns Many Thanks Dan
hi im trying to put the code in you gave me $payment = $db->get_payment($payment_id); $payment['data']['boxno']; ive tried various options like just $payment.data.boxno still with no luck Many Thanks Dan
Dan, exact code will depends on exact place where you want to put it. I believe you need to do this in payment_history table? If so you need to use this variable: {$p.data.Boxno} or {$p.data.boxno}