Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 177
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 184
Total: 184

Author Topic: Custom Fields (Select Field) error [{$db_prefix}]  (Read 3858 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
8422 Views
Last post June 21, 2009, 08:35:51 pm
by SMFHacks
1 Replies
4852 Views
Last post February 26, 2009, 11:26:31 pm
by SMFHacks
15 Replies
13597 Views
Last post August 16, 2009, 12:53:38 am
by Vincent Volmer
1 Replies
4594 Views
Last post September 17, 2010, 09:09:31 am
by Vincent Volmer
0 Replies
3756 Views
Last post July 22, 2011, 05:02:43 am
by Xtreme4U2NV

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

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

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal