tufty Posted November 12, 2008 Share Posted November 12, 2008 I have been trying to install engine friendly URL. After installation I had two problems 1. When entering manufacturers on the website I had "Parse error: syntax error, unexpected ';', expecting ')' in /home/fruitsof/public_html/eStore/includes/boxes/manufacturers.php on line 52" manufacturers.php as follows <?php /* $Id: manufacturers.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { ?> <!-- manufacturers //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_MANUFACTURERS); new infoBoxHeading($info_box_contents, false, false); if ($number_of_rows <= MAX_DISPLAY_MANUFACTURERS_IN_A_LIST) { // Display a list $manufacturers_list = ''; while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); if (isset($HTTP_GET_VARS['manufacturers_id']) && ($HTTP_GET_VARS['manufacturers_id'] == $manufacturers['manufacturers_id'])) $manufacturers_name = '<b>' . $manufacturers_name .'</b>'; $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>'; } $manufacturers_list = substr($manufacturers_list, 0, -4); $info_box_contents = array(); $info_box_contents[] = array('text' => $manufacturers_list); } else { // Display a drop-down $manufacturers_array = array(); if (MAX_MANUFACTURERS_LIST < 2) { $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); } while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']); $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], // SEF BEGIN $url_rewrite = new url_rewrite; $manufacturers_name_rewrite = $url_rewrite->prepare_url($manufacturers['manufacturers_name']); $manufacturers_array[] = array('id' => DIR_WS_HTTP_CATALOG . $manufacturers_name_rewrite . '/', 'text' => $manufacturers_name); // SEF END } // SEF BEGIN if(isset($HTTP_GET_VARS['manufacturers_id'])){ $manufacturers_rewrite_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'"); $manufacturers_rewrite = tep_db_fetch_array($manufacturers_rewrite_query); } $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'), 'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $url_rewrite->prepare_url($manufacturers_rewrite['manufacturers_name']) : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id()); // SEF END } new infoBox($info_box_contents); ?> </td> </tr> <!-- manufacturers_eof //--> <?php } ?> also 2. When I first go into the website on the index page, and try to go into select category, it comes up HTTP404 error but I did notice the URL is index.php/cPath/34. If I go into new products , it works and the URL is gourmet food/duck products/foie gras, which is what I want it to do. But when you try and purcase the item or get a product review it comes up with HTTP404 error again and the URL's numbers. Any suggestions?????? Any help would be very appreciated. Sue Link to comment Share on other sites More sharing options...
tufty Posted November 12, 2008 Author Share Posted November 12, 2008 Also, forgot to add, if after viewing the new products, you go into the side menu categories, they suddenly start to work with the correct URL's. How can they not work and then suddenly start to work. You still cannot purchase everything though. The website is fruitsoffrance.com Sue Link to comment Share on other sites More sharing options...
Guest Posted November 12, 2008 Share Posted November 12, 2008 Forget that one and use 2.1d ORIGINAL updated FWR Media 7 Nov 2008 Link to comment Share on other sites More sharing options...
tufty Posted November 12, 2008 Author Share Posted November 12, 2008 Forget that one and use 2.1d ORIGINAL updated FWR Media 7 Nov 2008 Thanks for your advise, I was thinking of starting again. Have now managed to get my shopping cart working again but would like to try your suggestion. I am new to all this, so I downloaded all the files but cannot work out which file is the instructions to follow. Could you let me know which ones I need. Thanks Sue Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.