cgchris99 0 Posted April 30, 2003 Yes, there is a way to do. Let me look something up. Share this post Link to post Share on other sites
cgchris99 0 Posted April 30, 2003 here's a new one $no_quotes_this_products_name = preg_replace("[x22]","",$no_underscore_this_products_name) put this under the $no_underscore blah blah Then change the one in the link. I think this will get you started. Let me know if it doesn't work Share this post Link to post Share on other sites
dreamscape 0 Posted April 30, 2003 I found converting names to something readable and usable in a link was something I wanted to place in many modules, so I created a function: //// // returns name of product encoded for spidering function tep_spider_name($name) { $name = str_replace(" ", "_", $name); $name = str_replace("'", "", $name); $name = str_replace(":", "", $name); $name = str_replace(".", "", $name); return $name; } then whereever you want the name converted you just do it like: tep_spider_name($this_products_name) where this_products_name is the products name for the module, ie $info_values['products_name']; $featured['products_name'}, etc... you get the idea The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Share this post Link to post Share on other sites
fyers 0 Posted May 1, 2003 cgchris99, what do i change in the link? do i change rawurlencode($no_underscore_this_products_name) to rawurlencode($no_quotes_this_products_name) *total guess* :? ________________________ FyersArt.com ________________________ Share this post Link to post Share on other sites
fyers 0 Posted May 1, 2003 dreamscape, where would i place that piece of code? would i create a new php file in the function directory? and with tep_spider_name($this_products_name) where exactly would i place that in a link? sorry i'm quite new to php code :oops: ________________________ FyersArt.com ________________________ Share this post Link to post Share on other sites
fyers 0 Posted May 1, 2003 oh, i've just noticed, if i click on any product from allprods.php, add to cart then click continue shopping, its comes up with item not found because the URL is http://www.fyersart.com/product_info.php/name////////... is anyone else aware of this problem? ________________________ FyersArt.com ________________________ Share this post Link to post Share on other sites
cgchris99 0 Posted May 1, 2003 I just loaded your page with allprods.php I click on a linked item and it works fine Share this post Link to post Share on other sites
fyers 0 Posted May 1, 2003 yes, you can click on an item but when you add it to cart, then click continue shopping this error comes up put this under the $no_underscore blah blah Then change the one in the link. can you tell me what i change in the link? ________________________ FyersArt.com ________________________ Share this post Link to post Share on other sites
cgchris99 0 Posted May 1, 2003 I just loaded your page with allprods.php I click on a linked item and it works fine Share this post Link to post Share on other sites
cgchris99 0 Posted May 1, 2003 Ok, I will check it tomorrow Share this post Link to post Share on other sites
fyers 0 Posted May 1, 2003 cheers, thanks for all your help :D ________________________ FyersArt.com ________________________ Share this post Link to post Share on other sites
JenRed 2 Posted May 1, 2003 oh, i've just noticed, if i click on any product from allprods.php, add to cart then click continue shopping, its comes up with item not found because the URL is http://www.fyersart.com/product_info.php/n.../name////////... is anyone else aware of this problem? I never thought of that. Does anyone know of a solution? Jen I haven't lost my mind - I have it backed up on disk somewhere. Share this post Link to post Share on other sites
DavidR 0 Posted May 11, 2003 Did anyone come up with a possible fix for this? David Share this post Link to post Share on other sites
jchasick 0 Posted May 11, 2003 i dont show the cart after items are added and i dont have that problem - if i go to my allprods page, click an item, add the item to my cart, the item gets added and i remain on the page (turned off show cart in admin) - if i click on cart contents to show cart, the item is there and when i click continue shopping, everything is fine - you may want to do that for now until the cause of the problem is found :wink: Reading is beneficial - Searching is enlightening find answers at wiki.oscommerce.com/top Share this post Link to post Share on other sites
azer 0 Posted May 14, 2003 :) :) :) and :D for this contribution MS2 Share this post Link to post Share on other sites
LeeH 0 Posted June 11, 2003 I've been changing all my links per this wonderful mod and finally managed to figure out how to change category links. In categories.php, I changed this code around line 49 in my file: after this line: $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new); change following block of code to this: $no_underscore = str_replace(" ","_",$foo[$counter]['name']); $categories_string .= '<nobr><a nowrap href="'; if ($foo[$counter]['parent'] == 0) { $cPath_new = 'category=' .str_replace("/", "/", rawurlencode($no_underscore)). '&cPath=' . $counter; } else { $cPath_new = 'category=' .str_replace("/", "/", rawurlencode($no_underscore)).'&cPath=' . $foo[$counter]['path']; } I couldn't get the "/" replacement code to work on the one category where I had a slash, so I said 'screw it" changed it to "&" . Thanks to Greg for such a fantastic contribution! Greg, any change to get the code to include the categories also ? Maybe even manufacturers ? Share this post Link to post Share on other sites
LeeH 0 Posted June 11, 2003 Hi Greg, I've replaced many product links with this great suggestion & even managed to figure out how to change the categories box which I just posted here. However, I'm struggling with the main_categories.php page. I'm using your layout that you posted elsewhere for that page, but ir doesn't have the url encode stuff. Would you mind sharing that? Thanks much! Lee To initiate globally, you'll have to touch every file that contains a product link. As an example, let's look at the What's New infobox._name']). '&products_id=' . $random_product['products_id'])[/code] Enjoy. - Greg Share this post Link to post Share on other sites
shagymoe 0 Posted July 29, 2003 So, where are we at on this contrib? Is the download current with all of the suggested bug fixes? Thanks. Share this post Link to post Share on other sites
interbikes 0 Posted August 14, 2003 Hi im really confused, there seems to be a big problem with the contribution. http://www.interbikes.com/foxy/allprods.php There is a HUGE gap uner the last products AND not all the products are there....any ideas?? Share this post Link to post Share on other sites
interbikes 0 Posted August 14, 2003 PS - The next product is Disturbed - Emb (skinny) Share this post Link to post Share on other sites
J0J0 0 Posted August 14, 2003 Look at this page: http://www.webmasterworld.com/forum3/9424.htm An underscore is considered to be a letter whereas a hyphen is not. So blue_widget is one long 11-letter word. By the way, can anybody help me with that problem? http://forums.oscommerce.com/viewtopic.php...start=10#212865 Please! ;) Share this post Link to post Share on other sites
Farrukh 1 Posted August 14, 2003 I have updated the All Prods mod to be compatible with Osc Milestone 2.2 which resolves the issue of getting a huge gap in the allprods.php while veiwing it in browser. Download here: http://www.oscommerce.com/community/contributions,137 Share this post Link to post Share on other sites
Farrukh 1 Posted August 14, 2003 You can see a working demo here: http://www.arabianbazaar.com/allprods.php Share this post Link to post Share on other sites
interbikes 0 Posted August 14, 2003 Man, you are good! and dedicated, but the list still stops at The distillers - gun Ive seen its not because of the ( in the product name :?: And also the continue button takes me to the main index page :?: Anything you can think of? Share this post Link to post Share on other sites
interbikes 0 Posted August 14, 2003 http://www.interbikes.com/foxy/allprods.php Share this post Link to post Share on other sites