How can I know if a product is configurable (color, size, shape) or can be added directly to the cart (it is unique without configuration possible) programmatically?
For example: I have a shirt without attributes, then my method canBeAddedDirectly($product)
should return true.
However, another shirt has 3 colors then, my method canBeAddedDirectly($product)
should return false, because I need to choose a color (or other attributes) before.