Giter VIP home page Giter VIP logo

Comments (3)

Vinai avatar Vinai commented on June 12, 2024

Thanks for your report.
The issue occurs because the layer model uses the root category as the default current category.
A bit longer explanation:

  1. The product list block uses the layer model to fetch the product collection
  2. The layer model always sets the current category.
  3. If there is no current category set, the layer model uses the store root category as default
  4. The store root category is loaded
  5. This fails because that category is hidden by the rules you set

The exception is triggered because in effect a non-existant root category is assigned to the current store.

There is no easy way to change this behavior, besides making it impossible to hide root categories. In most cases this would be no problem, since the root category is rarely used in stores besides it's function as a container for all normal categories. It would certainly break your setup since you seem to rely on having the root hidden.

I suggest you rework your rules so you don't hide the root category, but instead rely only on regular categories.

from groupscatalog2.

bdgeorge avatar bdgeorge commented on June 12, 2024

Thanks Vinai, hiding the root category seemed like the most elegant architecture for a members only store, I'll see how else I can go about this.

from groupscatalog2.

Vinai avatar Vinai commented on June 12, 2024

The problem only occurs if the root category is hidden and you the try to use the product list block. If there where an easy way to fix this I would be happy to do it, but so far I can't think of a clean way to do so.

from groupscatalog2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.