Guest Posted January 13, 2005 Share Posted January 13, 2005 i think it's fixed in the last release.... <{POST_SNAPBACK}> Well...it was 1.1 that I tried and it didn't seem very fixed to me ;) Quote Link to comment Share on other sites More sharing options...
RikP Posted January 13, 2005 Share Posted January 13, 2005 make sure you replace the url_rewrite.php... you must have the one with the following line in the transform_uri() function: $uriparts = parse_url($param); i think that line was the bug in the 1.0 version Quote Link to comment Share on other sites More sharing options...
MLHmptn Posted January 14, 2005 Share Posted January 14, 2005 I originally thought this contribution worked flawlessly until I realized that nothing gets added to my shopping cart when anyone clicks the ADD TO CART buttons. I just get /action/buy_now/ at the end of my URL's. I don't know if its just my site or what but if the customer can't add anything to their cart this contrib won't work out ;( Anybody else having this problem or is just my sites? Any feedback would be greatly appreciated! MLHmptn Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 14, 2005 Author Share Posted January 14, 2005 I originally thought this contribution worked flawlessly until I realized that nothing gets added to my shopping cart when anyone clicks the ADD TO CART buttons. I just get /action/buy_now/ at the end of my URL's. I don't know if its just my site or what but if the customer can't add anything to their cart this contrib won't work out ;( Anybody else having this problem or is just my sites? Any feedback would be greatly appreciated! MLHmptn <{POST_SNAPBACK}> sorting the prblems out now! Quote Link to comment Share on other sites More sharing options...
MLHmptn Posted January 14, 2005 Share Posted January 14, 2005 (edited) I figured it out BlueYon....It had to do with httpd.conf....I had to add the AcceptPathInfo directive to httpd.conf. I have to figure out how to address the bullet symbol though with its ISO 8859-1 character set value :( The strip array also works flawlessly now on my page with the following : $strip_array = array("","","`","","•",chr(174),chr(169),chr(33),chr(34),chr(35),chr(36),chr(37),chr(38),chr(39),chr(40),chr(41),chr(42),chr(43),chr(44),chr(47),chr(60),chr(91),chr(92),chr(93),chr(94),chr(95),chr(96),chr(123),chr(124),chr(125),chr(126),chr(146),chr(147),chr(148),chr(151),chr(153),chr(B7),chr(176) ); Thanks for your great contribution! Edited January 14, 2005 by MLHmptn Quote Link to comment Share on other sites More sharing options...
nickburrett Posted January 14, 2005 Share Posted January 14, 2005 I still can't get this to work properly, all the urls are rewritten to look like this: http://amazon.dj/shop/index.php/cPath/64?osCsid=81f65a2b3392a3d9e3a691ada76cc08c Any ideas? Quote Link to comment Share on other sites More sharing options...
RikP Posted January 14, 2005 Share Posted January 14, 2005 looks like your urls aren't rewritten. Did you ad the line in the html_output.php file? Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 14, 2005 Author Share Posted January 14, 2005 looks like your urls aren't rewritten. Did you ad the line in the html_output.php file? <{POST_SNAPBACK}> Ok added the update! please bug test it for me! Still has a small problem with the click continue button! Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2005 Share Posted January 14, 2005 Ok added the update! please bug test it for me!Still has a small problem with the click continue button! <{POST_SNAPBACK}> No joy - I still have ttp instead of the proper path. Cheers, BY M Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 14, 2005 Author Share Posted January 14, 2005 No joy - I still have ttp instead of the proper path. Cheers, BY M <{POST_SNAPBACK}> Whats ur website url? I had this problem before, but can't remeber whats causing it! Quote Link to comment Share on other sites More sharing options...
RikP Posted January 14, 2005 Share Posted January 14, 2005 Ok added the update! please bug test it for me!Still has a small problem with the click continue button! <{POST_SNAPBACK}> Ok tested it, and it works quite good... except it won't go further than 1 category. so it goes to /Hardware but not to /Hardware/Logical-Access, it will show the /Hardware page. It also still doesn't check if a product is in the right category. I have a product x in category y. so the link should be Y/X but when i enter /X or ABDC/X it all shows the product_info page. When i got time i will take a look and try to fix it ;) Quote Link to comment Share on other sites More sharing options...
RikP Posted January 14, 2005 Share Posted January 14, 2005 found another one i think... when you are on a product_info page and have an url there to have more information on the product it doesn't complete the url. it is http://www.bioxs.nl/shop/redirect.php without the arguments... Quote Link to comment Share on other sites More sharing options...
MaryAnn Posted January 14, 2005 Share Posted January 14, 2005 Everything seems to working great on my site with the new update. I haven't found any bugs on my site yet. I did have another contribution for sef but I really like this one so much better, now to change some similar names on products and that should do it. Thanks so much. Will let you know if I find any bugs. Mair :D Quote Link to comment Share on other sites More sharing options...
RikP Posted January 15, 2005 Share Posted January 15, 2005 Everything seems to working great on my site with the new update. I haven't found any bugs on my site yet. I did have another contribution for sef but I really like this one so much better, now to change some similar names on products and that should do it. Thanks so much. Will let you know if I find any bugs.Mair :D <{POST_SNAPBACK}> Do you have nested categories in your site? And are the links working when you add a url to your product? Quote Link to comment Share on other sites More sharing options...
MaryAnn Posted January 15, 2005 Share Posted January 15, 2005 (edited) Do you have nested categories in your site? And are the links working when you add a url to your product? <{POST_SNAPBACK}> No I don't have nested categories, but when I moved a couple of categories under a main category for subcategories, when clicking on the subcategory it would redirect to the main category so that part does not work for me. My links work on the product info pages. Links work on the product listing pages and the buy now links work on the new product pages. Manufacturers drop down still shows mysite.com/?manufacturers_id=17 mysite.com/?manufacturers_id=17 instead of mysite.com/manufacturersname/ So for the most part it is working pretty good for me. Mair Edited January 15, 2005 by MaryAnn Quote Link to comment Share on other sites More sharing options...
RikP Posted January 15, 2005 Share Posted January 15, 2005 ok i had some spare time and fixed some problems! The get_vars() function was getting all language categories and product_ids. So when a 2 languages had the same word for an category it would add them both to the cPath resulting in a cPath of 1_1 which should be just 1. So the $languages_id variable had to be added to the queries. In order to do this the include url_rewrite.php code must be beneath the language classes. so do this: in application_top.php find: // sef urls require(DIR_WS_CLASSES . 'url_rewrite.php'); $url_rewrite = new url_rewrite; $url = str_replace($PHP_SELF, '', getenv('REQUEST_URI')); $url = str_replace('?', '/', $url); $url = str_replace('=', '/', $url); $url = str_replace('&', '/', $url); $url = trim($url, '/'); if(!empty($url)) $url_array = explode('/', $url); if((trim($PHP_SELF, '/') == FILENAME_DEFAULT)and(sizeof($url_array) > 0)){ $vars_array = $url_rewrite->get_vars($url_array); for ($i=0, $n=sizeof($vars_array); $i<$n; $i++) { $HTTP_GET_VARS[$vars_array[$i]['key']] = $vars_array[$i]['value']; } } and move it beneath: require(DIR_WS_LANGUAGES . $language . '.php'); now in url_rewrite.php find: function get_vars($url_array){ and beneath it add: global $languages_id; find: $categories_query = tep_db_query("select categories_id, categories_name from " . TABLE_CATEGORIES_DESCRIPTION); and replace with: $categories_query = tep_db_query("select categories_id, categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " WHERE language_id = '" . $languages_id . "'"); as last find: $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION); and replace with: $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " WHERE language_id = '" . $languages_id . "'"); Now the nested categories work also :) Quote Link to comment Share on other sites More sharing options...
RikP Posted January 16, 2005 Share Posted January 16, 2005 also fixed the dropdown-list not showing the name!!! do following: in includes/boxes/manufactuers.php find: $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], replace with: $manufacturers_name_rewrite = $url_rewrite->strip($manufacturers['manufacturers_name']); $manufacturers_array[] = array('id' => $manufacturers_name_rewrite, find: $info_box_contents = array(); add above: if(isset($HTTP_GET_VARS['manufacturers_id'])){ $man_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'"); $man = tep_db_fetch_array($man_query); $man_rewrite = $url_rewrite->strip($man['manufacturers_name']); } find: 'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id()); replace with: 'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $man_rewrite : ''), 'onChange="location=document.manufacturers.manufacturers_id.options[document.manufacturers.manufacturers_id.selectedIndex].value;" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id()); and your done!! Quote Link to comment Share on other sites More sharing options...
RikP Posted January 16, 2005 Share Posted January 16, 2005 minor update on the above, if your shop isn't located in the root: find: $manufacturers_array[] = array('id' => $manufacturers_name_rewrite, replace with: $manufacturers_array[] = array('id' => DIR_WS_HTTP_CATALOG . $manufacturers_name_rewrite, now it works also when your shop isn't in the root! Quote Link to comment Share on other sites More sharing options...
RikP Posted January 16, 2005 Share Posted January 16, 2005 in adition to the post where i describe howto make the get_vars() function language specific. I've been thinking about it and i think it isn't good to do it, because when a search engine links to a other language than your browser language the page won't show. I will recode the get_vars() function so it will search for the variables (categories, product_id) in sql rather than get the full list, this way you won't get double categories and i think i will be able to get the variables such as language, action, currency also. Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 17, 2005 Author Share Posted January 17, 2005 I'm trying to get this contribution so you don't have to alter very little. You should not need to alter any manufaturer boxes for this to work. I'm still working on fiing the bugs but matching the lanuage ids is not good. You can just put a break command in so once its found it wont add anthor cpath. Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 17, 2005 Author Share Posted January 17, 2005 Just to let you know I'm updating again and this time it should be alot better! Quote Link to comment Share on other sites More sharing options...
RikP Posted January 17, 2005 Share Posted January 17, 2005 ok cool... i was thinking, maybe it's an idea to add an extra database fiels with the stripped name in the categories_description, manufacturers and products_description tables? This way the searching for the var's will be much faster.... also i think it's better to put that all in 1 while statement, because now you are searching the same vars 3 times. and you are putting all the vars in an array so when you have an uneven number of them the array isn't filled right.... i have made a update and will pm you the file if you like.... just to make my thoughts clear ;) Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 18, 2005 Author Share Posted January 18, 2005 ok cool... i was thinking, maybe it's an idea to add an extra database fiels with the stripped name in the categories_description, manufacturers and products_description tables? This way the searching for the var's will be much faster.... also i think it's better to put that all in 1 while statement, because now you are searching the same vars 3 times. and you are putting all the vars in an array so when you have an uneven number of them the array isn't filled right.... i have made a update and will pm you the file if you like.... just to make my thoughts clear ;) <{POST_SNAPBACK}> The striped database fields is a good idea! not sure what you mean about the uneven number of vars. Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted January 18, 2005 Author Share Posted January 18, 2005 Does anyone know a sql command to replace that works like the strip function. It would be better if we can compare the url directly with the database. Quote Link to comment Share on other sites More sharing options...
cornernote Posted January 18, 2005 Share Posted January 18, 2005 Hello, The download page has a module and then a load of updates. Can you just post one full version of the latest code? http://www.oscommerce.com/community/contri...ns,2796/page,32 Best regards, Brett 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.