-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3
Hi
I'm using Custom Quantity Plugin for some of my products and everything is ok. User inserts required length in cm, then selects quantity and cart updates successfully.
The code in "custom quantity plugin".
$currencyClass = hikashop_get('class.currency');
$quantity = @$product->cart_product_quantity;
if(!empty($product->length)){
$quantity = $quantity*$product->length/100;
}
$currencyClass->quantityPrices($product->prices,$quantity,$product->cart_product_total_quantity);
The question is how should I define product quantity in administrator. For example, I have 1000 cm of product "A", which can be sold in any length between 10cm - 400cm, and the user can select the quantity too. like 3 pieces of 30cm.
Should I define quantity in cm?
Thanks for your help.