Jump to content

How to remove "in all categories" on pages


Recommended Posts

"in All categories" appear on all of my product names and category names and even in updating customer addresses. How do I remove it? I think this is a backoffice setting. I tried removing products from the 'home' category but this still happens. Products are not in all categories. Do you know why this is happening and how to solve it? Please help. Thanks so much!

 

Examples on my site:

 

http://thenotexchange.com/index.php?id_product=11&controller=product 

"Civil and Criminal Procedure Essay (Court Report) in All categories"

http://thenotexchange.com/index.php?id_category=13&controller=category

"Engineering in All categories"

Link to comment
Share on other sites

public function assignProductList()
	{
		$hookExecuted = false;
		Hook::exec('actionProductListOverride', array(
			'nbProducts' => &$this->nbProducts,
			'catProducts' => &$this->cat_products,
			'hookExecuted' => &$hookExecuted,
		));

		// The hook was not executed, standard working
		if (!$hookExecuted)
		{
			$this->context->smarty->assign('categoryNameComplement', '');
			$this->nbProducts = $this->category->getProducts(null, null, null, $this->orderBy, $this->orderWay, true);
			$this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts"
			$this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);
		}
		// Hook executed, use the override
		else
			// Pagination must be call after "getProducts"
			$this->pagination($this->nbProducts);

		foreach ($this->cat_products as &$product)
		{
			if ($product['id_product_attribute'] && isset($product['product_attribute_minimal_quantity']))
				$product['minimal_quantity'] = $product['product_attribute_minimal_quantity'];
		}

		$this->context->smarty->assign('nb_products', $this->nbProducts);
	}
}

Thanks so much, PrestaNinja!

Link to comment
Share on other sites

product.tpl 

<h1>{$product->name|escape:'htmlall':'UTF-8'}</h1>

category.tpl

{if $category->id AND $category->active}
		<h1>
			{strip}
				{$category->name|escape:'htmlall':'UTF-8'}
				{if isset($categoryNameComplement)}
					{$categoryNameComplement|escape:'htmlall':'UTF-8'}
				{/if}
			{/strip}
		</h1>

Thanks PrestaNinja!

 

Yep, I use layered navigation but I've never configured it.

Link to comment
Share on other sites

Ok, everything is fine. I was able to trace this text. It is dynamically added when the page loads. I think it is added by your superfish module, could you check superfish configuration? If there is a kind of a search box option try to disable it. 

 

But first to make sure that it is the culprit, just desactivate it (don't uninstall). Then clear cache and check page again.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...