Hello!
How can i hide child product in Vituemart 3 from category if parent is published in same category?
For example, in category c there is a parent product and its child products. If the parent product is not in stock or it is not published, thrn need to display one child product, only one of which has a stock greater than zero and which is published.
???
With default settings that is what happens.
Have you tested this, what are your settings?
Jörgen @ Kreativ Fotografi
You need to set the category,if you want display the child product in the same category as parent, if the parent product is not published.
Quote from: Studio 42 on September 08, 2019, 21:49:59 PM
You need to set the category,if you want display the child product in the same category as parent, if the parent product is not published.
Yes, but in this case, all products are displayed, both the parent and all child products. But i need to display only one of them, and the rest should be hidden.
Make parent not orderable and take away category from children. Then you will only see the parent.
Jörgen @ Kreativ Fotografi
Quote from: Jörgen on September 09, 2019, 09:23:52 AM
Make parent not orderable and take away category from children. Then you will only see the parent.
Jörgen @ Kreativ Fotografi
I did this before. But if parent product will be unpublished the child will not be shown in category. I need to show parent product or one of the child products in this category.
Quote from: motobrat on September 09, 2019, 17:22:54 PMI need to show parent product or one of the child products in this category.
If you unpublish parent and dont want set a category in the children, then you dont see the children in category.
Is this so hard to understand ?
Quote from: Studio 42 on September 10, 2019, 00:30:01 AM
Quote from: motobrat on September 09, 2019, 17:22:54 PMI need to show parent product or one of the child products in this category.
If you unpublish parent and dont want set a category in the children, then you dont see the children in category.
Is this so hard to understand ?
Please try to understand what im asking....
I have more than 3000 pruducts in the virtuemart shop. The prices, stock quantaty and product publication is updating automaticly. According to your logic, you need to manually remove from the category or add products to the category almost every day after automatically updating prices and balances. This is unreal...
Once again I will try to formulate the problem. There is a parent product and its child products. In fact, this is one product that differs in individual parameters (size, color, SKU, etc.). One of these products must be displayed in the category. if it is available and published. The rest of the remaining parent and child products that are in stock and published should not be displayed in the category. This is necessary so that the same product does not appear in the category, for example: a yellow helmet S, a yellow helmet M, etc. And also, to display the product with the current price and availability.
maybe I misunderstand what u want but normally u just display the parent with a dropdown of children as we do here.
https://www.escape-watersports.co.uk/clothing/jackets
we also have stock scripts running every 5 mins or so and this also un-publishes or publishes children that go out of or in stock
The children have no category
if all children have no stock then we replace the dropdown with an out of stock label in the template
Parent not orderable should work, of course if you unpublish the parent you never see childrens.
If you have Vm3.4+ then it should display only published children with stock.