The VirtueMart script allows you to set the minimum sum per a purchase. This can be done from the Joomla Administrator Area->Components->VirtueMart->Store->Edit Store.
The field in the question is called Minimum purchase order value for your store.
With some code modifications you can change the corresponding functionality to check the maximum purchase order value.
In order to complete the modification open the administrator/components/com_virtuemart/html/basket.php file and change the following code:
/* check if the minimum purchase order value has already been reached */
if( !defined( '_MIN_POV_REACHED' )) {
if (round($_SESSION['minimum_pov'], 2) > 0.00) {
if ($total_undiscounted >= $GLOBALS['CURRENCY']->convert( $_SESSION['minimum_pov'] )) {
// OKAY!
define ('_MIN_POV_REACHED', '1');
}
to
/* check if the max purchase order value has already been reached */
if( !defined( '_MIN_POV_REACHED' )) {
if (round($_SESSION['minimum_pov'], 2) > 0.00) {
if ($total_undiscounted <= $GLOBALS['CURRENCY']->convert( $_SESSION['minimum_pov'] )) {
// OKAY!
define ('_MIN_POV_REACHED', '1');
}
You can also change the following messages in theadministrator/components/com_virtuemart/languages/common/english.php file:
'PHPSHOP_CHECKOUT_ERR_MIN_POV' => 'Minimum purchase order value has not been reached yet.',
'PHPSHOP_CHECKOUT_ERR_MIN_POV2' => 'Our minimum purchase order value is:',
'PHPSHOP_STORE_FORM_MPOV' => 'Minimum purchase order value for your store',
You need help with a shopping cart? hostlantern is specialized in eCommerce hosting and provides expert support for a large number of shopping carts. Check out our shopping cart hosting services!