News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

ST Shop

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

Previous topic - Next topic

erich199

I noticed today I was getting this error in the log

Hook call: function "Shop\Integration\Signup::register" in file /var/www/vhosts/** could not be called.

Diego Andrés

How did you get the error? Any specific action?

SMF Tricks - Free & Premium Responsive Themes for SMF.

erich199

Quote from: Diego Andrés on November 20, 2023, 02:24:21 PMHow did you get the error? Any specific action?

Sorry, it seems like it it's being triggered at the registration process. I did set it so new registered users get 300 points.


    Type of error: General
    Error message: Hook call: function "Shop\Integration\Signup::register" in file /var/www/vhosts/* could not be called.
    URL of page causing the error: */index.php?pretty;action=signup2


Diego Andrés

Please try the newest version:

4.1.12 - 20 November 2023
  • Bug Fix Various fixes.
Full list of changes

SMF Tricks - Free & Premium Responsive Themes for SMF.

erich199

QuotePlease try the newest version:

4.1.12 - 20 November 2023

    Bug Fix Various fixes.

Full list of changes

Thanks, I'll update and let you know if I get the same error again.

Varlov

What can be the reason why I get these two errors immediately following any new user registration? I haven't been able to discover what's causing this  :-[ .
You cannot view this attachment.

edit: just saw the post above.. lol.. I'll update then the mod then I'll get back here.

Varlov

Quote from: Varlov on November 21, 2023, 02:32:05 PMWhat can be the reason why I get these two errors immediately following any new user registration? I haven't been able to discover what's causing this  :-[ .
You cannot view this attachment.

edit: just saw the post above.. lol.. I'll update then the mod then I'll get back here.

The update resolved the issue. Muchos gracias señor Diego!

erich199

I noticed today I'm getting a "null" error log message. It seems to be happening when a guest tries to access the shop directly, although I'm not sure why or how they're doing it since guest have no access to the shop on my site.


    Type of error: General
    Error message: 2: Trying to access array offset on value of type null
    File: */httpdocs/Themes/default/Shop/Shop.template.php
    Line: 615
    URL of page causing the error: */index.php?pretty;action=shop&categoryID=5&sortField=sortOrder&sortOrder=DESC

Backtrace information

    #0: smf_error_handler()
    Called from */httpdocs/Themes/default/Shop/Shop.template.php on line 615
    #1: template_shop_below()
    Called from */httpdocs/Sources/Load.php on line 2778
    #2: loadSubTemplate()
    Called from */httpdocs/Sources/Subs.php on line 4716
    #3: template_footer()
    Called from */httpdocs/Sources/Subs.php on line 4205
    #4: obExit()
    Called from */httpdocs/Sources/Security.php on line 143
    #5: is_not_guest()
    Called from */httpdocs/Sources/Security.php on line 1035
    #6: isAllowedTo()
    Called from */httpdocs/Sources/Shop/View/Home.php on line 176
    #7: main()
    Called from */httpdocs/index.php on line 196


Senkusha

Is there a place or topic that has a list of the various Modules (other than the 3 year old GitHub)?  I'd like to know what people are using their Credits on.

I had an idea to make a couple boards so that it deducts credits for you to read the post messages inside.  This would encourage some posting elsewhere and give a reason to spend the credits that are being amassed.  But beyond this, I'm not really sure what else I could give members a reason to spend their credits.
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Senkusha

Apparently, I can't append to my previous post.  Sorry for the double post.  But I just thought of this:

Party Llama MOD

Basically, this mod died because the Karma system was removed in 2.1.  However, I think it would be kind of neat to have this functionality again.  A member could successfully click on a llama, or whatever image that gets floated randomly, and maybe after so many clicks that item gets added to their inventory?

There would probably need to be another field added to the database to keep track of successful image clicks, and say after.... five clicks of.. a beer mug, you get a Beer Mug added to your inventory.

I'm not sure how to go about coding this however.
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Diego Andrés

Sounds like it would be better being a separated MOD like it was (or at least a Shop installable addon).
Sending the credits is very easy afaik, I haven't touched the MOD in a while.

I could add it to next year TODO, I guess?
I'm hoping I can fix some things with the MOD in January-February.

Quote from: Senkusha on December 21, 2023, 09:54:58 AMIs there a place or topic that has a list of the various Modules (other than the 3 year old GitHub)?  I'd like to know what people are using their Credits on.
No, just integrations with other MODs which are present in the settings already.
There is one subscription addon for a special item, but I didn't make it available. A few posts ago there is another module which is supposed to be integrated into the Shop by default, but it isn't at the moment.


Quote from: erich199 on November 24, 2023, 02:01:53 PMI noticed today I'm getting a "null" error log message. It seems to be happening when a guest tries to access the shop directly, although I'm not sure why or how they're doing it since guest have no access to the shop on my site.
Sorry I missed this... I will fix it at some point  :laugh:

SMF Tricks - Free & Premium Responsive Themes for SMF.

StarredSkies

Quote from: Diego Andrés on November 01, 2020, 12:29:24 AM4.0 - 31 October 2020
Added option to import data from SMF Shop, SA Shop and ST Shop 3.x

Hello! I want to thank you for this feature after I poked about it forever ago... It's time to finally switch over. It's going to make things a hell of a lot easier for me.

That said, I am trying to import my data from SMF Shop and am getting this error:
QuoteData too long for column 'description' at row 3
File: /home/DOMAIN/SUBDOMAIN/Sources/Shop/Helper/Database.php
Line: 274

Since the descriptions in the columns are too long, would you recommend deleting the data within them and proceeding? Or is there a way to increase the amount of data?

Diego Andrés

That's one option.
Another one would be to increase the size of the description column in the stshop column.
I'll take a look soon.

SMF Tricks - Free & Premium Responsive Themes for SMF.

StarredSkies

I'm not particularly picky either way. I'll probably just drop the descriptions while I'm testing and if there's changes later, I'll throw them back up.

Diego Andrés

Okay so you'll have to go to the stshop_items table, and modify the description column and turn it into a text column.
But you could also keep it varchar and just increase the size from 255 to something higher like 1024.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

Been updating my shop for my prize system I've confirmed the following works

In posting file
Database::Update('members', $this->_post_shop, 'shopMoney = shopMoney + {int:credits} + {int:bonus},prize_points = prize_points + {int:credits}', 'WHERE id_member = {int:user}');
Also updated SimpleReferrals as I use it. (Haven't been able to confirm)
Database::Update('members', ['user' => $regOptions['register_vars']['referral'], 'credits' => $modSettings['Shop_integration_simple_referrals_setting']], 'shopMoney = shopMoney + {int:credits},prize_points = prize_points + {int:credits}', 'WHERE id_member = {int:user}');
This is the bit im not sure about in singnup
$regOptions['register_vars']['shopMoney'] = !empty($modSettings['Shop_credits_register']) ? $modSettings['Shop_credits_register'] : 0;
$regOptions['register_vars']['prize_points'] = !empty($modSettings['Shop_credits_register']) ? $modSettings['Shop_credits_register'] : 0;

Not sure if there any were else I need to update?

mick



Site Under redesign not expected to be complete before July 2025

mickjav

Just been testing and found that the shop doesn't remove points when a topic is removed, but it does add them correctly?

As you know I've been editing the shop for my prize system but the only edit I made to that function is:

SET shopMoney = shopMoney - {int:point},prize_points = prize_points - {int:point}
All the best mick
Site Under redesign not expected to be complete before July 2025

mickjav

Justb found why it's not removing shop money lol

if(!empty($modSettings['Shop_enable_shop']))
I'll change that for the mod setting my system uses
Site Under redesign not expected to be complete before July 2025

mickjav

Still wont work

tried



if($modSettings['pledges_use_stshop'])
and
if(!empty($modSettings['pledges_use_stshop']))

Have checked value for above which is set as 1

plus checked the board where posts are being deleted

$shop_info['Shop_credits_post']
Above is set to 1 plus the topic and post is set to 10 for the board

all teh best mick
Site Under redesign not expected to be complete before July 2025

Diego Andrés

I think that is not a feature because it would require 'tracking' the content that is being deleted with the corresponding credits.
I'll check later to be sure.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: