• Resolved aaasc

    (@aaasc)


    Hi,

    I am planning to purchase the pro version. However, my client needs the feature to show the stock for all products in the vendor dashboard. Unfortunately, the stock is only showing for the simple products but most vendors have products with multiple variations and it is inconvenient to only see the availability of the stock for each variant by editing the product, especially for the vendors with a lot of products.

    Is this something we can do (showing the stock quantity for each variant in the dashboard’s product tab table)?

    Thank you in advance for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @aaasc ,

    Variable products is a Dokan Pro only feature and this forum is strictly related to Dokan Lite features only. The www.remarpro.com forum rules do not allow us to discuss Pro features here.

    Now, by default, only product-based stock is shown in the product list in the vendor dashboard. If you want to show the inventory of each variation you will need to do some customization. We can share the file location and guideline but the implementation needs to be done with the help of an expert.

    I hope this clears the confusion.

    Thank you ??

    Thread Starter aaasc

    (@aaasc)

    Thank you so much for the quick reply.

    I am at this point evaluating the Free version, so I suppose my question will fall within the support criteria on this forum. I don’t mind doing the custom work if I know which files to modify.

    I really appreciate your feedback and will move my questions to Pro forum, once I know this is working and my client will be convinced that the feature is available before purchasing the pro version.

    Thank you again for your help.

    Thread Starter aaasc

    (@aaasc)

    Hi Rashed,

    Any direction you can give me will be appreciated.

    Thank you.

    Hello @aaasc ,

    The solution is not much related to Dokan. Dokan saves the product and variations as WooCommerce does. So, you can use WooCommerce’s functionality to make this work. You can see an example here to get variation stock – https://stackoverflow.com/questions/30514596/how-get-variations-stock-quantity-woocommerce

    $variations = $product->get_available_variations();
        foreach($variations as $variation){
             $variation_id = $variation['variation_id'];
             $variation_obj = new WC_Product_variation($variation_id);
             $stock = $variation_obj->get_stock_quantity();
    }

    You will find the stock quantity of simple products in – dokan-lite/templates/products/products-listing-row.php at line no. 70 to 73. You can use the example code from above here to show the stock quantity of variations as well.

    I hope the information helps.

    Thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Inventory in the Products tab for variations.’ is closed to new replies.