Magento category <-> product <-> website relationship

Magento category <-> product <-> website relationship

October 10, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento category <-> product <-> website relationship

Understanding Magento: Category <> Product <> Website Relationships

As a senior developer working extensively with e-commerce platforms like Magento, I often encounter questions about how products relate to categories and websites within the system. In this post, we’ll break down the complex relationship between these entities in your specific setup.

The Database Structure Behind Your Setup

In your scenario of three countries (websites) and three languages per country (store views), Magento manages these configurations through several core tables:

  • core_website: Stores general website information.
  • core_store: Contains store-specific details like name, sort order, etc. Each row represents a unique combination of website + store view, including the admin one.
  • catalog_category_entity and its associated table catalog_category_entity_int: Store category data with multiple fields for different countries/websites.

The Product <> Category Relationship

Magneto uses two primary tables to connect products (catalog_product_entity) with categories:

  1. catalog_category_product: Contains a flat list of product IDs linked to their respective category IDs.
  2. catalog_category_products_index: Provides an optimized index for faster queries, especially in large-scale setups.

In your case, to achieve scenario #2—where the same product can belong to the same or different categories across websites—you would primarily manage this via the catalog_category_product table. Each row represents a unique link between a category and a product.

The Category <> Website Relationship

For scenario #1 and #3, Magento handles the activation/deactivation of categories per website through several tables:

  • core_config_data: Stores various configuration settings, including whether a specific category is active for a particular website. You can find this in catalog_category/active under your core config node.
  • catalog_category_entity_int: Contains additional attributes for each category, such as its status (enabled/disabled) per store view.

Best Practices and Configuration

To manage your complex setup effectively, consider the following best practices:

  1. Use store-specific categories: Create separate categories for each combination of website + language to maintain granular control.
  2. Leverage Magento’s built-in configuration tools: Update category statuses (active/inactive) per website via the admin interface or API.
  3. Optimize your setup: Ensure you have proper indexes on your catalog_category_products_index table for improved performance.

Example: Activating/Deactivating Categories Per Website

To demonstrate, let’s look at how to deactivate a category for a specific website using the Magento Admin Panel:

  1. Navigate to Catalog > Categories.
  2. Find and open your desired category.
  3. Scroll down to the Store View section.
  4. Set the desired store view (website + language) to “No”.
  5. Click Save Category.

This action removes the category from the selected website’s frontend, achieving scenario #3.

Conclusion

In summary, Magento’s architecture provides a robust yet complex framework for managing products, categories, and websites simultaneously. By understanding how these entities relate at the database level and applying best practices in configuration management, you can create powerful, multilingual e-commerce experiences tailored to your specific business needs across different countries and languages.

For more detailed information on Magento’s core tables and their relationships, I recommend exploring the official documentation or contacting our team of experienced Magento developers at Laravel Company.

Catalog Indexing Database Performance

Our network