Author Topic: Untranslated srting constants in cart.php frontend helper  (Read 763 times)

razor7

  • Jr. Member
  • **
  • Posts: 355
    • MGSCreativa - Professional VM!
Untranslated srting constants in cart.php frontend helper
« on: August 04, 2021, 15:55:55 pm »
Hi! just found some untranslated string constants in cart.php helper

On line 1224
Code: [Select]
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
Code: [Select]
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
Quote
COM_VIRTUEMART_COUPON_CODE_MAX_USAGE_REACHED="Maximum coupon usage limit reached, please try different code."

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

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

New constant
Quote
COM_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