News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

ST Shop

Started by Diego Andrés, June 13, 2009, 06:06:35 AM

Previous topic - Next topic

hcfwesker

One other suggestion, if possible.  When "items are shown in member's posts" option is activated by admin ... member's could ALSO have the option to not display their items in posts.   Some member's like to buy items, but don't like their posts profile/signature getting cluttered. :)

Everything's looking very nice.  Admire the extra work you've been putting into this massive update :)

Diego Andrés

#501
Quote from: hcfwesker on March 01, 2015, 05:35:56 PM
One other suggestion, if possible.  When "items are shown in member's posts" option is activated by admin ... member's could ALSO have the option to not display their items in posts.   Some member's like to buy items, but don't like their posts profile/signature getting cluttered. :)

Everything's looking very nice.  Admire the extra work you've been putting into this massive update :)

I'll see what can I do  :)



Well, I left this very forgotten, but here's a small update

  • Favourite items (Including order by favourite first in the profile/posts inventory)
  • All items popup

QuoteLimit the number of an specific item per member.

This is also done  ;D

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

Quote from: hcfwesker on March 01, 2015, 05:35:56 PM
One other suggestion, if possible.  When "items are shown in member's posts" option is activated by admin ... member's could ALSO have the option to not display their items in posts.   Some member's like to buy items, but don't like their posts profile/signature getting cluttered. :)

Everything's looking very nice.  Admire the extra work you've been putting into this massive update :)

This is done  ;)

SMF Tricks - Free & Premium Responsive Themes for SMF.

Enzofielt

Hi,

Wanted to install this Mod, during the first test i get these errors. (see attachment)

Anything i can do to get the errors fixed ?
Running my forum on SMF 2.0.13

hcfwesker

Quote from: Enzofielt on April 27, 2015, 03:19:20 PM
Hi,

Wanted to install this Mod, during the first test i get these errors. (see attachment)

Anything i can do to get the errors fixed ?

click that "edit" image you see at the front of each listed file/edit and see what edit it is trying to make,  and manually edit in the corresponding edits in each file that gives errors.  The mod is conflicting with another mod you have installed, previously.

Plasmaa

Hey, so i read on your smf tricks website that a 2.0 for this is coming out once smf 2.1 is in beta 2 ( i think its out of beta right now?) did you already update the download?



(my first post on here btw)

hcfwesker

Quote from: Diego Andrés on January 16, 2015, 06:43:55 PMLimit the number of an specific item per member.

If by chance you get that working, and could possible share the edits to use it on the SAShop 1.0 version it would be great.  All I really need is a way to stop members from buying duplicate items from 1 category, cat.id 17 on our site, to be specific.

I'm loving the updates you're preparing for 2.1, but I , like mnay others, probably won't make the jump to SMF 2.1 until many of the MODs we use are also upgraded to 2.1

Diego Andrés

Yes that's already done. the last changes were on February I think...
Let me update the Repo on Git so you can check it.

And sure, even me is a bit disappointed for waiting so long to release the mod. I mean, what's the purpose of releasing a Shop mod for 2.1 at this point if Betas are not for production sites  :-\
I'm seriously thinking on release it for 2.0 LOL (obviously that would require more work)

SMF Tricks - Free & Premium Responsive Themes for SMF.

DSystem

I don't know if it's very specific. I made some changes to the sa-shop 1.0 RC1

Added an option in the admin panel where you can turn off the inventory.

When the inventory this disabled, purchase item is automatically used.

Use the sa-shop to add members in certain groups of users with the credits of the shop. With this adaptation was very easy to purchase items.

If you want to add this in the mod I can post here the changes.

Diego Andrés

Thank you but I already added an option in profile configuration, so users can hide their own inventories (on posts at least)
And I'll think about adding that option of "instant" use.

Regards

SMF Tricks - Free & Premium Responsive Themes for SMF.

hcfwesker

Quote from: Diego Andrés on June 26, 2015, 08:17:33 PM
Yes that's already done. the last changes were on February I think...
Let me update the Repo on Git so you can check it.

OK, comparing the edits, and looks like just 2 file edits, I think ...
1. The one for shop.admin.template when adding an item (check only 1 can be purchase)
2. The shoptemplate where items are purchased, and add the IF statement to see if that settings in checked

There's no database call for smfsettings and this item check is there?  I haven't seen it

Diego Andrés

Just a row named "itemlimit" in the items column.
If I remember well, it only required to check the inventory to see how many items the user has.

SMF Tricks - Free & Premium Responsive Themes for SMF.

DaddyFish

I'm a bit lost.  I've installed shop succesfully on smf 2.0.10 but if I login as a Regular Member it tells me I am not allowed to access it.  I cannot see what is in my bank or my pocket to spend, nor the options to spend it on unless I am logged in as admin and view it from the ACP.

Also, is there a clear set of instructions for the "average user" to learn how to use this system?

Finally, how do I tie this in to giving away tangible items in exchange for credits earned, like for 5,000 credits the user can buy a t-shirt.

Thanks!

www.willowvalleyfunnyfarm.com

Diego Andrés

You need to set permissions for each group to allow them to use the shop.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Goss

Great add-on!  I've installed it and am setting up my shop.  However, I noticed that when I use html in the item description, the html doesn't parse.  Is there a file edit I could do to change that?

Goss

Oh, figured it out!  If anybody else is curious, I just changed this in the various shop templates (Shop.template.php, etc.):

Find:
$info['description']

Replace With:
htmlspecialchars_decode($info['description'])

 


hcfwesker

Quote from: Diego Andrés on July 09, 2015, 12:05:04 AM
Just a row named "itemlimit" in the items column.
If I remember well, it only required to check the inventory to see how many items the user has.

I know it's been awhile but finally decided to actually attempt this.  I've got everything done except one portion.  In your new files, there is a Sources/ShopBuy.php which doesn't exist in the SMF 2.0 version, everything is crammed in Shop.php, where the coding to buy is listed.

This portion code, which I know I don't need the whole part, just relating to "itemlimit" but there's no DB check that even calls for itemid in the shopbuy section in Shop.php.  So trying to figure where, and what, should I put this from  ShopBuy.php ...

// Check session
checkSession('get');

// You cannot get here without an item
if (!isset($_REQUEST['id']))
fatal_error(Shop::text('buy_something'));

// Make sure is an int
$id = (int) $_REQUEST['id'];

// Get the item's information
$result = $smcFunc['db_query']('', '
SELECT itemid, name, price, count, status, itemlimit
FROM {db_prefix}shop_items
WHERE itemid = {int:id}',
array(
'id' => $id,
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);

// We need to find out the difference if there's not enough money
$notenough = ($row['price'] - $user_info['shopMoney']);

// How many of this item does the user own?
$limit = self::CheckLimit($id);

// Is that id actually valid?
// Also, let's check if this "smart" guy is not trying to buy a disabled item
if (empty($row) || $row['status'] != 1)
fatal_error(Shop::text('item_notfound'));

// Already reached the limit?
elseif (($row['itemlimit'] != 0) && ($row['itemlimit'] <= $limit))
fatal_error(Shop::text('item_limit_reached'));



Thanx for any help and suggestion.  I'm still trying through trial and error. 


Diego Andrés

So you are editing the equal portion of code for smf 2.0?

You would only need to add the if that checks the limit at the very end of that code you pasted.
$row['itemlimit'] (hope I wrote that okay) is what you added to the dB, you should add a new setting for that column in the items admin to actually manage it, shouldn't be hard.
and the $limit variable is refering to a function that count the number of 'that' item the user actually has.

Sorry if I didn't explain better. I don't know exactly where is 'something' in the smf 2.0 version of sa shop.

Regards

SMF Tricks - Free & Premium Responsive Themes for SMF.

Melissa524

I was wondering if there was a way to "reset" everyone's credits based off of the current settings for posting.  For example, if I get 3 points per post but only in certain boards, can I reset everyone's points so that they get the updated point total?
In case, I forget to say.  I am using 2.0.2

carlhallin

Hi i was wondering why other members in my forum cannot view the shop?

i just installed the shop and currently i am testing my forum so i had another account which can not view the shop at all ?

Advertisement: