Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seach Engine Friendly URL Support


BlueYon

Recommended Posts

why are my admin urls looking like this?

 

http://sweetdeal4u.bizdir_ws_adminconfiguration.php/?selected_box=configuration&gID=1&osCAdminID=d9fb6af447691caaaee9b22f0e07895f

 

I have backed the contibution completely out, and am unable to get to my admin functions.

 

any ideas?

[right][post=655708]<{POST_SNAPBACK}>[/post][/right]

 

I think you over wrote the worng files.

 

Soposed to be for catelog not admin!

Link to comment
Share on other sites

  • Replies 968
  • Created
  • Last Reply

Top Posters In This Topic

why are my admin urls looking like this?

 

http://sweetdeal4u.bizdir_ws_adminconfiguration.php/?selected_box=configuration&gID=1&osCAdminID=d9fb6af447691caaaee9b22f0e07895f

 

I have backed the contibution completely out, and am unable to get to my admin functions.

 

any ideas?

[right][post=655708]<{POST_SNAPBACK}>[/post][/right]

 

Sweet

Your DIR_WS_ADMIN value is wrong in catalog/admin/includes/configure.php

If possible copy and paste catalog/admin/includes/configure.php file here

Hilton

Link to comment
Share on other sites

Sweet

Your DIR_WS_ADMIN value is wrong in catalog/admin/includes/configure.php

If possible copy and paste catalog/admin/includes/configure.php file here

Hilton

 

Ok here it is:

/*
 $Id: configuration.php,v 1.43 2003/06/29 22:50:51 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 if (tep_not_null($action)) {
   switch ($action) {
     case 'save':
       $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
       $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

       tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'");

       tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID));
       break;
   }
 }

 $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID'] : 1;

 $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'");
 $cfg_group = tep_db_fetch_array($cfg_group_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr class="dataTableHeadingRow">
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td>
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
             </tr>
<?php
 $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order");
 while ($configuration = tep_db_fetch_array($configuration_query)) {
   if (tep_not_null($configuration['use_function'])) {
     $use_function = $configuration['use_function'];
     if (ereg('->', $use_function)) {
       $class_method = explode('->', $use_function);
       if (!is_object(${$class_method[0]})) {
         include(DIR_WS_CLASSES . $class_method[0] . '.php');
         ${$class_method[0]} = new $class_method[0]();
       }
       $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});
     } else {
       $cfgValue = tep_call_function($use_function, $configuration['configuration_value']);
     }
   } else {
     $cfgValue = $configuration['configuration_value'];
   }

   if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) {
     $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration['configuration_id'] . "'");
     $cfg_extra = tep_db_fetch_array($cfg_extra_query);

     $cInfo_array = array_merge($configuration, $cfg_extra);
     $cInfo = new objectInfo($cInfo_array);
   }

   if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) {
     echo '                  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n";
   } else {
     echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n";
   }
?>
               <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td>
               <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td>
               <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
             </tr>
<?php
 }
?>
           </table></td>
<?php
 $heading = array();
 $contents = array();

 switch ($action) {
   case 'edit':
     $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

     if ($cInfo->set_function) {
       eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');
     } else {
       $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);
     }

     $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
   default:
     if (isset($cInfo) && is_object($cInfo)) {
       $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
       $contents[] = array('text' => '<br>' . $cInfo->configuration_description);
       $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added));
       if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));
     }
     break;
 }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
   echo '            <td width="25%" valign="top">' . "\n";

   $box = new box;
   echo $box->infoBox($heading, $contents);

   echo '            </td>' . "\n";
 }
?>
         </tr>
       </table></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks for any help you can give me.

Link to comment
Share on other sites

I installed this yesterday and everthing seems to be working fine with a few small exceptions, I have found one category that when I click on it the product within won't display, it says no products avaialble though in the category box it shows 1 item included. A few other categories will no longer display their subcategories or the items below them, again on the infobox it says there are items within but nothing when you clikc on them.

 

One other question, and its possible this is working as intended. If I click on a item in my Whats New info box instead of showing the full path with its category, subcategory, etc it simply shows www.mysite.com/catalog/test - where test is the name of the product.

Link to comment
Share on other sites

Well I seem to have figured out my problem, just no clue how to fix it outside of changing my category names.

 

I deal in old G.I.Joe toys, so I have a Category for Complete Figures, one for Incomplete Figures and one for Accessories. Joe figures are commonly sorted by year so under each I have a subcategory of the year name, 1982, 1983, 1984, etc, etc. On any category with a duplicate name with another sub-category it shows up as no items present even if there are. When I change the sub-category name so there is no other with the same name then everything shows up properly. I do have one which has a dual listing for 1986, both are valid but only one has the item count on it. So far I have gotten around this by changing all of the names but I would rather not if possible as it looks clunky.

 

****EDIT****

 

Ok so I lied, its not all fixed, now I can't seem to view the properties of any of my items, I click on the link for a given item and it doesn't go anywhere.

Edited by Druss
Link to comment
Share on other sites

This is my second attempt at creating a better version of the search engine safe urls.

 

It will change URLS from:

http://www.yoursite.com/product_info.php?c...4&products_id=1

 

to:

 

http://www.yoursite.com/Hardware/Graphics-...atrox-G200-MMS/

You can see it being used on a live site here:

 

http://www.itchi-tech.com

 

Hi BlueYon,

 

On your website it looks like you have your SE friendly URL's contribution running as well as the Header Tag Controller.

 

I installed both and I'm experiencing same problem as reported in this thread by other users.

 

The category meta tags are being populated correctly which you can see here

http://http://adrenalinefilms.ca/Mountain-Biking-DVD/

 

but doesn't work for individual products (defaults are populated instead):

http://http://adrenalinefilms.ca/Back-in-the-Saddle/

 

It works OK with the old style URL's:

http://adrenalinefilms.ca/product_info.php/products_id/100

 

but not when you use the SE friendly URL's like so:

http://adrenalinefilms.ca/Science-of-Triat...Lecture-Series/

 

 

Please let me know if there is a way of making your contribution work with the header tag controller, if it can't be done I will have to go with CHEMO's Ultimate SEO contribution.

 

thanks!

Link to comment
Share on other sites

Hi BlueYon,

 

On your website it looks like you have your SE friendly URL's contribution running as well as the Header Tag Controller.

 

I installed both and I'm experiencing same problem as reported in this thread by other users.

 

The category meta tags are being populated correctly which you can see here

http://http://adrenalinefilms.ca/Mountain-Biking-DVD/

 

but doesn't work for individual products (defaults are populated instead):

http://http://adrenalinefilms.ca/Back-in-the-Saddle/

 

It works OK with the old style URL's:

http://adrenalinefilms.ca/product_info.php/products_id/100

 

but not when you use the SE friendly URL's like so:

http://adrenalinefilms.ca/Science-of-Triat...Lecture-Series/

Please let me know if there is a way of making your contribution work with the header tag controller, if it can't be done I will have to go with CHEMO's Ultimate SEO contribution.

 

thanks!

 

Try messing about with your includes/configuration.php

 

Might be setup wrong in there!

Link to comment
Share on other sites

Hi BlueYon,

 

On your website it looks like you have your SE friendly URL's contribution running as well as the Header Tag Controller.

 

I installed both and I'm experiencing same problem as reported in this thread by other users.

 

The category meta tags are being populated correctly which you can see here

http://http://adrenalinefilms.ca/Mountain-Biking-DVD/

 

but doesn't work for individual products (defaults are populated instead):

http://http://adrenalinefilms.ca/Back-in-the-Saddle/

 

It works OK with the old style URL's:

http://adrenalinefilms.ca/product_info.php/products_id/100

 

but not when you use the SE friendly URL's like so:

http://adrenalinefilms.ca/Science-of-Triat...Lecture-Series/

Please let me know if there is a way of making your contribution work with the header tag controller, if it can't be done I will have to go with CHEMO's Ultimate SEO contribution.

 

thanks!

 

The reason and fix is quite simple...

 

The why.....

 

When you use this SE friendly URL's contrib, you are no longer using product_info.php to show the products, instead the products are shown from the index.php file.

 

 

The fix....

 

Change the header tags controllers meta selection functions to take into the equation the that the product now is shown from index.php ( And not from product_info.php as is the standard )

Edited by toyicebear
Link to comment
Share on other sites

Hi, Sorry at the monet I'm getting ready to move back to the UK. I will help as much as I can, but time is a bit tight at the moment.

 

Which issue are you talking about?

One More Bug

Using manufacturer drop down(it is not appending session id)

http://test.itchi-tech.co.uk/catalog/?manufacturers_id=9

I think we should get

http://test.itchi-tech.co.uk/catalog/Hewlett-Packard/

Can You Help ?

Link to comment
Share on other sites

One More Bug

Using manufacturer drop down(it is not appending session id)

http://test.itchi-tech.co.uk/catalog/?manufacturers_id=9

I think we should get

http://test.itchi-tech.co.uk/catalog/Hewlett-Packard/

Can You Help ?

 

Done! You can download in the contribution section.

Link to comment
Share on other sites

I am impressed by your patience and perseverance BlueYon, you shure do offer support and dedication to your contribution... :thumbsup:

Link to comment
Share on other sites

I am impressed by your patience and perseverance BlueYon, you shure do offer support and dedication to your contribution... :thumbsup:

 

Thanks!

 

It's hard with this contribtuion, because its doing somthing oscommerce was not designed for.

 

There are certain requirments to get this to work, which I should have included in the instructions.

 

Need Linux, latest PHP, apache and mod rewrite enabled.

 

Also can not have the same name for any of the categories, products or manufacturers.

Link to comment
Share on other sites

Great contrib! I love the way it looks on my site. I was getting some very fluky results due to multiple sub-cats with the same name but I just got more specific with them and its working fine now. Course all the items for testing I named test aren't working anymore but those will be deleted soon anyways.

Link to comment
Share on other sites

Try deleting your manufacturers cache

 

Also check my test site again.

Thanks a lot.It is working great

But the selected manufacturer is not visible in drop down.

For Example if I select Fox the url is www.myserver.com/fox/ which is correct

where as the drop down shows Please Select instead of Fox as Selected one

 

One more help.How to add manufacturer_id to the url

say

www.myserver.com/MicroSoft/2/ ?

 

And Need help to convert ?info_id=3 also

Thanks in advance

Link to comment
Share on other sites

Okai BlueYon

I did added Manufacturer_id to url,so you can forgot that part

Where as I am struck with drop down

The selected manufacturer is not visible in drop down.

For Example if I select Fox the url is www.myserver.com/fox/ which is correct

where as the drop down shows Please Select instead of Fox as Selected one

 

And Need help to convert ?info_id=3 also

Thanks in advance

Link to comment
Share on other sites

Thanks a lot.It is working great

One more help.How to add manufacturer_id to the url

say

www.myserver.com/MicroSoft/2/ ?

 

And Need help to convert ?info_id=3 also

Thanks in advance

 

You mean if you wanted more than one manufacturers with the same name?

 

It would be somthing like:

 

transform_url

          case 'manufacturers_id':
           $i++;

           $manufacturer_query = tep_db_query("select distinct manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $url_array[$i] . "'");
           $manufacturer_name = tep_db_fetch_array($manufacturer_query);
           $url_parts['path'] .= '/' . $this->prepare_url($manufacturer_name['manufacturers_name']) . '/' . $url_array[$i];
           break;

 

I can't think at the moment how to read the manufacturers_id until the script has already found the manufacturers name and identified it is an manufacturers_id.

Link to comment
Share on other sites

You mean if you wanted more than one manufacturers with the same name?

 

It would be somthing like:

 

transform_url

          case 'manufacturers_id':
           $i++;

           $manufacturer_query = tep_db_query("select distinct manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $url_array[$i] . "'");
           $manufacturer_name = tep_db_fetch_array($manufacturer_query);
           $url_parts['path'] .= '/' . $this->prepare_url($manufacturer_name['manufacturers_name']) . '/' . $url_array[$i];
           break;

 

I can't think at the moment how to read the manufacturers_id until the script has already found the manufacturers name and identified it is an manufacturers_id.

 

Thanks for the fast reply.

Manufacturer_id is part of the manufacturer query.so that part I have done.

Well the selected Manufacturer is not highlighted in the drop down.(even at your test site).

So Need your help in that and for converting www.myserver.com/information.php?info_id=4

to

www.myserver.com/Shipping/

 

Thanks for your time even while preparing to go to UK

Thanks a lot

Link to comment
Share on other sites

Thanks for the fast reply.

Manufacturer_id is part of the manufacturer query.so that part I have done.

Well the selected Manufacturer is not highlighted in the drop down.(even at your test site).

So Need your help in that and for converting www.myserver.com/information.php?info_id=4

to?

www.myserver.com/Shipping/

 

Thanks for your time even while preparing to go to UK

Thanks a lot

 

Sorry I still don't get you. OSC does not have a information.php page.

 

Is this the unlimited information pages contribution?

 

If so you would have to set them

 

 ? ?
case 'info_id':
$i++;

 

Also please remeber this contribution only works using index.php.

Edited by BlueYon
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...