Author Topic: child products stock  (Read 484 times)

positronio

  • Beginner
  • *
  • Posts: 20
child products stock
« on: September 01, 2020, 10:19:07 am »
Hello, can you please add an option in"Action when a Product is Out of Stock" in virtuemart configuration that when all child products stock is 0 (stock - booked ordered =0)
then the parent product also stock 0??
I think the option "Do not Display Product, if child products also out of stock" is useless because if someone uses this and all products become out of stock then the product site will be blank.
Thank you.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: child products stock
« Reply #1 on: September 01, 2020, 10:35:25 am »
Quote
I think the option "Do not Display Product, if child products also out of stock" is useless because if someone uses this and all products become out of stock then the product site will be blank.

You think wrong.
My clients need visible parents products, if all child products is out of stock.

Thank You.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

positronio

  • Beginner
  • *
  • Posts: 20
Re: child products stock
« Reply #2 on: September 03, 2020, 19:58:10 pm »
this is what exactly i'm saying! I want when all childs are out of stock, the parent to be present and not disappered. Then automatically the parent product should say with a badge 'out of stock'.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2996
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: child products stock
« Reply #3 on: September 03, 2020, 20:10:50 pm »
Have You tested this ?

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: child products stock
« Reply #4 on: September 03, 2020, 23:20:54 pm »
Quote
this is what exactly i'm saying! I want when all childs are out of stock, the parent to be present and not disappered

Is normal function for me

Quote
Then automatically the parent product should say with a badge 'out of stock'.

Is not core function, but we use plugin Labels and product in stock has label In Stock.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

positronio

  • Beginner
  • *
  • Posts: 20
Re: child products stock
« Reply #5 on: September 05, 2020, 10:34:22 am »
i'm sorry pinochico but i don't understand your comment at all.
This "Do not Display Product, if child products also out of stock" is virtuemart action. Do you understand what its usage is for?

positronio

  • Beginner
  • *
  • Posts: 20
Re: child products stock
« Reply #6 on: September 05, 2020, 21:30:02 pm »
does anyone please can tell me the file in virtuemart that handles this option.
"Do not Display Product, if child products also out of stock". I use virtuemart 3.8.4 version.
Thank you in advance!!!

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: child products stock
« Reply #7 on: September 05, 2020, 21:41:15 pm »
No,

but I can learn how do you find them (I think this must be first knowledge, even if you are not a PHP developer or programmer - I'm not developer).

1. Go in administration VM, where is this checkbox
2. Find in html code by Inspect Element this element
3. Go in FTP, run terminal and find this element by linux command - grep
4. Check all occurrences in FTP in all files
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: child products stock
« Reply #8 on: September 05, 2020, 21:49:54 pm »
preview
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: child products stock
« Reply #9 on: September 05, 2020, 21:55:42 pm »
So I don't know/understund  what do you want, but all occurrences are there:

components/com_virtuemart/sublayouts/customfield.php
components/com_virtuemart/sublayouts/snippets.php
administrator/components/com_virtuemart/models/product.php
administrator/components/com_virtuemart/views/config/tmpl/default_shopfront.php
administrator/components/com_virtuemart/views/product/tmpl/product_edit_status.php
administrator/templates/vmadmin/vmadmin/html/com_virtuemart/config/default_shopfront.php
administrator/templates/vmadmin/vmadmin/html/com_virtuemart/product/product_edit_status.php

Now you can change all codes about your checkbox :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates