• Resolved reghyz

    (@reghyz)


    hi, thanks for your plugin

    Is there a function or a product meta to get the virtual quantity of a product from php ?

    I have some custom messages to display on my template on product and product list
    ( like a “preempted” notice on products cards ), i cant figure how to retrive from the code if a product is curently on hold (most my products have a base quantity of 1 ), or to compare the real stock with the temporary one.

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author James Golovich

    (@jamesgol)

    I think you are actually asking for how to get the actual stock and not the virtual stock.

    The class ‘stockpending’ is added to items that have stock pending, that might be an easy way to do what you need.

    If you want to retrieve the values in php then you could do something like the following:
    https://gist.github.com/jamesgol/3d00dea11b1a0ea9e67f178739a64b51

    Thread Starter reghyz

    (@reghyz)

    Thanks for your answer,
    the link contain the solution to my problem, comparing virtual and actual stock will give me more flexibility on my displayed messages.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘reteive virtual stock / or product on hold information’ is closed to new replies.