Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

Did you get a solution to this ..I have exact same problem and cant find the much refered to solution !!!!

Yes, it has been mentioned many times. Just read back through the thread or use google to search for it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Dear Jack_mcs, The contribution is working fine, but i had 2.1 installed before and then i got lovely links like a-product-in-this-store-p-1245.html now i get aproductinthisstore-p-1245.html (upgraded to 2.2.9) And all the links in my shop get 301 redirected. so the url is seo, but all links on my front page or in my catagories stay "product_info.php?products_id=11724"

That is usually caused by links being coded with html style links instead of oscommerce style links.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Ok, And what can i do about that? is there a simple way to fix these problems?

It's in your code, which is not something that can easily be supported here, so you will need to go through it to find the problem, or find someone to do that for you if you can't.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi again tried the clear cahe - uninstall seo - reload ...nothing cahnged at all ...any other suggestions ??

You have to make a code change. Here's a google search, as suggested.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

very good contrib mr. bobby, a bit hard to understand, hope to finish soon to read the class... in the meanwhile

 

installed ver. v22d_9, using stock .htaccess all was ok

 

just swapped in seo.class.php lines 1827-8 strtolower<->mb_convert_case for poor hosting reasons,

lowered Filter Short Words to 1, and added /=>- as a special character conversions because I had to deal with titles

full of "195/55" or "135/45/R13",...

 

but i noticed an issue affecting the product notifications code in checkout_success.php

so from a debugging session in zend studio:

 

the parameters are prepared correctly in checkout_success (action and notify) an they worked right before the SEO URL implementation

 

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
   $notify_string = '';

   if (isset($HTTP_POST_VARS['notify']) && !empty($HTTP_POST_VARS['notify'])) {
     $notify = $HTTP_POST_VARS['notify'];

     if (!is_array($notify)) {
       $notify = array($notify);
     }

     for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
       if (is_numeric($notify[$i])) {
         $notify_string .= 'notify[]=' . $notify[$i] . '&';
       }
     }

     if (!empty($notify_string)) {
       $notify_string = 'action=notify&' . substr($notify_string, 0, -1);
     }
   }

   tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
 }

 

and they are ready to be redirected to index.php where they should be eated by application_top.php (see: case 'notify')

but the browser display the link: index.php?notify[]=17283&action=notify

 

obviously the action variable is not read in this way...no action is performed!

 

I checked a couple of time in seo.class.php and it seems to be related to some & string replacing on lines

696 and 2822 ... or maybe is needed another rewrite of index.php in .htaccess regarding the notify array passed?

 

without knowing all the logic behind mod_rewrite & your class I prefer not to invoke the old tep_href_link function

only from checkout_success.php because it doesn't seem such an elegant solution.

 

Any suggestion, a bug or me?

 

thank in advance

c u

David

eBay certified API developer - Google Adwords API developer - OSC developer - SEO consultant - Italian, Rome based

Link to comment
Share on other sites

just swapped in seo.class.php lines 1827-8 strtolower<->mb_convert_case for poor hosting reasons,

lowered Filter Short Words to 1, and added /=>- as a special character conversions because I had to deal with titles

full of "195/55" or "135/45/R13",...

 

but i noticed an issue affecting the product notifications code in checkout_success.php

so from a debugging session in zend studio:

 

the parameters are prepared correctly in checkout_success (action and notify) an they worked right before the SEO URL implementation

 

 

and they are ready to be redirected to index.php where they should be eated by application_top.php (see: case 'notify')

but the browser display the link: index.php?notify[]=17283&action=notify

 

obviously the action variable is not read in this way...no action is performed!

 

I checked a couple of time in seo.class.php and it seems to be related to some & string replacing on lines

696 and 2822 ... or maybe is needed another rewrite of index.php in .htaccess regarding the notify array passed?

I don't see the problem when I try it here. The index page loads with the correct url. You could try altering the code in checkout_success from

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

to

       tep_redirect(tep_href_link(FILENAME_DEFAULT, htmlspecialchars_decode($notify_string)));

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I don't see the problem when I try it here. The index page loads with the correct url. You could try altering the code in checkout_success from

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

to

       tep_redirect(tep_href_link(FILENAME_DEFAULT, htmlspecialchars_decode($notify_string)));

 

hi Bobby,

 

sorry it doesn't work! The double ampersand (http://.../index.php?notify[]=17283&action=notify) is applied somewhere in SEO class! instead forcing checkout_success.php to invoke old tep_href_link (no SEO) works great!

 

right now I noticed this problem seems to be related to application_top.php logic in index.php page

 

another example is when I made a text search, advanced_search_result.php show me products, I add to cart one of them,

then advanced_search_result.php show again (because i don't have the "display cart after purchase" turned on) and the resulting

url in browser is: http://.../advanced_search_result.php?keywords=test&sort=5a so "sort" variable is not considered anymore

(as the "action" variable in the index.php page mentioned before) because the string "&" is injected...

 

 

this is my application_top.php logic for reference maybe it's different in my osc, thank you bye

 

// Shopping cart actions
 if (isset($HTTP_GET_VARS['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
   if ($session_started == false) {
     tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
   }

   if (DISPLAY_CART == 'true') {
     $goto =  FILENAME_SHOPPING_CART;
     $parameters = array('action', 'cPath', 'products_id', 'pid');
   } else {
     $goto = basename($PHP_SELF);
     if ($HTTP_GET_VARS['action'] == 'buy_now') {
       $parameters = array('action', 'pid', 'products_id');
     } else {
       $parameters = array('action', 'pid');
     }
   }
   switch ($HTTP_GET_VARS['action']) {
     // customer wants to update the product quantity in their shopping cart
     case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {
                               if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {
                                 $cart->remove($HTTP_POST_VARS['products_id'][$i]);
                               } else {
                                 if (PHP_VERSION < 4) {
                                   // if PHP3, make correction for lack of multidimensional array.
                                   reset($HTTP_POST_VARS);
                                   while (list($key, $value) = each($HTTP_POST_VARS)) {
                                     if (is_array($value)) {
                                       while (list($key2, $value2) = each($value)) {
                                         if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
                                           $id2[$var[1]][$var[2]] = $value2;
                                         }
                                       }
                                     }
                                   }
                                   $attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';
                                 } else {
                                   $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
                                 }
                                 $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
     // customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$HTTP_POST_VARS['quantity'], $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

  // START Remove Product From Cart Button In Shopping Cart 					  
  case 'remove_product' : if (isset($HTTP_GET_VARS['products_id']) && is_numeric($HTTP_GET_VARS['products_id'])) {
                               $cart->remove($HTTP_GET_VARS['products_id']);
                               tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
                             }
                             break;
  // END Remove Product From Cart Button In Shopping Cart 	

     // performed by the 'buy now' button in product listings and review page
     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'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
     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'))));
                               }
                               if (!is_array($notify)) $notify = array($notify);
                               for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
                                 $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
                                 $check = tep_db_fetch_array($check_query);
                                 if ($check['count'] < 1) {
                                   tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
                                 }
                               }
                               tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'notify_remove' :  if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {
                               $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               $check = tep_db_fetch_array($check_query);
                               if ($check['count'] > 0) {
                                 tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               }
                               tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
   }
 }

eBay certified API developer - Google Adwords API developer - OSC developer - SEO consultant - Italian, Rome based

Link to comment
Share on other sites

sorry it doesn't work! The double ampersand (http://.../index.php?notify[]=17283&action=notify) is applied somewhere in SEO class! instead forcing checkout_success.php to invoke old tep_href_link (no SEO) works great!

No, the class doeesn't add that. It is added in checkout_success and removed in application_top.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, the class doeesn't add that. It is added in checkout_success and removed in application_top.

 

ok bobby but this doesn't explain why it doesn't happen when the old tep_href_link is invoked

instead of your ...

 

Eg.

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

--> [sEO] this redirect is wrong and lead to http://.../index.php?notify[]=17283&action=notify

 

tep_redirect(tep_href_link_bak(FILENAME_DEFAULT, $notify_string));

--> [NO SEO] this redirect is right and lead to http://.../index.php?notify[]=17283&action=notify

 

so the problem seems to be related to tep_href_link function? this is mine, maybe it's different from the one you used during developing:

thank you again for your patience, bye David

 

////
// The HTML href link wrapper function

 function tep_href_link_bak($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

   if (!tep_not_null($page)) {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
   }

   if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }
   } else {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
   }

   if (tep_not_null($parameters)) {
     $link .= $page . '?' . tep_output_string($parameters);
     $separator = '&';
   } else {
     $link .= $page;
     $separator = '?';
   }

   while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
   if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
     if (tep_not_null($SID)) {
       $_sid = $SID;
     } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
       if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
         $_sid = tep_session_name() . '=' . tep_session_id();
       }
     }
   }

   if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
     while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

     $link = str_replace('?', '/', $link);
     $link = str_replace('&', '/', $link);
     $link = str_replace('=', '/', $link);

     $separator = '?';
   }

   if (isset($_sid)) {
     $link .= $separator . tep_output_string($_sid);
   }
// rimuove le pagine duplicate
$link = ereg_replace('cPath=[0-9]+&products_id','products_id',$link);
$link = ereg_replace('manufacturers_id=[0-9]+&products_id','products_id',$link);
// fine filtro antiduplicazione ;)

return $link;
 }

eBay certified API developer - Google Adwords API developer - OSC developer - SEO consultant - Italian, Rome based

Link to comment
Share on other sites

so the problem seems to be related to tep_href_link function? this is mine, maybe it's different from the one you used during developing:

You need to re-read the instructions. That function should have been completely replaced.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You need to re-read the instructions. That function should have been completely replaced.

 

yes Bobby your contrib works great and I know the tep_href_link function changed but the "&"

in the url after a redirect show up only when I use your function

and not the old tep_href_link, i used the old to isolate the problem during debug and:

---------------------

TEST 1 - SEO

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

 

seo tep_href_link in conjuction with tep_redirect is wrong and lead to eg. http://.../index.php?notify[]=17283&action=notify

---------------------

 

---------------------

TEST 2 - NON SEO (original)

tep_redirect(tep_href_link_bak(FILENAME_DEFAULT, $notify_string));

 

original tep_href_link in conjuction with tep_redirect is ok and lead to eg. http://.../index.php?notify[]=17283&action=notify

---------------------

 

from my point of view this seems to happen in the redirects sent to the logic in application_top.php but i repeat: USING OLD tep_href_link this

ampersand issue doesn't show up

eBay certified API developer - Google Adwords API developer - OSC developer - SEO consultant - Italian, Rome based

Link to comment
Share on other sites

from my point of view this seems to happen in the redirects sent to the logic in application_top.php but i repeat: USING OLD tep_href_link this

ampersand issue doesn't show up

You may be correct. The problem might be in the class file but, as mentioned, it works fine here. If I can't cause the failure, I can't fix it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You may be correct. The problem might be in the class file but, as mentioned, it works fine here. If I can't cause the failure, I can't fix it.

 

uhmmm well, I spent a lot of time debugging 2-2.2d-9 and discovered that a long time ago this bug was discussed a couple of time in 2.2 version and over (eg. 2.6 uhmmm a fork of this project?)

 

if you check in contribution history they are called "Redirects shouldn't have &'s in them" and "&'s fix for v2.6"

 

Anyway the piece of code causing the url redirect issue for me

(eg. index.php?notify[]=17283&action=notify or category_name-c-1.html?page=5&filter_id=18&sort=5a)

is the htmlspecialchars in the function href_link below

 

switch($this->attributes['SEO_URLS_USE_W3C_VALID']){
                       case ('true'):
                               if (!isset($_SESSION['customer_id']) && defined('ENABLE_PAGE_CACHE') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')){
                                       return $link;
                               } else {
                                   //    return mb_convert_encoding($link, 'UTF-8', mb_detect_encoding($link));        
                                         return htmlspecialchars(utf8_encode($link));
                               }
                               break;
                       case ('false'):
                               return $link;
                               break;
               }

 

I noticed this piece of code is invoked only with the W3C_VALID option enable so

disabling it in my site the "&" solved the problem. Maybe your develop box got it turned off ?

 

Now the question is, what are advantages / disadvantages of this W3C_VALID option ??? disabling this option will cause compatibility problem within this contribution?

 

David :thumbsup:

eBay certified API developer - Google Adwords API developer - OSC developer - SEO consultant - Italian, Rome based

Link to comment
Share on other sites

Hi,

 

i have a problem with Ultimate SEO URLs v2.2d

 

on redirect on bad url like pdales-tremolo-c-166_87_142_293.html (i havent set the special character but now its done) i get pedales-tremolo-c-293.html in place of pedales-tremolo-c-166_87_142_293.html

 

is there a solution please ? because i get some duplicate content :(

 

Thanks

Link to comment
Share on other sites

Hi,

 

i have a problem with Ultimate SEO URLs v2.2d

 

on redirect on bad url like pdales-tremolo-c-166_87_142_293.html (i havent set the special character but now its done) i get pedales-tremolo-c-293.html in place of pedales-tremolo-c-166_87_142_293.html

 

is there a solution please ? because i get some duplicate content :(

 

Thanks

 

from my point of view start disabling parent directory options for debugging purpose...

eBay certified API developer - Google Adwords API developer - OSC developer - SEO consultant - Italian, Rome based

Link to comment
Share on other sites

on redirect on bad url like pdales-tremolo-c-166_87_142_293.html (i havent set the special character but now its done) i get pedales-tremolo-c-293.html in place of pedales-tremolo-c-166_87_142_293.html

 

is there a solution please ? because i get some duplicate content :(

Are you saying it only happens if you have special characters?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Add cPath to product URLs? false

Add category parent to product URLs? false

Add category parent to begining of URLs? false

 

parent directory is already disabled …

 

When i have make update i havent seen that specials caracteres list have been delete 2 days after i have retype it but too late google have already crawl my site no i get duplicate content with exemple show before and is redirected to a bad page because the cpath is not rewrite correctly on this old url, parent category id are delete wich make other probleme with my menu too …

 

 

 

Sorry for my english …

Edited by goofy03
Link to comment
Share on other sites

it's seem not to be related to special char :

 

/pack-guitare-pack-basse-c-166_1_400_195.html -> pack-basse-c-195.html not pack-basse-c-166_1_400_195.html (the real one) :(

 

Why i have updated this module ... :)

Edited by goofy03
Link to comment
Share on other sites

it's seem not to be related to special char :

 

/pack-guitare-pack-basse-c-166_1_400_195.html -> pack-basse-c-195.html not pack-basse-c-166_1_400_195.html (the real one) :(

 

Why i have updated this module ... :)

If you click on the category and then the sub-categories, is the url correct? Does the problem only happen for links you have elsewhere on the site?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

If you click on the category and then the sub-categories, is the url correct? Does the problem only happen for links you have elsewhere on the site?

 

yes if u normally browse the site all is ok. it's just old url wich are on other site or in google that not redirect properly on 301 error

Edited by goofy03
Link to comment
Share on other sites

yes if u normally browse the site all is ok. it's just old url wich are on other site or in google that not redirect properly on 301 error

Then it probably isn't anything to worry about. You can check the link (there are sites around) to be sure it is returning a 301 to be sure though.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Then it probably isn't anything to worry about. You can check the link (there are sites around) to be sure it is returning a 301 to be sure though.

 

no it redirect to a wrong address that's my problem … and this wrong adrress don't have parent category id that make my menu display wrong i lost sell when client come to this address … i gona debug this myself

Link to comment
Share on other sites

Ok i resolve my problem :

 

 

 if ($this->attributes['SEO_ADD_CAT_PARENT'] != 'true') {
                                         if (strpos($cID, "_") !== FALSE) { //test for sub-category
                                           $parts = explode("_", $cID);
                                           $cID2 = $parts[count($parts) - 1];
                                         }
                                         $cID = $this->get_full_cPath($cID, $single_cID);
                                         if ($this->attributes['USE_SEO_PERFORMANCE_CHECK'] == 'true') $this->performance['NUMBER_QUERIES']++;
                                         $sqlCmd = $this->attributes['USE_SEO_HEADER_TAGS'] == 'true' ? 'LOWER(categories_htc_title_tag) as cName' : 'LOWER(categories_name) as cName';
                                         $sql = "SELECT " . $sqlCmd . "
                                             FROM ".TABLE_CATEGORIES_DESCRIPTION."
                                             WHERE categories_id='".(int)$cID2."'
                                             AND language_id='".(int)$this->languages_id."'
                                             LIMIT 1";
                                         $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
                                         $cName = $result['cName'];
                                     }

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