Author Topic: Database Error  (Read 3453 times)

Offline Innerflame

Database Error
« on: February 24, 2007, 11:32:28 pm »
Installed the latest version 3.0 But can not add/delet./edit. Nothing. Nore does the shop like appear in the top bar.

here is the message I get when I click Add/Delete/Edit

Quote
Unknown column 'category' in 'field list'
File: /home/osihdfei/public_html/Sources/shop/Shop-Subs.php
Line: 108

I have also tried to upload the instalscript.php... nuttun.

Offline feeble

Re: Database Error
« Reply #1 on: February 25, 2007, 07:50:13 am »
did you run the installscript?

just point to it in the browser.

Offline Daniel15

Re: Database Error
« Reply #2 on: February 25, 2007, 05:24:48 pm »
Is this a fresh SMFShop 3.0 installation, or an upgrade from SMFShop 2.3? Have you installed SMFShop in the past?

Please try running this query in phpMyAdmin:
Code: [Select]
ALTER TABLE smf_shop_items ADD `category` SMALLINT NOT NULL
EDIT:
Quote
Nore does the shop like appear in the top bar.
Are you using the default theme, or a custom one?
« Last Edit: February 25, 2007, 05:29:17 pm by Daniel15 »

Offline Innerflame

Re: Database Error
« Reply #3 on: February 25, 2007, 06:23:59 pm »
Well, I went though and uninstalled 3.o fixed. And loaded 2.3...and upgraded. NOW it works. The only thing now is that the shop link will not show up in the top...*Which I can put in myself*  And the cash will not show up in the peoples av area.




Yes it is a custum theme. And it was installed on the board, one of my other admins put this newly custum theme up...took it right off. *sigh*

I LOVE the program!! I made my own shop items for it..but trying to get it to work on this theme has puzzled me.

Offline Mish

Re: Database Error
« Reply #4 on: March 01, 2007, 11:05:05 am »
Hey, I'm the other admin at the forum Innerflame is at. 

We're now using an exact copy of the SMF default theme (not touching the php files, just recoloring graphics), we can now modify EVERYTHING in admin but nothing is showing up in the board threads nor the navigation bar.  We did a fresh install.

I went to uninstall once, Load.php failed something, I reloaded just that file, reinstalled...same thing.

Is all the shop stuff supposed to be in the Sources folder?  Might be me, but shouldn't be in the themes folder?  I'm no expert though, I'm more of an HTML person.

Offline Daniel15

Re: Database Error
« Reply #5 on: March 02, 2007, 05:33:01 pm »
Quote
You may use the "Members' Inventory" option to edit a member's credits :).

Quote
Is all the shop stuff supposed to be in the Sources folder?  Might be me, but shouldn't be in the themes folder?
All the Source files (files that do the backend work) are in Sources/shop. All the Template files (files that show all the end results) are in Themes/default.

Quote
nothing is showing up in the board threads
It sounds like the template file wasn't edited correctly. Please edit the Display.template.php file from the default theme, by following the instructions at http://www.daniel15.com/forum/index.php/topic,39.0.html ;)

Quote
nor the navigation bar
To add the SMFShop button to the navigation bar:
Open Themes/default/index.template.php, and find:
Code: (php) [Select]
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
Add after:
Code: (php) [Select]
// Begin SMFShop code
if ($context['current_action'] == 'shop')
$current_action = 'shop';
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup')))
$current_action = 'admin';
// End SMFShop code

Also, find:
Code: (php) [Select]
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Add after:
Code: (php) [Select]
// SMFShop
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=shop">Shop</a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
//END SMFShop MOD code

Offline Innerflame

Re: Database Error
« Reply #6 on: March 02, 2007, 05:39:26 pm »
Thanks bunches!! (hugs) got it to work!  And thank you for taking the time to answer seeing that your back to school. You do a great job here. And am just happy with your shop mod.

Good luck with school O0