News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

helper cart.php line 2128

Started by galicin, January 03, 2020, 18:17:12 PM

Previous topic - Next topic

galicin

When using "Purchase Quantity Steps" for product.
/components/com_virtuemart/helpers/cart.php line 2128 with error.
$step = $product->step_order_level;
if ($step != 0 && ($quantity%$step)!= 0) {
$quantity = $quantity + ($quantity%$step);
$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_STEP_ORDER', $step);
vmWarn($product->errorMsg);
if (!$checkForDisable) return false;
}

Error in the mathematical sign: instead of a plus sign, there should be a minus.
In the script line 2128 -
$quantity = $quantity + ($quantity%$step);
Right so -
$quantity = $quantity - ($quantity%$step);

Sorry for my English.