Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 146
0 Users 4 Guests Online
Forum Index » Tutorials » Shop Make Over
Posted on Sunday 3rd February 2008 at 07:00 PM
MrArmstrong
templates/default/images/noavatar.png's Avatar
Active Member
Theres Errors in the shop i posted them on the comments
Posted on Sunday 3rd February 2008 at 07:53 PM
Diablosblizz
templates/default/images/noavatar.png's Avatar
Senior Member
1. For the shop_admin.php:

Find:

Code
/check if admin


Replace with:

Code
//check if admin


Just forgot one of the /'s to make it a comment. As for the other error on line 132 on shop.php:

Replace:

Code
$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username']' AND `name` = '$item[name]';"); //update it ;)


With:

Code
$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username]' AND `name` = '$item[name]'"); //update it ;)


Errors should be fixed.
Posted on Sunday 3rd February 2008 at 08:03 PM
DanielXP
avatars/1.png's Avatar
Senior Member
Tutorial updated, Work now?
Posted on Sunday 3rd February 2008 at 08:36 PM
ShadowMage
templates/default/images/noavatar.png's Avatar
Senior Member
Code

$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username']' AND `name` = '$item[name]';"); //update it ;)

Works fine. It doesn't matter if you have a ; after the main things or not i do it just because i'm used to it and such things.
Posted on Wednesday 6th February 20 at 09:54 PM
Diablosblizz
templates/default/images/noavatar.png's Avatar
Senior Member
Look at the code:

Code

$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username']' AND `name` = '$item[name]';"); //update it ;)


If you really look hard enough:

Code
'$logged[username']'


You have a ' in the username, so I fixed that and the ;, weather it matters or not.
Posted on Thursday 7th February 200 at 08:23 PM
MrArmstrong
templates/default/images/noavatar.png's Avatar
Active Member
Thank You Very Much Ive Now Got it Fixeed :)
Posted on Saturday 9th February 200 at 04:14 PM
Diablosblizz
templates/default/images/noavatar.png's Avatar
Senior Member
Your welcome.