Jump to content

[SOLVED] getCatImageLink Friendly URL's not working


Recommended Posts

Hi,

 

When I have friendly URL's enabled getCatImageLink() is rewriting the URL for the image with the categories name at the end.

 

for example /c/3-category_default.png

 

gets re-written to /c/3-category_default/iphone-4.png

 

If you want to disable this from happening you can change the function to be as follows in the Link.php override file

 

public function getCatImageLink($name, $id_category, $type = null){
 $uri_path = (_THEME_CAT_DIR_.$id_category.($type ? '-'.$type : '').'.jpg');
 return $this->protocol_content.Tools::getMediaServer($uri_path).$uri_path;
}

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

  • 3 weeks later...

Hi,

 

When I have friendly URL's enabled getCatImageLink() is rewriting the URL for the image with the categories name at the end.

 

for example /c/3-category_default.png

 

gets re-written to /c/3-category_default/iphone-4.png

 

If you want to disable this from happening you can change the function to be as follows in the Link.php override file

 

public function getCatImageLink($name, $id_category, $type = null){
 $uri_path = (_THEME_CAT_DIR_.$id_category.($type ? '-'.$type : '').'.jpg');
 return $this->protocol_content.Tools::getMediaServer($uri_path).$uri_path;
}

 

Thanks! Works!

Link to comment
Share on other sites

×
×
  • Create New...