SMF Shop

SMFShop => General SMFShop Discussion => Topic started by: iamcanadian on February 18, 2006, 11:26:38 am

Title: How was this solved????
Post by: iamcanadian on February 18, 2006, 11:26:38 am
Add New Item Error : http://www.daniel15.com/forum/index.php?topic=29.0


I have the exact same problem. Thanks!
Title: Re: How was this solved????
Post by: Daniel15 on February 18, 2006, 03:54:29 pm
Well, here's some parts of the solution I sent to that user:
Quote
Open Sources/shop/ShopAdmin.php and find this line (line 162):
include "Sources/shop/items/$file";

Replace it with this:
include "$boarddir/Sources/shop/items/$file";

Also, in the same file, Find this (line 157):
include "Sources/shop/item_engine.php";

Replace with:
include "$boarddir/Sources/shop/item_engine.php";

And:
Quote
......try opening Sources/shop/ShopAdmin.php and changing:

include "Sources/shop/item_engine.php";
include "Sources/shop/items/{$_POST['item']}.php";


to:

include "$boarddir/Sources/shop/item_engine.php";
include "$boarddir/Sources/shop/items/{$_POST['item']}.php";

Also, open Sources/shop/Shop.php and change
require("Sources/shop/item_engine.php");
to
require("$boarddir/Sources/shop/item_engine.php");

Also, change:
require("Sources/shop/items/{$row['module']}.php");
to:
require("$boarddir/Sources/shop/items/{$row['module']}.php");

Hopefully, that's the whole solution (I had to go through our support ticket, and the live chat log as well)

Please tell me if this doesn't work for you
 --daniel15
Title: Re: How was this solved????
Post by: iamcanadian on February 18, 2006, 10:42:57 pm
It worked! Thank you for all your help!! :D
Title: Re: How was this solved????
Post by: markonio on March 04, 2006, 04:52:38 am
I was done exactly everything. But, when I go on Use Item, I get this:
Code: [Select]
Fatal error: shop(): Failed opening required '/Sources/shop/item_engine.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cromana/public_html/forum/Sources/shop/Shop.php on line 337
Title: Re: How was this solved????
Post by: Daniel15 on March 04, 2006, 03:32:11 pm
Hi,
 It sounds like you missed one of the lines. Open Sources/shop/Shop.php and search for:
Code: [Select]
include "Sources/shop/item_engine.php";
Replace with:
Code: [Select]
include "$boarddir/Sources/shop/item_engine.php";
Title: Re: How was this solved????
Post by: markonio on March 05, 2006, 07:43:50 am
But that code is in ShopAdmin.php:
Code: [Select]
include "$boarddir/Sources/shop/item_engine.php";
In attach is both (in .txt format), ShopAdmin.php and Shop.php so please look what is wrong!
Title: Re: How was this solved????
Post by: Daniel15 on March 05, 2006, 09:09:26 am
Hi,
 In Shop.php, on top of:
Code: [Select]
require("$boarddir/Sources/shop/item_engine.php");
Try putting:
Code: [Select]
global $boarddir;

Please tell me if that works for you.
Title: Re: How was this solved????
Post by: markonio on March 08, 2006, 11:45:36 pm
It working now!
Thanks!