PDA

View Full Version : How to set up an item shop in uCash & uShop


midihead
03-11-2005, 08:59 PM
I've seen a few people ask for an add-on to uCash & uShop that will allow them to add physical goods. I'm not a programmer, and I thought that this tip might be helpful to those who are unable to hack at the code and make their own modifications.

Basically, I was looking for a feature that would allow someone to purchase physical goods like CD's, T-Shirts, etc. with their points. Here's what I did by using the current, unmodified installation:

Create a forum with rules to disallow access to anyone. Write down the forum ID (you'll need to know this later). Place an item that you want to "sell" in this forum, with instructions on how to obtain that item.
Next, go into the Admin control panel and find the "uTT store hack" menu. Select "Action Manager". To the right of the template "Buy Forum Access" select "copy" from the drop-down menu. The template will open and allow you to edit the settings.
Change the "short name" to "forumaccess1" or something different of your choosing. Edit all your settings to your liking, then at the bottom you will notice "Action Specific Variables System". Enter the forum ID that you created to place the item, in the "Allowed Forums" field.
Repeat this process for EACH physical item that you want to add to your store (so you have control over quantity, price, etc).

If you only want to allow a user to buy one of each item, go into your Admin control panel and select "Users" then "Search for users" then the user's name. Next, find the "Quick user links" at the top left and select "Edit forum permissions (access masks)". Find the forum for which the item was purchased from and reset it to "default".

I know it's a bit of a cumbersome process, but I've not found any other way to do this. I hope this will help a few of you.

Cheers,

Midihead

radicaledward
03-12-2005, 06:17 AM
Eh, I have a custom shop on my site - you can see it in action here (http://forums.adventchildren.net/acf_shop.php?type=3) but that isn't how I went about writing it. Basically I setup the shop as an action in the database for the uShop, and then wrote the custom shop a custom database, admincp section, action script, and shop script. In short each does this:

Custom database: one table for the items, and one table for the history, and one table for items owned
AdminCP section: controls what is shown in the shop, its associated image, cost, ect
Shop script: shows the items in the selected section
Action script: handles the sale of the item and adds it the appropriate users account

Granted it is a good amount of code that you need to write (However, I may release my script once the polish is on it), but it is alot more flexible.

midihead
03-14-2005, 04:11 PM
That's cool that you were able to code your own hack for this mod. I wish I could do my own hacking. It would be very nice of you to share it with the community in the future. I, like a few people here am not a code-head and have no knowledge of how to do what you've done. The method I shared is the only solution I could find for those of us who have no coding knowledge. If the process of hacking the script is too convoluted, a guy like me will just shut down. Maybe it's ADD but I just don't have the mind set for it.

Cheerz,

Midihead

radicaledward
03-15-2005, 12:00 AM
Well I will work on the script some more, and with any luck I may be able to get a release out sometime this month. Most of the work that is left is just minor stuff behind the scenes. Keep an eye here on this forum, and I will make the release post here :)

midihead
03-17-2005, 08:24 PM
I look forward to it, and I'm sure many others will thank you.

DavidL
03-17-2005, 10:04 PM
My main reason for wanting to use ucash and ushop will be only for physical goods. I tried with the latest version and gave up :ermm:
To have an option just for this would be great.

clasione
11-29-2005, 10:38 AM
Very Helpful info... :squareeyed:


I've seen a few people ask for an add-on to uCash & uShop that will allow them to add physical goods. I'm not a programmer, and I thought that this tip might be helpful to those who are unable to hack at the code and make their own modifications.

Basically, I was looking for a feature that would allow someone to purchase physical goods like CD's, T-Shirts, etc. with their points. Here's what I did by using the current, unmodified installation:

Create a forum with rules to disallow access to anyone. Write down the forum ID (you'll need to know this later). Place an item that you want to "sell" in this forum, with instructions on how to obtain that item.
Next, go into the Admin control panel and find the "uTT store hack" menu. Select "Action Manager". To the right of the template "Buy Forum Access" select "copy" from the drop-down menu. The template will open and allow you to edit the settings.
Change the "short name" to "forumaccess1" or something different of your choosing. Edit all your settings to your liking, then at the bottom you will notice "Action Specific Variables System". Enter the forum ID that you created to place the item, in the "Allowed Forums" field.
Repeat this process for EACH physical item that you want to add to your store (so you have control over quantity, price, etc).

If you only want to allow a user to buy one of each item, go into your Admin control panel and select "Users" then "Search for users" then the user's name. Next, find the "Quick user links" at the top left and select "Edit forum permissions (access masks)". Find the forum for which the item was purchased from and reset it to "default".

I know it's a bit of a cumbersome process, but I've not found any other way to do this. I hope this will help a few of you.

Cheers,

Midihead