Skip to content

Commit

Permalink
Update coupon.php
Browse files Browse the repository at this point in the history
Unset current coupon code if customer enters blank coupon code into field.  This allows the customer the ability to remove the coupon code from their cart.
  • Loading branch information
OpenCartAddons committed Apr 23, 2015
1 parent f2550da commit 460a9c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion upload/catalog/controller/checkout/coupon.php
Expand Up @@ -49,6 +49,7 @@ public function coupon() {

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'];

Expand All @@ -62,4 +63,4 @@ public function coupon() {
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
}

0 comments on commit 460a9c4

Please sign in to comment.