Also, while we are on the subject of the coupon code I have a pet peeve in regard to the implementation of the coupon popup help functionality. In the current implementation there is in place the following code:
Code:
$this->output[] = array('title' => $this->title . ': ' . '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $_SESSION['cc_id']) . '\')">' . $this->coupon_code . '</a> :',
'text' => '-' . $currencies->format($od_amount['total']),
'value' => $od_amount['total']);
This actually causes the anchor href and javascript html to be written out to the order_totals table record of the database! If you later attempt to view/edit the coupon field data using edit_orders or super_orders the html embedded in this order record really screws up the edit order output. As a result we have edited this code in our production store as described below to eliminate writing html out to the order_total table records, which I personally think is a really bad idea anyway.
Code:
$this->output[] = array('title' => $this->title . ': ' . $this->coupon_code . ':',
'text' => '-' . $currencies->format($od_amount['total']),
'value' => $od_amount['total']);
I would really like to see the elimination of html being written out to database records in future versions of the coupon code!
Thanks,
Jeff
Bookmarks