Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs v2.0


Guest

Recommended Posts

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Chemo,

 

This is a great setup. One problem that I have found is that I am left with

 

html?osCsid=f655b88cbd801f91e1a133adc2e744e2

 

Not sure what I did wrong, but if you could let me know of a fix, that would be great.

 

The store is at http://www.discount-computer.ca/store

 

PS: I have been getting this error as well upon clicking the review button:

 

Fatal error: Call to undefined function: tep_get_prid() in store/includes/seo_redirect.php on line 105

Link to comment
Share on other sites

Chemo,

 

This is a great setup. One problem that I have found is that I am left with

 

html?osCsid=f655b88cbd801f91e1a133adc2e744e2

 

Not sure what I did wrong, but if you could let me know of a fix, that would be great.

 

The store is at http://www.discount-computer.ca/store

You need to adjust your configure.php settings. Specifically, the ones related to the cookie domains. Please search this thread since it has been discussed at length...

 

PS: I have been getting this error as well upon clicking the review button:

 

Fatal error: Call to undefined function: tep_get_prid() in store/includes/seo_redirect.php on line 105

The error you are getting is a call to a core function of osC-MS2: tep_get_prid(). This function returns the product_id from parameter that has attributes. Most often this is seen with URLs going to or from the shopping _cart. I'll look into it but it's somehow not including the function. Check your includes/functions/general.php file for the function and also verify the placement of the SEO (include seo_redirect.php ) code in application_top.php. It must be BELOW the call to include the general.php lib. In other words, the general.php file must be included in application_top BEFORE the SEO code.

 

Bobby

Link to comment
Share on other sites

Hello,

 

I'm in trouble. I have 2 things that don't work.

 

First is the category links :

The website give me this :

http://medimpex.com.mx/antibioticos-c-28.h...ry/Antibioticos

 

And i just need this :

http://medimpex.com.mx/antibioticos-c-28.html/

 

I see the sourcecode of the generated html file and i find that :

<td class="boxText"><a href="http://medimpex.com.mx/analgesicos-c-31.html"><b><nobr><a nowrap href="http://medimpex.com.mx/analgesicos-c-31.html/category/Analgesicos">Analgesicos</b></a> (1)<br>

 

I don't understand what is this second link <nowrap>

 

The second things is the manufacturers rewriting that simply don't change from index.php?manufacturer_id ... to the good rewriting URL

 

For the products it works well, great contribution.

 

Anyone see a solution for my problems ? thanks.

Link to comment
Share on other sites

If you have osc version 2.2-MS1 and are having problems installing this contrib. then just follow these directions. A few minor changes need to be made to get it working.

 

/includes/application_top.php

***************************

after the line:

require(DIR_WS_LANGUAGES . $language . '.php');

 

paste the following:

# include the cache class
include('includes/classes/cache.class.php');
$cache = new cache($languages_id);
 
// define our general functions used application-wide
 require(DIR_WS_FUNCTIONS . 'general.php');
 require(DIR_WS_FUNCTIONS . 'html_output.php');

# include the Ultimate SEO URLs cache file
include('includes/seo_cache.php');
# Get the cache - no parameters will get all GLOBAL cache entries for this language
$cache->get_cache('GLOBAL');

 

The order of included/required files is important b/c the cache class must be called before general.php and html_output.php, and general.php must be called before seo_cache.php

 

 

/includes/functions/html_output.php

********************************

copy-n-paste the new tep_href_link() function as per the instructions in the install.html fle but then make the following changes:

 

find the following lines:

if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     $seo_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
  $seo_rewrite_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
       $seo_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
       $seo_rewrite_link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
       $seo_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
       $seo_rewrite_link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }

 

and replace with these lines:

if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_CATALOG;
     $seo_link = HTTP_SERVER . DIR_WS_CATALOG;
  $seo_rewrite_link = HTTP_SERVER . DIR_WS_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_CATALOG;
       $seo_link = HTTPS_SERVER . DIR_WS_CATALOG;
       $seo_rewrite_link = HTTPS_SERVER . DIR_WS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_CATALOG;
       $seo_link = HTTP_SERVER . DIR_WS_CATALOG;
       $seo_rewrite_link = HTTP_SERVER . DIR_WS_CATALOG;
     }

 

osc 2.2 MS1 does not use DIR_WS_HTTP_CATALOG or DIR_WS_HTTPS_CATALOG

The code above fixes this issue

 

 

includes/functions/general.php

*****************************

add the following function to this file:

function tep_output_string($string, $translate = false, $protected = false) {
   if ($protected == true) {
     return htmlspecialchars($string);
   } else {
     if ($translate == false) {
       return tep_parse_input_field_data($string, array('"' => '"'));
     } else {
       return tep_parse_input_field_data($string, $translate);
     }
   }
 }

 

The changes noted above worked for me...

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

Link to comment
Share on other sites

First up - awesome contribution and great instructions! It worked perfectly first time on my regular store (www.session1.com) . I also have a second store with a copy of the php running on a different server (www.lushatb.com) but using the same mySQL database.

 

I get this error/warning on the second store ... is it something to do with the server being different?

 

"Warning: gzinflate: buffer error in /includes/classes/cache.class.php on line 152"

 

thanks!

 

chris

Link to comment
Share on other sites

I installed this on two different stores on two different servers. One server everything works great! On the other, I am receiving an internal server error only when accessing a secure link when the .htaccess file is on the server. If I delete the .htaccess file everything is ok (but I have to use cname).

 

The file contained

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

Is this something I can fix? Where should I look?

Millie

Link to comment
Share on other sites

I'm having the same problem on two stores I just added this to . I am using a shared server for booth of the sites. Everything works fine except for when I go to check out. I am using a shared ssl I'm guessing I have to add something to the .htaccess file I just do not know what. Any Ideas?

 

 

I installed this on two different stores on two different servers. One server everything works great!  On  the other, I am receiving an internal server error only when accessing a secure link when the .htaccess file is on the server.  If I delete the .htaccess file everything is ok (but I have to use cname).

 

The file contained

Is this something I can fix? Where should I look?

Millie

Link to comment
Share on other sites

I'm having the same problem on two stores I just added this to . I am using a shared server for booth of the sites. Everything works fine except for when I go to check out. I am using a shared ssl I'm guessing I have to add something to the .htaccess file I just do not know what.  Any Ideas?

 

what is the server info? DO you have mod_rewrite???

 

YOu will need this to use rewrite.

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

I was about to instal this for two sites but I got to step two which said

 

"Find the SEO URLs code in application_top. Here is a small snippet: ..."

 

and mu application_top does not have that.

 

So tell me is there a contribution you are supposed to instal before you instal this one?

Link to comment
Share on other sites

I also have the error

 

Parse error: parse error, unexpected T_CASE in /home/www/public_html/zone/includes/application_top.php on line 395

 

 case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                              if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
                              } else {
                                $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+(int)$HTTP_POST_VARS['buyqty']);}
                              }
                            }
       if ( (defined('SEO_URLS') && SEO_URLS == 'true') && (defined('SEO_URLS_TYPE') && SEO_URLS_TYPE == 'Rewrite') ){
        $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
      $cPath_array = tep_parse_category_path($cPath);
      $cPath = implode('_', $cPath_array);
      tep_redirect(tep_href_link($goto, 'cPath=' . $cPath . '&' . tep_get_all_get_params($parameters)));
       } else {
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
       }
                            break;

line 395>>     case 'notify' :         if (tep_session_is_registered('customer_id')) {
                               if (isset($HTTP_GET_VARS['products_id'])) {
                                 $notify = $HTTP_GET_VARS['products_id'];
                               } elseif (isset($HTTP_GET_VARS['notify'])) {
                                 $notify = $HTTP_GET_VARS['notify'];
                               } elseif (isset($HTTP_POST_VARS['notify'])) {
                                 $notify = $HTTP_POST_VARS['notify'];
                               } else {
                                 tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

 

I also have the following error in admin

 

Warning: call_user_func(tep_reset_cache_data_seo_urls): First argument is expected to be a valid callback in /home/herbal3/public_html/zone/admin/includes/functions/general.php on line 1214

 

I think maybe too many hours have been spent staring at code today.

 

Any help on what I have messed up would be greatly appreciated as I would really like to get this running.

Link to comment
Share on other sites

  • 3 years later...

I have this package installed for 5 months now. looks like my google ranking is going down instead of up. so I checked with google webmaster, it turned out google crawl reported 202 pages of NOT FOUND!! A regular page you click into from the navigation side bar will be

"http://www.slingcarrier.com/baby-sling-hybrid-waverly-p-148.html"

 

but the googlebot will crawl to this page

"http://www.slingcarrier.com/baby-sling-hybrid-waverly-p-148?osCsid.html"

 

these are not the links I supply to google webmaster in sitemap file.

 

how did that happen? what do I do to get rid of "?osCsid" part that confuses googlebot?

 

please help

Edited by rabbit0860

slingcarrier dot com

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...