Да, Открыть файл: catalog/controller/checkout/coupon.php
в версии 2.0.3.1
находка:
if (empty($this->request->post['coupon'])) {
$json['error'] = $this->language->get('error_empty');
unset($this->session->data['coupon']);
} elseif ($coupon_info) {
$this->session->data['coupon'] = $this->request->post['coupon'];
$this->session->data['success'] = $this->language->get('text_success');
$json['redirect'] = $this->url->link('checkout/cart');
} else {
$json['error'] = $this->language->get('error_coupon');
}
изменить его:
if (empty($this->request->post['coupon'])) {
$json['error'] = $this->language->get('error_empty');
unset($this->session->data['coupon']);
} elseif ($coupon_info) {
// here I use USD for example
if($this->session->data['currency'] == 'USD'){
$this->session->data['coupon'] = $this->request->post['coupon'];
$this->session->data['success'] = $this->language->get('text_success');
$json['redirect'] = $this->url->link('checkout/cart');
} else {
// Write your custom error message here
$json['error'] = 'This coupon is only available in USD';
unset($this->session->data['coupon']);
}
} else {
$json['error'] = $this->language->get('error_coupon');
}
Что есть вы сделали до сих пор, что не работает? – Andrej