Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default 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&amp;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?

  2. #2
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default 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,

  3. #3
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default 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> :

  5. #5
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default 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?

  6. #6
    Join Date
    Jan 2004
    Posts
    482
    Plugin Contributions
    0

    Default Re: Coupon Entry on Orders_Total

    I found an answer and would like to thank JeffD for sharing what he did to fix this problem! Thank you JeffD!

    http://www.zen-cart.com/forum/showth...814#post315814

 

 

Similar Threads

  1. v150 How does the orders_total table get updated?
    By jaiba in forum General Questions
    Replies: 1
    Last Post: 26 Aug 2014, 06:34 PM
  2. v138a Discount coupon applied but not stored in orders_total table
    By rajoo.sharma in forum General Questions
    Replies: 0
    Last Post: 26 Sep 2013, 07:08 AM
  3. orders_total table planned usage
    By wdrwc in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Jul 2006, 07:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg