Topic: Modified SEO Friendly URLs

The original string replacements for SEO Friendly URLs remove hyphens and replace spaces with underscores.  I modified this behavior to keep hyphens and replace spaces with hyphens for a clean URL (not mixed with hyphens and underscores).  I also added strtolower to the last line to lowercase the final output.  In addition, there are a few new hyphens where removing some characters may bunch words together (#, /, +, %).

Here is the code to replace, starting on line 121 of admin/pagegenerator.php.

            // Generate filename...
            $thisfilename = str_replace("%productid%","$productid",$htmlfilename.".html");
            $safeproductname = str_replace(" ","-",$productname);
            $safeproductname = str_replace("!","",$safeproductname);
            $safeproductname = str_replace("#","-",$safeproductname);
            $safeproductname = str_replace("?","",$safeproductname);
            $safeproductname = str_replace("&","",$safeproductname);
            $safeproductname = str_replace(":","",$safeproductname);
            $safeproductname = str_replace(";","",$safeproductname);
            $safeproductname = str_replace(",","",$safeproductname);
            $safeproductname = str_replace(".","",$safeproductname);
            $safeproductname = str_replace("/","-",$safeproductname);
            $safeproductname = str_replace("\\","",$safeproductname);
            $safeproductname = str_replace("\"","",$safeproductname);
            $safeproductname = str_replace("'","",$safeproductname);
            $safeproductname = str_replace("+","-",$safeproductname);
//            $safeproductname = str_replace("-","",$safeproductname);
            $safeproductname = str_replace("(","",$safeproductname);
            $safeproductname = str_replace(")","",$safeproductname);
            $safeproductname = str_replace("%","-",$safeproductname);
            $safeproductname = str_replace("__","_",$safeproductname);
            $safeproductname = str_replace("__","_",$safeproductname);
            $safeproductname = str_replace("å","a",$safeproductname);
            $safeproductname = str_replace("ä","a",$safeproductname);
            $safeproductname = str_replace("ö","o",$safeproductname);
            $safeproductname = str_replace("Å","A",$safeproductname);
            $safeproductname = str_replace("Ä","A",$safeproductname);
            $safeproductname = str_replace("Ö","O",$safeproductname);
            $thisfilename = strtolower(str_replace("%productname%","$safeproductname",$thisfilename));

Re: Modified SEO Friendly URLs

Thanks David for this contribution. In my opinion, Ashop is already, absolutely hands down, the greatest shopping cart ever created but anything to make it even better is welcome...thanks again.