Page 11 of 38

Posted: Fri Dec 05, 2003 11:29 am
by lwq
help needed for this one:
General Error
Could not obtain cash information

DEBUG MODE

SQL Error : 1146 Table 'tksec2e_database.CASH_TABLE' doesn't exist

SELECT cash_id, cash_name FROM CASH_TABLE ORDER BY cash_order

Line : 111
File : /home/www/forum/admin/admin_store_list.php

i am using cash mod.

Posted: Fri Dec 05, 2003 10:02 pm
by wGEric
This MOD will not work with the newest version of the Cash MOD (2.2.1)

;)

Posted: Sat Dec 06, 2003 3:08 pm
by pokemaster
FIX for cash mod 2.2.1 with store mod 0.0.4

Code: Select all

#
#---[ open ]---
#

store.php

#
#---[ find ]---
# more than 1 

CASH_TABLE

#
#---[ replace with ]---
#

phpbb_cash 

#
#---[ open ]---
#
includes/functions_store.php

#
#---[ find ]---
# more than 1

CASH_TABLE

#
#---[ replace with ]---
#

phpbb_cash

#
#---[ open ]---
#
admin/admin_store_list.php 

#
#---[ find ]---
# more than 1

CASH_TABLE

#
#---[ replace with ]---
#

phpbb_cash

################
#  END OF FIX  #
################
it works on mine if need anymore help post!

Posted: Sun Dec 07, 2003 12:19 pm
by Lyrthion
lwq wrote: help needed for this one:
General Error
Could not obtain cash information

DEBUG MODE

SQL Error : 1146 Table 'tksec2e_database.CASH_TABLE' doesn't exist

SELECT cash_id, cash_name FROM CASH_TABLE ORDER BY cash_order

Line : 111
File : /home/www/forum/admin/admin_store_list.php

i am using cash mod.


you need to modify your database so that the tables correspond (use the correct prefix).

I seem to be having some kind of problem. The store is working perfectly on my old (now test) server, and I've transferred it in its original form to my new server. However, the stores show up weird, and do not display the buttons correctly. Indeed, they are totally transferred. I'll just try and download the original files again, using these. Hope that will work.

edit-in: I fixed it, by removing a is_owner_switch from the template file. Of course that resulted in removing some of the abilities of shop owners, but at least the basic functions work properly again.

Posted: Mon Dec 08, 2003 10:41 am
by swedevil
I seem to have run into a problem...

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
		<!-- END switch_exchangeon -->
#
#-----[ AFTER, ADD ]-----------------------------------------
#	
		<!-- BEGIN switch_item_view -->
    <tr>
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_USER_ITEMS}:</span></td>
		  <td> <b><span class="gen"><a href="{U_USER_ITEMS}" class="gen">{L_USER_ITEMS_GOTO}</a></span></b></td>
		</tr>
		<!-- END switch_item_view -->
<!-- END switch_exchangeon --> does not exist in that file!!!


exact same problem here:

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
		<!-- END cashrow -->
#
#-----[ AFTER, ADD ]-----------------------------------------
#	
		<!-- BEGIN switch_item_view -->
		<br />
    <a href="{postrow.U_USER_ITEMS}" class="postdetails">{postrow.L_USER_ITEMS_GOTO}</a>
    <!-- END switch_item_view -->

Posted: Mon Dec 08, 2003 11:56 am
by Mainor Davos
This mod work with Point System 2.0?

Posted: Mon Dec 08, 2003 10:05 pm
by wGEric
swedevil wrote: I seem to have run into a problem...


The Store doesn't work with Cash Mod 2.2.1.
Mainor Davos wrote: This mod work with Point System 2.0


No, it only supports the Cash Mod.

Posted: Mon Dec 08, 2003 11:35 pm
by swedevil
I meant to edit my post. I read back and noticed that after I posted... sorry..

is that something you are working on/plan on working on?

Error :(

Posted: Wed Dec 10, 2003 4:38 pm
by zingysaturn
When i try to create a store i get this error
Could not obtain cash information

DEBUG MODE

SQL Error : 1146 Table 'zingysa_phpb1.CASH_TABLE' doesn't exist

SELECT cash_id, cash_name FROM CASH_TABLE ORDER BY cash_order

Line : 111
File : /home/zingysa/public_html/forum/admin/admin_store_list.php


How do i fix that? :P


-Zingysaturn

Posted: Fri Dec 12, 2003 4:52 am
by Soth
i have a (hopefully) simple error.

When i try and purchase an item , it gives me the following error...

Fatal Error Getting User Info

if anyone can help fix this, or direct me somewhere where i can research this further, it would be greatly appreciated.

thank you

Posted: Fri Dec 19, 2003 10:38 am
by pokemaster
Zingysaturn: you need to do this:

FIX for cash mod 2.2.1 with store mod 0.0.4

Code: Select all

 
# 
#---[ open ]--- 
# 

store.php 

# 
#---[ find ]--- 
# more than 1 

CASH_TABLE 

# 
#---[ replace with ]--- 
# 

phpbb_cash 

# 
#---[ open ]--- 
# 
includes/functions_store.php 

# 
#---[ find ]--- 
# more than 1 

CASH_TABLE 

# 
#---[ replace with ]--- 
# 

phpbb_cash 

# 
#---[ open ]--- 
# 
admin/admin_store_list.php 

# 
#---[ find ]--- 
# more than 1 

CASH_TABLE 

# 
#---[ replace with ]--- 
# 

phpbb_cash 

################ 
#  END OF FIX  # 
################ 



it works on mine if need anymore help post!

Posted: Fri Dec 19, 2003 7:10 pm
by A.I. BOT
some should test ur code to make sure

but good work

Posted: Sat Dec 20, 2003 12:41 am
by A.I. BOT
hey i got this to work with 2.2.1 witht he help of the above code but i hade to make some edits in the install so easy mod could find find some things but it works good

Posted: Sat Dec 20, 2003 5:24 am
by busterblader103

Code: Select all

CREATE TABLE phpbb_store_inventory (
  inventory_id bigint(8) NOT NULL auto_increment,
  inventory_item bigint(8) NOT NULL default '0',
  inventory_store bigint(8) default NULL,
  inventory_user bigint(8) default NULL,
  inventory_price bigint(8) NOT NULL default '0',
  inventory_amount bigint(8) NOT NULL default '0',
  restock_time varchar(255) default NULL,
  restock_amount bigint(8) default NULL,
  restock_last varchar(255) default NULL,
  UNIQUE KEY item_id (inventory_id)
) TYPE=MyISAM;

CREATE TABLE phpbb_store_items (
  item_id bigint(8) NOT NULL auto_increment,
  item_name varchar(99) NOT NULL default '',
  item_description varchar(255) default NULL,
  item_image varchar(255) default NULL,
  item_special tinyint(1) NOT NULL default '0',
  UNIQUE KEY item_id (item_id)
) TYPE=MyISAM;

CREATE TABLE phpbb_store_list (
  store_id bigint(8) NOT NULL auto_increment,
  owner_id bigint(8) NOT NULL default '0',
  store_name varchar(100) NOT NULL default '',
  store_description varchar(255) default NULL,
  cash_id bigint(8) NOT NULL default '0',
  UNIQUE KEY store_id (store_id)
) TYPE=MyISAM;

ALTER TABLE phpbb_users ADD stores_owned BIGINT(8) DEFAULT '0' NOT NULL;
see, i dunno what that is... isnt there like a store_install.php ? lol

Posted: Sat Dec 20, 2003 4:21 pm
by pokemaster
i have made this store_install.php file:

Code: Select all

<?php
/***************************************************************************
 *                               Store_install.php
 *                            -------------------
 *
 *   copyright            : ©2003
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//


if( !$userdata['session_logged_in'] )
{
	$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
	header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
	exit;
}

if( $userdata['user_level'] != ADMIN )
{
	message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}


$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';


$sql = array();
$sql[] = "CREATE TABLE " . $table_prefix . "store_inventory (
  inventory_id bigint(8) NOT NULL auto_increment,
  inventory_item bigint(8) NOT NULL default '0',
  inventory_store bigint(8) default NULL,
  inventory_user bigint(8) default NULL,
  inventory_price bigint(8) NOT NULL default '0',
  inventory_amount bigint(8) NOT NULL default '0',
  restock_time varchar(255) default NULL,
  restock_amount bigint(8) default NULL,
  restock_last varchar(255) default NULL,
  UNIQUE KEY item_id (inventory_id)
) TYPE=MyISAM";
$sql[] = "CREATE TABLE " . $table_prefix . "store_items (
  item_id bigint(8) NOT NULL auto_increment,
  item_name varchar(99) NOT NULL default '',
  item_description varchar(255) default NULL,
  item_image varchar(255) default NULL,
  item_special tinyint(1) NOT NULL default '0',
  UNIQUE KEY item_id (item_id)
) TYPE=MyISAM";
$sql[] = "CREATE TABLE " . $table_prefix . "store_list (
  store_id bigint(8) NOT NULL auto_increment,
  owner_id bigint(8) NOT NULL default '0',
  store_name varchar(100) NOT NULL default '',
  store_description varchar(255) default NULL,
  cash_id bigint(8) NOT NULL default '0',
  UNIQUE KEY store_id (store_id)
) TYPE=MyISAM";
$sql[] = "ALTER TABLE " . $table_prefix . "users ADD stores_owned BIGINT(8) DEFAULT '0' NOT NULL";

for( $i = 0; $i < count($sql); $i++ )
{
	if( !$result = $db->sql_query ($sql[$i]) )
	{
		$error = $db->sql_error();

		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
	}
	else
	{
		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
	}
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&nbsp;</td></tr>';

echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbhacks.com/forums" target="_phpbbhacks">phpBBHacks.com support forums</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
just paste the code in to notepad and name it store_install.php

if you want to download this post a reply and i'll put this file in a zip so you can download it!