Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with new feature for Information Unlimited


Guest

Recommended Posts

I want to turn Information Unlimited into a more general menu/navigation structure. In particular, I want to add menu elements within information boxes that simply point to a URL of my choosing such as "index.php" rather than to an information page like "information.php?info_id=5"

 

I have made 2 small modifications and have now got the display of these new menu elements to work. However, I do not have the skill to modify the admin pages to complete the modification. Can anyone help?

 

Basically, I use the varialble visible to decide whether the menu item is a normal info page (when =1) or is a link only (when =2). When visible is set to 2, then the URL the menu item points to is the value of 'description'. To use this, I manually edit the database and set visible=2 and simply enter the URL in the description field.

 

MODIFICATIONS (based on Info Unlimited 1.1g):

 

1. In the database, TABLE information contains filed "visible" which is set to type ENUM with list values: '0','1'. I have added '2' to the ENUM list.

 

2. In catalog/includes/boxes/information.php:

 

Modify

 

$sql=mysql_query('SELECT information_id, languages_id, info_title FROM ' . TABLE_INFORMATION .' WHERE visible=\'1\' and languages_id ='.$languages_id.' ORDER BY v_order')

 

or die(mysql_error());

while($row=mysql_fetch_array($sql)):

$filename_information = tep_href_link(FILENAME_INFORMATION) . (stristr(tep_href_link(FILENAME_INFORMATION), '?')?'&':'?') . 'info_id=' . $row['information_id'];

$informationString .= '<a href="' . $filename_information . '">' . $row['info_title'] . '</a><br>';

endwhile;

 

 

to

 

$sql=mysql_query('SELECT information_id, languages_id, info_title , description, visible FROM ' . TABLE_INFORMATION .' WHERE languages_id ='.$languages_id.' ORDER BY v_order')

 

or die(mysql_error());

while($row=mysql_fetch_array($sql)):

 

 

switch ($row['visible']){

 

case '0': // Not visible

break;

 

case '1': // For normal information pages

$filename_information = tep_href_link(FILENAME_INFORMATION) . (stristr(tep_href_link(FILENAME_INFORMATION), '?')?'&':'?') . 'info_id=' . $row['information_id'];

$informationString .= '<a href="' . $filename_information . '">' . $row['info_title'] . '</a><br>';

break;

 

case '2': // For URL only links

$filename_information = tep_href_link($row['description']);

$informationString .= '<a href="' . $filename_information . '">' . $row['info_title'] . '</a><br>';

break;

}

 

endwhile;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...