PDA

View Full Version : Creating Options Using Custom Profile Fields


Freesteyelz
03-19-2006, 01:44 PM
Hi CMX_CMGSCCC. I'm testing this great mod of yours and had a question regarding the creation of new vbPlaza options. Actually I had several questions as I'm very new to the point system but I'll keep it simple for now. :)

I have 3 custom Profile Fields that I would like to add as purchased items. If a user purchase any one of these fields it becomes enabled. Right now it's hidden and only I, using the Admin CP, can add entries. Is it possible for me to create vbPlaza options using "$post['fieldx']"? If so how can I go about it?

CMX_CMGSCCC
03-21-2006, 06:57 PM
Yes, it is possible, you just have have to do the table settings properly.

For example, the profile fields are not stored in the user table, they are stored inside userfield table. So you'd have to put that for the table name. There where name should be userid, and the where value should be $vbulletin->userinfo['userid']. Then for the Set Name, it would be the name of the field like fieldX, and the Set Value would be what you want to set that field to when someone purchases it. And the Set Type should be String.

That should do it for what you want to do.

-CMX

Freesteyelz
03-21-2006, 08:30 PM
Awesome. I'll try those settings and give you an update. Thank you again, CMX_CMGSCCC. :)


*Edited Update: I may have done something wrong. I successfully created the options using these variables:

Item Table name: userfield
Where name: userid
Where value: $vbulletin->userinfo['userid']
Set type: String
Set name: field13
Set value: Test

---------

The test Custom Profile Field (field13):

Profile Field Type: Multiple-Selection Checkbox
Field Edited By User: No
Private Field: No

---------

The option did show up in vbPlaza store. The item displayed a button for purchase. I clicked on the button and it said that the purchase was made successfully. However, there wasn't a checkbox list for me to choose from. So I went to the User CP to see if it was there and it wasn't.

I think I'm missing something. LOL. :)

CMX_CMGSCCC
03-25-2006, 12:40 AM
In v1.5.4 there will be a way to add a drop down box for an option. There is currently no way to add a drop down box in v1.5.3.

-CMX

Freesteyelz
03-25-2006, 05:58 AM
Cool. Just what I'm looking for. :)