[ABD] Store MOD Version 0.0.5

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
User avatar
lwq
Registered User
Posts: 181
Joined: Tue Aug 12, 2003 1:43 pm

Post 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.
lwq
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

This MOD will not work with the newest version of the Cash MOD (2.2.1)

;)
Eric
pokemaster
Registered User
Posts: 361
Joined: Fri Aug 22, 2003 8:10 am
Location: UK

Post 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!
Last edited by pokemaster on Sat Dec 06, 2003 3:12 pm, edited 1 time in total.
Lyrthion
Registered User
Posts: 262
Joined: Mon Oct 06, 2003 4:51 pm
Contact:

Post 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.
Flattering Child, you shall know me.
See why in shadow I hide.
Look at your face in the mirror,
I am there, inside...
Tar Korma - Forum Fantasy Roleplay
swedevil
Registered User
Posts: 94
Joined: Wed Nov 05, 2003 7:10 am

Post 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 -->
Mainor Davos
Registered User
Posts: 1
Joined: Mon Dec 08, 2003 11:55 am

Post by Mainor Davos »

This mod work with Point System 2.0?
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post 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.
Eric
swedevil
Registered User
Posts: 94
Joined: Wed Nov 05, 2003 7:10 am

Post 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?
zingysaturn
Registered User
Posts: 13
Joined: Wed Nov 19, 2003 6:29 am

Error :(

Post 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
Soth
Registered User
Posts: 29
Joined: Wed Dec 10, 2003 11:42 pm

Post 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
pokemaster
Registered User
Posts: 361
Joined: Fri Aug 22, 2003 8:10 am
Location: UK

Post 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!
A.I. BOT
Registered User
Posts: 1848
Joined: Thu Apr 17, 2003 11:43 pm
Location: Newfoundland, Canada
Contact:

Post by A.I. BOT »

some should test ur code to make sure

but good work
A.I. BOT
Registered User
Posts: 1848
Joined: Thu Apr 17, 2003 11:43 pm
Location: Newfoundland, Canada
Contact:

Post 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
busterblader103
Registered User
Posts: 80
Joined: Sun Sep 07, 2003 6:08 pm

Post 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
pokemaster
Registered User
Posts: 361
Joined: Fri Aug 22, 2003 8:10 am
Location: UK

Post 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!
Locked

Return to “[2.0.x] MODs in Development”