Author Topic: Add custom or own item to shop  (Read 2824 times)

peterjc

  • Guest
Add custom or own item to shop
« 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.

Offline JMV290

Re: Add custom or own item to shop
« Reply #1 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.

peterjc

  • Guest
Re: Add custom or own item to shop
« Reply #2 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.

Offline Daniel15

Re: Add custom or own item to shop
« Reply #3 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 :)

peterjc

  • Guest
Re: Add custom or own item to shop
« Reply #4 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.