Support Hours: Mon-Fri 8:00-14:00 CET - If and when our partners and kids allow, we may reply to your posts outside these hours :)

Okay
  Public Ticket #2148389
List available inventories on front-end
Closed

Comments

  • Kristián Filo started the conversation

    Hello,

    I know front-end features are not yet available and are set to be realeased probably in 2020, but I really need to simply display the list of available inventories on a single product page, like this:

    Available in: Inventory A, Inventory B, Inventory C

    I know this can by achieved only with custom code yet, but could you give me a hint on how to start? Does it have something to do with default WC's 

    get_stock_quantity()

    method?

    Is it stored as a meta value of the product? Because at the moment I have no clue.

    Thank you very much.
    Kristian

  •  94
    Pavel replied

    Hi Kristian,

    This kind of customizations are out of scope of our free support, but as a clue, you can take a look to this method within the Multi-Inventory add-on: 

    \AtumMultiInventory\Inc\Helpers::get_product_inventories_sorted($product_id);

    That will give you a list of Inventories for the specified product that you can loop and display the info from there.


    I hope this helps.


    Best Regards,
    Salva.

  • Kristián Filo replied

    This was very helpful, thank you very much. I got it. :)

  •  94
    Pavel replied

    You're welcome!wink.png