Facebook 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4291
Latest: Robertqt
New This Month: 5
New This Week: 0
New Today: 0
Stats
Total Posts: 43747
Total Topics: 7590
Most Online Today: 81
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 74
Total: 75

Author Topic: ST Shop integration  (Read 437 times)

0 Members and 1 Guest are viewing this topic.

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 195
    • View Profile
    • Quizland
ST Shop integration
« on: March 09, 2025, 10:36:30 am »
Hi VB,

I have installed Diego's 'ST Shop' on my site. Using your Downloads mod when a member creates a download, and then clicks 'Add Download', I have it set that a topic is created in a board.

If a member posts directly into that board they get credits, in the ST Shop mod, for the new topic they've created. When they create a download and it creates a new topic in the board the topic that's created does not give them credits in the ST Shop even though it has their name as the topic starter.

Any idea why that might be?

Diego's mod is here https://custom.simplemachines.org/index.php?mod=1794

I'm using the ST Shop mod instead of yours as it also gives credits for members playing games in SMFArcade, as well as other things.

As always any help is much appreciated

See the settings page attached.
« Last Edit: March 09, 2025, 11:17:03 am by davejo »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16654
    • View Profile
Re: ST Shop integration
« Reply #1 on: March 09, 2025, 11:25:11 am »
ST Shop was not supported but added it now
6.2.1
+Added ST Shop support!
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 195
    • View Profile
    • Quizland
Re: ST Shop integration
« Reply #2 on: March 09, 2025, 11:28:26 am »
ST Shop was not supported but added it now
6.2.1
+Added ST Shop support!

Wow VB thank you very much

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 195
    • View Profile
    • Quizland
Re: ST Shop integration
« Reply #3 on: March 09, 2025, 11:59:24 am »
Sorry for seeming dumb , how do downloads work with the St Shop mod VB?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16654
    • View Profile
Re: ST Shop integration
« Reply #4 on: March 09, 2025, 01:10:40 pm »
These are the settings for SMF Shop/ ST Shop in the Admin Download settings
Shop Points Settings

Use SMF Shop money as credits instead of download system credits
Download Add Points:    
Comment Add Points:    


Options to add points if a download is added or if a comment is added to a download.
And the option to use shop money instead of download credit system.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 195
    • View Profile
    • Quizland
Re: ST Shop integration
« Reply #5 on: March 09, 2025, 01:47:16 pm »
Thank you VB

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 195
    • View Profile
    • Quizland
Re: ST Shop integration
« Reply #6 on: March 09, 2025, 05:07:19 pm »
Houston we have a problem.

I set the Downloads Shop to enabled, see attached, and when a download is added it produces an error as attached.

Should the Downloads be installed first then the shop or doesn't it matter?

UPDATE: Just installed Downloads 6.2.1 and then ST Shop on a clean SMF 2.1.4 but the error still happens
« Last Edit: March 09, 2025, 05:40:59 pm by davejo »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16654
    • View Profile
Re: ST Shop integration
« Reply #7 on: March 09, 2025, 10:19:18 pm »
Did you have SMF Shop installed before?

If so delete the variable shopVersion from smf_settings table shopVersion
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline davejo

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 195
    • View Profile
    • Quizland
Re: ST Shop integration
« Reply #8 on: March 10, 2025, 05:57:21 am »
I found out what the issue was. I did a clean install of both the Downloads and Shop on my other site and it all works fine.

On my main site the reason I was getting the error is because in the 'Credit System' I had 'Credits added per upload' 1, thinking that while the 'Enable Credit System' was disabled the numbers would make no difference, but it does, because as soon as I set 'Credits added per upload' to 0 everything works fine.

I'm posting this so others can see what the error was. Should that happen if the Credit System is not enabled?

Offline Senkusha

  • Community Suite Customer
  • Member
  • ******
  • Posts: 34
    • View Profile
    • The Kawaii Klub
Re: ST Shop integration
« Reply #9 on: March 16, 2025, 05:21:59 pm »
This may seem like a dumb question, but do I have to uninstall Downloads Pro 6.2 before installing 6.2.1?
-- Senkusha
Creative Pioneer exploring anime role playing adventures!
Visit my Creative Anime Role Playing Community
SMF 2.1.4

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16654
    • View Profile
Re: ST Shop integration
« Reply #10 on: March 16, 2025, 07:54:33 pm »
Though the package manager? Are you getting an error?

But for a minor release if I don't mention it you don't have to uninstall old version can just install on top.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Senkusha

  • Community Suite Customer
  • Member
  • ******
  • Posts: 34
    • View Profile
    • The Kawaii Klub
Re: ST Shop integration
« Reply #11 on: March 16, 2025, 08:33:15 pm »
Nope.  Thanks!  I didn't even notice the option was Upgrade, not Install.  It's been a long day.
-- Senkusha
Creative Pioneer exploring anime role playing adventures!
Visit my Creative Anime Role Playing Community
SMF 2.1.4
Like Like x 1 View List

Offline Senkusha

  • Community Suite Customer
  • Member
  • ******
  • Posts: 34
    • View Profile
    • The Kawaii Klub
Re: ST Shop integration
« Reply #12 on: March 17, 2025, 08:09:39 pm »
Did you have SMF Shop installed before?

If so delete the variable shopVersion from smf_settings table shopVersion

I've never had SMF Shop installed on this forum, but I'm still getting this error, when enabling SMF Shop, even after updating to 6.2.1

Is there another place somewhere that I'm not seeing to use ST Shop instead?
-- Senkusha
Creative Pioneer exploring anime role playing adventures!
Visit my Creative Anime Role Playing Community
SMF 2.1.4

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16654
    • View Profile
Re: ST Shop integration
« Reply #13 on: March 17, 2025, 08:28:26 pm »
No it only looks for that variable here is the code that decides which one to use.
Code: [Select]
// Update the SMF Shop Points
if (isset($modSettings['shopVersion']))
  $smcFunc['db_query']('', "UPDATE {db_prefix}members
SET money = money + " . $modSettings['down_shop_fileadd'] . "
WHERE ID_MEMBER = " . $user_info['id'] . "
LIMIT 1");

if (isset($modSettings['Shop_importer_success']))
$smcFunc['db_query']('', "UPDATE {db_prefix}members
SET shopMoney = shopMoney + " . $modSettings['down_shop_fileadd'] . "
WHERE id_member = " . $user_info['id']. "
LIMIT 1");

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Senkusha

  • Community Suite Customer
  • Member
  • ******
  • Posts: 34
    • View Profile
    • The Kawaii Klub
Re: ST Shop integration
« Reply #14 on: March 18, 2025, 06:11:41 am »
[ Guests cannot view attachments ]

Okay.  I think I see the problem.  When I create a new topic/reply I get this:

[ Guests cannot view attachments ]

When I look at the code, I see this:

Code: [Select]
function Downloads_AddMemberCredits($memberID, $filesize, $credits = 0)
{
global $smcFunc, $downloadSettings;

if ($credits != 0)
{
$extraSMFShop = '';

if ($downloadSettings['down_set_intergrate_smfshop_money'])
$extraSMFShop = ', money = money +  ' . $credits. " ";

$smcFunc['db_query']('', "
UPDATE {db_prefix}members
SET downpro_credits = downpro_credits + " . $credits . "
$extraSMFShop
WHERE ID_MEMBER = $memberID LIMIT 1");
return;
}


And there's other checks a bit further down that use the database field money as well.  Shouldn't this be updated to use the same logic as above for full ST Shop support?
-- Senkusha
Creative Pioneer exploring anime role playing adventures!
Visit my Creative Anime Role Playing Community
SMF 2.1.4

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3718 Views
Last post October 23, 2006, 12:46:00 pm
by joepro
0 Replies
4733 Views
Last post March 30, 2007, 11:49:39 pm
by Hambil
13 Replies
15456 Views
Last post May 20, 2007, 08:43:50 pm
by stormlrd
3 Replies
4645 Views
Last post September 12, 2010, 05:00:23 pm
by SMFHacks
1 Replies
302 Views
Last post February 22, 2025, 06:13:10 pm
by SMFHacks

+- Recent Topics

Community suite buying question by SMFHacks
Today at 11:26:20 am

Downloading with Zero Credits? by SMFHacks
March 23, 2025, 01:40:50 pm

Some minor Layout modifications by Senkusha
March 22, 2025, 06:30:31 pm

Uploading Bulk files to a Category? by SMFHacks
March 21, 2025, 08:26:01 pm

Mod for compare gallery.text with board.text by SMFHacks
March 21, 2025, 05:52:46 pm

ST Shop integration by Senkusha
March 18, 2025, 07:33:13 pm

Contact Us by SMFHacks
March 16, 2025, 07:49:23 pm

HTTP 500 error during install by SMFHacks
March 13, 2025, 10:44:31 am

Site upgrade to 2.1 by SMFHacks
March 12, 2025, 09:29:43 pm

[Mod]WebP and AVIF File Support for SMF 2.1 by SMFHacks
March 10, 2025, 04:32:57 pm

Powered by EzPortal