chalisoft
Forum Replies Created
-
@fahadmahmood I added the code to line 565 of the file class-slw-stock-locations-tab.php, you can see it at https://imgur.com/tHSiQ0O . And it worked perfectly. _stock_status meta key of the variations worked correctly when I updated the product with any quantity. You can refer to this solution of mine.
@fahadmahmood I am sorry, I can’t speak English, I can only write English so my videos have no voice. And I’m so sorry for understanding some of the WooCommerce functions, for example, wc_get_product() only works after the init action. And I am also very sorry if I have wasted your time. But for testers like me, I will check many cases, find bugs and fix it myself. I’m also a developer very busy with my work however I would also like to take a moment to contribute and perfect this great plugin. Thank you once again.
@fahadmahmood It still doesn’t work. I checked the update_wc_stock_status() method in the helper-slw-product.php file . And I see that the code is crashing, you used the update_wc_stock_status() method to call the variation ID. In this method you used wc_get_product() function to get product data. However, it cannot get variation data through variation ID. You can watch my short record https://vimeo.com/742260706
@fahadmahmood I checked your code and i see https://imgur.com/oGW3OuU
@fahadmahmood Thank you so much! There’s just one more problem, I think it’d be great if it’s fixed https://imgur.com/PP3cScG
@fahadmahmood You can see my recent recording https://vimeo.com/742192217 . This video makes the problem more clear at the end of the video.
@fahadmahmood Hi, I checked the method get_all_product_stock_locations_for_selection() on file stock-locations-for-woocommerce\src\helpers\helper-slw-frontend.php, you can see https://i.imgur.com/EnmMX0x.png, then i checked the method get_product_locations_stock_total() on stock-locations-for-woocommerce\src\helpers\helper-slw-product.php, you can see https://i.imgur.com/00qAZj3.png, and i checked the method getProductStockLocations() on stock-locations-for-woocommerce\src\helpers\helper-slw-stock-allocation.php, you can see https://i.imgur.com/fA6abIn.png
I see that, I only get the “Stock value updated. Please refresh this page.” on the variant product page. When I try to refresh the page, stock will be set to 0. Through a few checks on the code, I found the getProductStockLocations() method only works with simple products. I think you update the handling for the variant product in this method so it can work properly
I am also getting the “Stock value updated. Please refresh this page.” on the product pages. @fahadmahmood You can view this at https://i.imgur.com/aJj18Js.png . I updated my inventory via a CSV file and got the above message
Forum: Plugins
In reply to: [Stock Locations for WooCommerce] Does this plugin support quick view?Thanks for your feedback. I will try to do it
@fahadmahmood Thank you so much!
@fahadmahmood Many thanks!
$data['stock_quantity_sum'] += $data['stock_quantity'][$variation_id][$term->term_id];
change to$data['stock_quantity_sum'] += (int) $data['stock_quantity'][$variation_id][$term->term_id];
will work normallyYes, same as @siriusnode
It’s just that I haven’t enabled Stock Location. But, there is a small bug. When I clear select attribute on product page, The Stock Location select is still visible. Can you fix this in the next update?
I have solved the problem. Thank you