Jump to content

Products category module always display default category products


Recommended Posts

Hi everybody;

 

As you understand from the topic I have a problem with products category module. In module productscategory.php file there are two section to choose category;

 

 

/* If the visitor has came to this product by a category, use this one */
if (isset($params['category']->id_category))
$category = $params['category'];
/* Else, use the default product category */
else
{
if (isset($product->id_category_default) AND $product->id_category_default > 1)
$category = New Category((int)($product->id_category_default));
}

 

I have three categories. A, B and C. C is subcategory of B and B is subcategory of A.

I have a product which have categories A and C. And default category is A.

 

As I understand from code comments when I click the product under category of A, module will display products of category A.

 

If I click the product under category of C, module will display products of category C

 

But my module always display the A category (the default one). There is nothing about subcategories. Why is it happens?

Link to comment
Share on other sites

Hi! Do you have a site url we could look at.

 

Also, screenshots of your category configuration would be helpful as well as screenshots of your associations for products.

 

 

but FIRST. Make sure that you set the Default Category in your Catalog>Product>Associations> Default Category. That may do the trick

Link to comment
Share on other sites

  • 4 weeks later...

Product is related with category A and C. Category A is default category of product. My problem is category C never display on breadcrumb. As summary when I click a product from subcategory, the default category display in breadcrumbs but subcategory is never. I doesn't matter where I clicked.

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...