Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 212
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 213
Total: 213

Author Topic: Custom Fields (Select Field) error [{$db_prefix}]  (Read 3868 times)

0 Members and 1 Guest are viewing this topic.

Offline Darkshadow

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Dark Mysterious Worlds
Custom Fields (Select Field) error [{$db_prefix}]
« on: May 15, 2009, 03:14:14 am »
ok, i have an item and want add a custom listfield, after i added them i want to enter the list entrys.

Now the problem occur,: error message: field item_custom_field not found
after i fix it in the store.php (look in added code)

next error occur: field store_item not found
after i fix it in the store.php (look in added code)

everything worked fine...


My working fix:

Code: [Select]
function ManageSelectBox()
{
global $context, $txt, $mbname;

isAllowedTo('smfstore_manage');

$id = (int) $_REQUEST['id'];

$context['store_selectid'] = $id;

$context['page_title'] =  $mbname . ' - ' . $txt['store_txt_maange_select_fields'];

$context['sub_template']  = 'manage_select';

// Get item id
$dbresult = db_query("
SELECT
title, ID_ITEM
FROM smf_store_item_custom_field
WHERE ID_FIELD = $id  LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);



// Get Product Name
$dbresult = db_query("
SELECT
productname
FROM smf_store_item
WHERE ID_ITEM = " . $row['ID_ITEM'] . " LIMIT 1", __FILE__, __LINE__);
$productRow = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);



But this should not a permanent solution, plese fix the {$db_prefix} in this area, so it contained the "smf_" prefix

I have no idea why to hell the string "smf_" are lost in this area... The "AddSelect()" function after the "ManageSelectBox()" function work with the {$db_prefix} without problems...

Please respond to my other errors i postet yesterday in classifieds system...

Darkshadow
« Last Edit: May 15, 2009, 03:43:28 am by Darkshadow »

 

Related Topics

  Subject / Started by Replies Last post
10 Replies
8458 Views
Last post June 21, 2009, 08:35:51 pm
by SMFHacks
1 Replies
4876 Views
Last post February 26, 2009, 11:26:31 pm
by SMFHacks
15 Replies
13626 Views
Last post August 16, 2009, 12:53:38 am
by Vincent Volmer
1 Replies
4618 Views
Last post September 17, 2010, 09:09:31 am
by Vincent Volmer
0 Replies
3785 Views
Last post July 22, 2011, 05:02:43 am
by Xtreme4U2NV

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal