When hiding product attributes (category, article view), the number of pieces is taken from the main product, which is 0

Phoca Cart - complex e-commerce extension
Xeno
Phoca Member
Phoca Member
Posts: 17
Joined: 21 Feb 2024, 12:11

When hiding product attributes (category, article view), the number of pieces is taken from the main product, which is 0

Post by Xeno »

Hello.
I've looked through a lot of settings but can't find the logic, so I'll ask if someone can enlighten me.
I have products with multiple attributes which have separate item numbers. In the settings, it is set for each product to take the stock calculation from the attributes. This works fine, but if I hide the attribute selector field in the product category view(when viewing products in a category) and in the global settings, the stock in the product view is zero because it takes the stock from the main product, but there are attributes. The main product does indeed have zero stock, but it should take the stock from the attributes.
How is this? Or why? Or am I completely misunderstanding something?
Please someone help me understand the logic!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: When hiding product attributes (category, article view), the number of pieces is taken from the main product, which

Post by Jan »

Hi, the stock is displayed dynamically by selected attributes, so if there are no attributes, there is no information for them about the stock. Did you try to set some attribute as default, so it is displayes as default?

In case you don't display attributes in category view, maybe you should even skip displaying stock there too. :idea:

Jan
If you find Phoca extensions useful, please support the project
Xeno
Phoca Member
Phoca Member
Posts: 17
Joined: 21 Feb 2024, 12:11

Re: When hiding product attributes (category, article view), the number of pieces is taken from the main product, which

Post by Xeno »

Because I don't show the attributes, it should know that e.g. option 1 has 4 of option 2 has 4 of option 2, so all 8 products, and then on the product page you can choose an option, but it doesn't work like that and I don't understand why.
I have 2-3 options for a product, and in each case there is a default, but I would hide the option choice in category view (for css reasons) but in this case it takes the main product db number, which is zero. I think something is wrong or I don't understand how it works.
If I have 10 attributes, all of which have the db number, and I should add them up and put them into the main product's inventory as well. However, in this case what happens when I make a purchase? Is the number of pieces of the main product automatically reduced, or do I have to rewrite it every time I buy?
I think I am missing something..
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: When hiding product attributes (category, article view), the number of pieces is taken from the main product, which

Post by Jan »

If you find Phoca extensions useful, please support the project
Post Reply