Jump to content

Ayuda Url de categorias


Recommended Posts

Hola:necesito que alguien me ayude a poner en mi prestashop 1.5.6 que en la url de mi web salgan las categorias padre.

Es decir;me salen asi:

elrincondefieltros.hol.es/es/26_broches-forma-de-cara

y quiero que se vean asi:

elrincondefieltros.hol.es/es/broches/26_broches-forma-de-cara o

elrincondefieltros.hol.es/es/broches/grandes/26_broches-forma-de-cara

He seguido una guia que está por este foro pero no me lo soluciona.

En el archivo link.php de classes tengo esto:

if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories', $id_shop))
{
$params['category'] = (!$category) ? $product->category : $category;
$cats = array();
foreach ($product->getParentCategories() as $cat)
if (!in_array($cat['id_category'], Link::$category_disable_rewrite))//remove root and home category from the URL
$cats[] = $cat['link_rewrite'];
$params['categories'] = implode('/', $cats);
}

y lo cambio por esto:

if ($dispatcher->hasKeyword('product_rule', $id_lang, 'category'))
$params['category'] = (!$category) ? $product->category : $category;

if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories'))
{ $cats = array(); foreach ($product->getParentCategories() as $cat) $cats[] = $cat['link_rewrite']; $params['categories'] = implode('/', $cats); }

y no me hace nada.Todo se queda igual.

Gracias

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

Pues no se,lo tengo igual que en tu imagen y no me sale la ruta completa en la url...

 

En el archivo link.php de classes tienes esto tb como yo?:

if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories', $id_shop))
{
$params['category'] = (!$category) ? $product->category : $category;
$cats = array();
foreach ($product->getParentCategories() as $cat)
if (!in_array($cat['id_category'], Link::$category_disable_rewrite))//remove root and home category from the URL
$cats[] = $cat['link_rewrite'];
$params['categories'] = implode('/', $cats);
}
Link to comment
Share on other sites

Bueno,pues he conseguido ver  por lo menos la categoria padre.

Ahora lo veo asi:

elrincondefieltros.hol.es/es/broches/26_broche-mariposa poniendo en las asociaciones de productos en categoria predeterminada la categoria padre.

 

Pero sigo sin conseguir ver toda la ruta si tengo mas subcategorias. Quiero esto:

elrincondefieltros.hol.es/es/broches/grandes/26_broche-mariposa pero  si cambio en categoria predeterminada la categoria padre, me sale asi:

elrincondefieltros.hol.es/es/grandes/26_broche-mariposa y no veo toda la ruta completa.

Alguien me ayuda???

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...