SMF Shop

SMFShop => Requested additions => Topic started by: peterjc on December 12, 2007, 02:21:05 pm

Title: Add custom or own item to shop
Post by: peterjc on December 12, 2007, 02:21:05 pm
I want to add my own thing to the shop but do not know how to do it.

I actually want to add an item where member can buy ads space at my forum.  Example, member can buy ads space at forum for 1000 coins.

how to do that!!!

Thank in advance.
Title: Re: Add custom or own item to shop
Post by: JMV290 on December 16, 2007, 12:34:49 pm
Well, first you need to create the item.  I can't help you there since my PHP skills are minimal.  Once you actually create the item, upload it via FTP to [Forum Directory] >Sources>shop>items

Once you do that, you can add it to the shop like any other item by using the admin CP.
Title: Re: Add custom or own item to shop
Post by: peterjc on December 17, 2007, 09:13:02 am
I have some knowledge in php but the problem is how to create an item so that it will appear in the shop, and how to make it deduct the credit.

I think there should be some function that do the duduction and where is that function actually.
Title: Re: Add custom or own item to shop
Post by: Daniel15 on December 17, 2007, 02:59:27 pm
If you know PHP, look at the existing item files in Sources/shop/items. testitem.php and testitem2.php should be able to help you, most users base their items off those ones. :)
Basically, you code the action to perform when the item is "used". Credit deduction and appearing in the shop is handled by SMFShop itself :)

If you don't know PHP, you could use the "Email an Admin" item to send you an email when they use the item. This is quite easy to set up :)
Title: Re: Add custom or own item to shop
Post by: peterjc on December 18, 2007, 11:13:42 am
thank daniel.

 I have try at the two suggetion that you give(using test item and send email to admin).  Both method work great.  I will choose one.

Thank a lot.