As for WooCommerce pricing per piece and per pack?

Hello! Tell me, is there a plugin to show the prices per piece and per pack? You can only order packages. For example, a value of 10p/PCs. But this product is only sold packs of 50pcs. Accordingly, in the cart you can only add 50,100,150... products. How it can be implemented? Thanks in advance!
March 19th 20 at 08:39
1 answer
March 19th 20 at 08:41
Initially get a price for 1 pack. Then, create a variable that will do the calculation based on the price.
$price = get_price_html(); // price per pack - 50pcs
$cal = $price / 5; // price for 10pcs

Find more questions by tags WooCommerceWordPress