Jump to content

[SOLVED] All friendly URLs work except Manufacturers


Recommended Posts

Hopefully someone can assist with this.

 

Friendly urls are turned on and all appear to work as they should, except for that for the Manufacturer which returns a 404 error.

 

Also, this is specific to the Manufacturer link on product pages. Links from a scroller which appears on all pages work ok.

 

On product pages when the link is hovered over the url contains no data after the basic shop url and looks like this.

http://domainname.co.uk/shop/en/_

In SEO & URLs, the route to manufacturer is setup as {id}_{rewrite}

 

Presumably there's a simple reason it's failing to pickup the ID & rewrite it, but I'm struggling to work out why, when all the others are OK.

 

htaccess has been regenerated, caches cleared etc.

 

Edit: This is v1.5.4.0

Edited by vekia (see edit history)
Link to comment
Share on other sites

I'm not sure how to a attach a file, but here's the only lines I can see in the product.tpl which relates to manufactures.

 

{if isset($product->manufacturer_name) && $product->manufacturer_name != ""}
<p class="product-manufacturer">
<span class="value_name">{l s='Manufacturer:'}</span> <a href="{$link->getManufacturerLink($product->manufacturer_name)}">{$product->manufacturer_name}</a>
</p>
{/if}
Link to comment
Share on other sites

it's because you have to use manufacturer id instead of manufacturer name

 

try with this, instead of:

{$link->getManufacturerLink($product->manufacturer_name)}

 

use

{$link->getManufacturerLink($product->id_manufacturer)}

Link to comment
Share on other sites

Code shows you don't have rewrite implemented in this link. Check manufacturer-list.tpl, links there look like this:

<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">
Link to comment
Share on other sites

it's because you have to use manufacturer id instead of manufacturer name

 

try with this, instead of:

{$link->getManufacturerLink($product->manufacturer_name)}

 

use

{$link->getManufacturerLink($product->id_manufacturer)}

Should I replace all instances of manufacturer_name with id_manufacturer in all lines? Or just that section you've given?

Link to comment
Share on other sites

×
×
  • Create New...