You are here:  » Merchant A-Z


Merchant A-Z

Submitted by Eddie on Sat, 2006-02-11 17:39 in

OK - Testing at http://www.shopsort.co.uk/

The Merchant A-Z (in the left hand menu) is wrong as the /merchant/ part is missing from URL. i am guessing this is a simple school boy error - but I can see it!
[code snipped]

Submitted by support on Sat, 2006-02-11 18:06

Hi Eddie;

Best to just copy the $merchantHREF construction from product.php:

<?php
if (file_exists(".htaccess"))
{
  
$merchantHREF $config_baseHREF."merchant/".str_replace(" ","-",$product["merchant"])."/";
}
else
{
  
$merchantHREF "search.php?q=merchant:".urlencode($product["merchant"]).":";
}
?>

(you were just missing the word "merchant" in your value of $merchantHREF - simple as that!)

Submitted by Eddie on Sat, 2006-02-11 19:36

Did that then I get:

shopsort.co.uk/merchant//

????

I replaced

if (file_exists(".htaccess"))
{
$merchantHREF = str_replace(" ","-",$feed["merchant"])."/";
}
else
{
$merchantHREF = "search.php?q=merchant:".urlencode($feed["merchant"]).":";
}

with your example as above

Submitted by support on Sat, 2006-02-11 19:44

Ah - sorry - no you don't want the product but in there; my fault! Can you post your original bit of code - just the bit where it creates $merchantHREF (sorry I snipped it) and i'll fix it up for you...

Submitted by Eddie on Sat, 2006-02-11 19:50

Sorted it

It should have been :

$merchantHREF = $config_baseHREF."merchant/".str_replace(" ","-",$feed["merchant"])."/";