Untranslated srting constants in cart.php frontend helper

Started by razor7, August 04, 2021, 15:55:55 PM

Previous topic - Next topic

razor7

Hi! just found some untranslated string constants in cart.php helper

On line 1224
if($userAttempts>0 and ( !empty($coupon_details->virtuemart_coupon_max_attempt_per_user) and $coupon_details->virtuemart_coupon_max_attempt_per_user>0 )) {
if($userAttempts>=$coupon_details->virtuemart_coupon_max_attempt_per_user) {
$this->couponCode = '';
return 'Maximum coupon usage limit reached, please try different code.';
}
}


Should be
if($userAttempts>0 and ( !empty($coupon_details->virtuemart_coupon_max_attempt_per_user) and $coupon_details->virtuemart_coupon_max_attempt_per_user>0 )) {
if($userAttempts>=$coupon_details->virtuemart_coupon_max_attempt_per_user) {
$this->couponCode = '';
                return vmText::_('COM_VIRTUEMART_COUPON_CODE_MAX_USAGE_REACHED');
}
}


New constant
QuoteCOM_VIRTUEMART_COUPON_CODE_MAX_USAGE_REACHED="Maximum coupon usage limit reached, please try different code."

On line 1296
if($allow_coupon == 0) {
$this->couponCode = '';
return 'Coupon code not valid, please try different code.';
}


Should be
if($allow_coupon == 0) {
$this->couponCode = '';
            return vmText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
}


New constant
QuoteCOM_VIRTUEMART_COUPON_CODE_INVALID="Coupon code not valid, please try different code"
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store