Forums / General Questions / Coupon Entry on Orders_Total

Coupon Entry on Orders_Total

Locked

Views: 996

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
8 Jan 2007, 2:24 PM
#1
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Coupon Entry on Orders_Total

Since upgrading to 1.3.6 our coupons now look like the following on the orders total table...

Discount Coupon: <a href="javascript:couponpopupWindow('http://ourdomain.com/index.php?main_page=popup_coupon_help&cID=154')">Coupon Name</a> :

I think we would prefer not having the popup window on the order information page.

Can you advise where to override this?

9 Jan 2007, 10:03 PM
#2
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Coupon Entry on Orders_Total

The accountant imports this table in to a database, and all that html for the popup is causing trouble.

This is the only instance I can find for this code bit ...

/home/store/public_html/includes/modules/order_total/ot_coupon.php

Line #53 : $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> :',

Line #87 : 'fields' => array(array('title' => ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_TEXT_CURRENT_CODE . '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $_SESSION['cc_id']) . '\')">' . $discount_coupon->fields['coupon_code'] . '</a><br />' : '') . MODULE_ORDER_TOTAL_COUPON_TEXT_ENTER_CODE,

13 Jan 2007, 3:02 PM
#3
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Coupon Entry on Orders_Total

Do modules also work in the override system?

We need to remove this code, the accountant is having a heck of a time importing the table into their program. We also use that column to run a query to adjust the coupon off the products in the products table so that the manufacturers are paid the right amount.

16 Jan 2007, 5:30 PM
#4
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Coupon Entry on Orders_Total

I followed the override system instructions and have had no success with this.

Altered code

File:
tried both
/includes/modules/custom/order_total/ot_coupon.php
and
/includes/modules/custom/ot_coupon.php

line 54

$this->output[] = array('title' => $this->title . ': ' . $this->coupon_code . ' :',
'text' => '-' . $currencies->format($od_amount['total']),
'value' => $od_amount['total']);

line 87
'redeem_instructions' => MODULE_ORDER_TOTAL_COUPON_REDEEM_INSTRUCTIONS . ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_REMOVE_INSTRUCTIONS : ''),
'fields' => array(array('title' => ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_TEXT_CURRENT_CODE . $discount_coupon->fields['coupon_code'] . '<br />' : '') . MODULE_ORDER_TOTAL_COUPON_TEXT_ENTER_CODE,
'field' => zen_draw_input_field('dc_redeem_code', '', 'id="disc-'.$this->code.'" onchange="submitFunction(0,0)"'),
'tag' => 'disc-'.$this->code

Still writes this on the Order_Total Table....

Discount Coupon: <a href="javascript:couponpopupWindow('coupon help url')">Coupon Code We Use</a> :

16 Jan 2007, 10:27 PM
#5
ksoup avatar

ksoup

Zen Follower

Join Date:
Jan 2004
Posts:
413
Plugin Contributions:
1

Re: Coupon Entry on Orders_Total

We are still looking for help on this.

We would suggest that the accountant import skipping this field and go by the coupon code that is in the orders table, but it would then bypass the titles for the text and values.

Are we going to have to develop an update function to get rid of this code on our otherwise neat orders_total table?