[Skip to main content](#vessel-content)

#   unpublish products with variants with zero stock

##

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

13 years 3 months ago [\#119018](#119018) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#119018 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")* was created by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")*

-- url of the page with the problem -- : [ dodowear.nl](http://dodowear.nl)
-- HikaShop version -- : 2.2
-- Joomla version -- : 2.5
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hello,
we work with products with variants
As most of the products are seasonly (only delivered once) they need to be unpublished when sold out.
So when all variant of a product have no stock anymore the parent product should become unactive.
Up until now I do this manualy with import and export in excel or walking trough the website.
But as you can understand this is a lot of work.
So I was wondering if you could tell me a simplerer and more time winning method

thanks in advance Boudewijn

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 3 months ago [\#119042](#119042) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#119042 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,

I think you can use the mass action
[ www.hikashop.com/support/documentation/167-massaction-form.html](http://www.hikashop.com/support/documentation/167-massaction-form.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

13 years 3 months ago [\#119405](#119405) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#119405 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello Jerome,
It looks like the massaction can help me on this, but I want to be sure if it's working the way I would like.
After reading your documentary on this I have created the your example on out-of-stock.
But now I would like to test it. And I'm bit afraid that the product will be massed up.

In the product database the parent-product are all 0, the stock is on the variant.
Should this batch working correctly. So, move product which have no stock anymore on the variant to a category called out-of-stock.
And is there a way to test this. Something like a report or it shows me the products which will be moved.

I hope the everything is explained it correctly.
If this works this is a very powerfull tool.

Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

13 years 3 months ago [\#119411](#119411) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#119411 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,

To show which products will be changed, you can remove your action and instead use the action "display the results".
That will display you a list of the elements filtered.
Note that you probably want to have a filter on the product_type column equal to "variant" so that only variants get affected by the modification if that's what you want.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

13 years 2 months ago [\#122315](#122315) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#122315 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello,
previously I mentioned that I get a script error on Massaction.
In the attached file you'll a picture of this message

- [ ![h9df14f9.png](/forum/attachment/12153) ](/forum/attachment/12153 "h9df14f9.png") [ ](/forum/attachment/12153?download=1 "h9df14f9.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#122576](#122576) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#122576 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,

A problem with my sweety otree library ?
How many categories do you have ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 11 months ago [\#137367](#137367) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#137367 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,
Last days I have been playing a bit with the massaction tool.
I did some queries. And in chrome it works fine instead of firefox.
Still I would like to get a hint.
What I have created as a report now shows me all variants with 0-stock.
I selected to show on screen. So manualy I can unpublish the product.
But I actualy need to unplubish the parent-product.
How can I manage that?
So summarized: the massaction needs to show all parentproducts where all variants have no stock (=0).
This would help me a lot

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

12 years 11 months ago [\#137378](#137378) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#137378 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,
Then that's quite easy. Simply enter the total stock in your main products and the system will adjust the total stock when the variants are bought. Then, you can just have a filter on the product_quantity for main products in your mass action.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 11 months ago [\#137476](#137476) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#137476 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi Nicolas,
Yes I would say also that is simple but all my main product are on 0 or -1 stock.
Then I first need to update the stock of the main product.
Can I do this also in massaction?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 11 months ago [\#137549](#137549) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#137549 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,
Sure, you'll just have to add an "Update values" action and apply it on the "product_quantity" field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 11 months ago [\#137566](#137566) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#137566 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,
Can you be a bit more specific
Where can I select the option update values?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 11 months ago [\#137580](#137580) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#137580 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

By creating a new mass action, and using the options under the "actions" tab, for example you can update every quantity field of your products to 10000 like this :
[ ![hd57d828.png](/forum/attachment/14410) ](/forum/attachment/14410 "hd57d828.png")

- [ ![hd57d828.png](/forum/attachment/14410) ](/forum/attachment/14410 "hd57d828.png") [ ](/forum/attachment/14410?download=1 "hd57d828.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 10 months ago [\#139524](#139524) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#139524 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello,
After I have read through the different steps and process I'm not completly convident on the different actions.
I will try to explain.
Nicolas suggested that all parent product should have the total stock of all variants.
Which is not the case in our database.
So you optained to give those product stock by another mass-action.
But then I can only give those product a hard quantity.
For instance 10.
But the when I do a massaction to show all products where the variant has zero stock I don't think that all correct information is there
Perhaps I see wrong
I would expect to see
product_parent_id product_code product_quantity product_published
01234 0 1
01234 01 0 1
01234 02 0 1
And if that's the information: unplublish the parent product

I hope you can tell me how to do so

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 10 months ago [\#139604](#139604) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#139604 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,

Actually you cannot get the total quantity of each variants of a product to change the product quantity.
This is something that you should do before.

To do what you need, I think that you will have to create your own plugin based on the massactions.
A plugin which will get the quantity of each variants of a product, and if this quantity is 0 then unpublish the product.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 10 months ago [\#139696](#139696) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#139696 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello Xavier,
That is exactly what I would like to have.
But I am not that skilled to program
Who can help me on this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 10 months ago [\#139797](#139797) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#139797 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,

I think that the best thing is to post a request on the commercial jobs section of this forum.
This require some development and we are not able to provide this kind of codes on the forum.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 10 months ago [\#141120](#141120) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#141120 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello Xavier,
Thanks for your reply.
I gonna manage it through my POS system in the store.
There is already a connection between them for my stock.
and pricing.
But it would be nice to have build in something like that in the future

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 10 months ago [\#142095](#142095) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#142095 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hi,

I have added it on our TODO list ![:)](/media/kunena/emoticons/3.png ":)")

The following user(s) said Thank You: [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 9 months ago [\#144003](#144003) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#144003 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello Xavier,
Yesterday I noticed that you have published the new version of hika shop.
In the changlog there was something written on the mass action with variants.
Is it possible to do this query now.
And if so, can you tell me.

Thanks so far

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")**
- [![Boudewijn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6864.jpg)](/forum/user/6864-boudewijn "View Boudewijn's Profile") Topic Author
- [ Offline](/forum/user/6864-boudewijn)

Less More

- Posts: 252
- Thank you received: 3
-
-
-
- [](http://www.dodowear.nl)
-

12 years 9 months ago [\#145298](#145298) by [Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")  Replied by *[Boudewijn](/forum/user/6864-boudewijn "View Boudewijn's Profile")* on topic *[unpublish products with variants with zero stock](/forum/37-import-export-csv-xls/861124-unpublish-products-with-variants-with-zero-stock#145298 "-- url of the page with the problem -- :   dodowear.nl  -- HikaShop version -- : 2.2 -- Joomla version -- : 2.5 -- PHP version -- : x.x.x -- Browser(s) name and version -- : Firefox -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hello, we work with products with variants As most of the products are seasonly (only delivered once) they need to be unpublished when sold out. So when all variant of a product have no stock anymore the parent product should become unactive. Up until now I do this manualy with import and export in excel or walking trough the website. But as you can understand this is a lot of work. So I was wondering if you could tell me a simplerer and more time winning method  thanks in advance Boudewijn")*

Hello Xavier,
Perhaps you missed my latest reply.
When you have time you can take a look at it

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjExMjQtdW5wdWJsaXNoLXByb2R1Y3RzLXdpdGgtdmFyaWFudHMtd2l0aC16ZXJvLXN0b2NrP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.148 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
