SMF Shop

SMFShop => General SMFShop Discussion => Topic started by: chadk on October 27, 2006, 11:53:49 pm

Title: Users can't register with the shop installed
Post by: chadk on October 27, 2006, 11:53:49 pm
I just noticed a problem with user registrations while the shop is installed.
The sql statement at line 783
Code: [Select]
// Register them into the database.
db_query("
INSERT INTO {$db_prefix}members
(" . implode(', ', array_keys($regOptions['register_vars'])) . ")
VALUES (" . implode(', ', $regOptions['register_vars']) . ')', __FILE__, __LINE__);
$memberID = db_insert_id();
returns a statement that has nothing for the MONEY register_var.  This causes a problem with the sql statement.  To fix this and allow registration of new users add this to the line just before the //Register them intot he database. line:
Code: [Select]
$regOptions['register_vars']['money']=0;
Title: Re: Users can't register with the shop installed
Post by: Daniel15 on October 28, 2006, 12:13:13 am
Actually, you should be able to fix this by going to the shop admin panel, and specifying a number for the registration amount (it should have been set to 0 by default).
EDIT: What version of SMF are you using? As I've only tested with SMF 1.0.8, there may be problems with SMF 1.1...
Title: Re: Users can't register with the shop installed
Post by: chadk on October 28, 2006, 05:56:12 am
1.1 rc3, it runs fine with this version but didn't know about the registration amount, that may have been the problem. ;)