snafy Posted July 21, 2015 Share Posted July 21, 2015 hi allI can not use Arabic letters on mod_rewrite can i changehttp://localhost/6/test-category/.html to localhost/6/category-id-1/Product-id-1.html Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 There should be an old Github issue (possibly carried over from an old tech support report) that discussed the need to use rawurlencode( 'the mb_string' ) these SEO phrases before sending them out as links.In the meantime, you will need to override the automatic generation of SEO paths by entering a phrase in the Edit Product, Search Engines tab, Custom SEO URL path text field that will conform to the valid characters used in the world of web addresses. Quote Link to comment Share on other sites More sharing options...
snafy Posted July 22, 2015 Author Share Posted July 22, 2015 can i do automatic generation like that localhost/6/category-id-1/Product-id-1.html RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 There will need to be an edit to the code, but, yes, it is possible.Are you willing to edit the code? Quote Link to comment Share on other sites More sharing options...
snafy Posted July 22, 2015 Author Share Posted July 22, 2015 Yes I am on standby Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 Realize you may also run into the same problem with arabic-named categories, please try this edit. In the file /classes/seo.class.php:Near line 306, find: $path = empty($cat_directory) ? $prods[0]['name'] : $cat_directory.'/'.$prods[0]['name']; Change to: $path = empty($cat_directory) ? 'prod_'.$prods[0]['product_id'] : $cat_directory.'/prod_'.$prods[0]['product_id']; This should affect all new items added to the inventory, and any other item where you blank the Custom SEO URL field.There is also in admin, Maintenance, Rebuild tab, a "Clear all auto-generated SEO URLs" function. Quote Link to comment Share on other sites More sharing options...
snafy Posted July 22, 2015 Author Share Posted July 22, 2015 this only for product ? Thank it work well very much Quote Link to comment Share on other sites More sharing options...
snafy Posted July 22, 2015 Author Share Posted July 22, 2015 can i do that with Categories ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 22, 2015 Share Posted July 22, 2015 You can try this (I haven't tried it). In /classes/seo.class.php:Near line 393, find: $this->_cat_path[] = $category['cat_name']; Change to: $this->_cat_path[] = 'cat_'.$category['cat_id'];You may need to find and delete this file: /cache/abcde.seo.category.list.xxwhere abcde is a random prefix specific to your store, and xx is the language code. Quote Link to comment Share on other sites More sharing options...
snafy Posted July 22, 2015 Author Share Posted July 22, 2015 Thank it work well very much Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 23, 2015 Share Posted July 23, 2015 Reported as github issue https://github.com/cubecart/v6/issues/697 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.