Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005
    Posts
    95
    Plugin Contributions
    0

    Default order total modules error

    Hi guys,
    Hope someone has an idea on what I have done wrong here
    when I go into order total to change some settings I am getting this error

    Fatal error: Call to a member function format() on a non-object in /home/cheekybu/public_html/shop/includes/modules/order_total/ot_clrp.php on line 29

    I am not sure what is wrong?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Posts
    95
    Plugin Contributions
    0

    Default Re: order total modules error

    here is what is in the beginning of the file

    Code:
    <?php
    /**
     * @package orderTotal
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: ot_gv.php 4975 2006-11-20 22:11:21Z wilt $
     */
    
    class ot_clrp {
      var $title, $output;
    
      function ot_clrp() {
        global $currencies;
        $this->code = 'ot_clrp';
        $this->title = MODULE_ORDER_TOTAL_CLRP_TITLE;
        $this->header = MODULE_ORDER_TOTAL_CLRP_HEADER;
        $this->description = MODULE_ORDER_TOTAL_CLRP_DESCRIPTION;
        $this->user_prompt = MODULE_ORDER_TOTAL_CLRP_USER_PROMPT;
        $this->sort_order = MODULE_ORDER_TOTAL_CLRP_SORT_ORDER;
        $this->include_shipping = MODULE_ORDER_TOTAL_CLRP_INC_SHIPPING;
        $this->include_tax = MODULE_ORDER_TOTAL_CLRP_INC_TAX;
        $this->calculate_tax = MODULE_ORDER_TOTAL_CLRP_CALC_TAX;
        $this->credit_tax = MODULE_ORDER_TOTAL_CLRP_CREDIT_TAX;
        $this->tax_class  = MODULE_ORDER_TOTAL_CLRP_TAX_CLASS;
        $this->show_redeem_box = MODULE_ORDER_TOTAL_CLRP_REDEEM_BOX;
        $this->credit_class = true;
        if (!zen_not_null(ltrim($_SESSION['cot_clrp'], ' 0')) || $_SESSION['cot_clrp'] == '0') $_SESSION['cot_clrp'] = '0.00';
        $this->checkbox = $this->user_prompt . '<input type="text" size="6" onchange="submitFunction()" name="cot_clrp" value="' . number_format($_SESSION['cot_clrp'], 2) . '" onfocus="if (this.value == \'' . number_format($_SESSION['cot_clrp'], 2) . '\') this.value = \'\';" />' . ($this->user_has_clrp_account($_SESSION['customer_id']) > 0 ? '<br />' . MODULE_ORDER_TOTAL_CLRP_USER_BALANCE . $currencies->format($this->user_has_clrp_account($_SESSION['customer_id'])) : '');
        $this->output = array();
      }
    
      function process() { 
        global $order, $currencies;
        if ($_SESSION['cot_clrp']) {
          $order_total = $this->get_order_total();
          $od_amount = $this->calculate_credit($order_total);
          if ($this->calculate_tax != "none") {
            $tod_amount = zen_round($this->calculate_tax_deduction($order_total, $od_amount, $this->calculate_tax, true), 2);
            $od_amount = $this->calculate_credit($order_total);
          }
          $this->deduction = $od_amount + $tod_amount;
          $order->info['total'] = zen_round($order->info['total'] - $this->deduction, 2);
          if ($od_amount > 0) {
                if (DISPLAY_PRICE_WITH_TAX == 'true') {
                  $this->deduction += zen_calculate_tax($this->deduction, $tax);
                }
    
            $this->output[] = array('title' => $this->title . ':',
                                    'text' => '-' . $currencies->format($this->deduction),
                                    'value' => $this->deduction);
          }
        }
      }

 

 

Similar Threads

  1. Sort Order for order total modules.
    By swamyg1 in forum General Questions
    Replies: 10
    Last Post: 1 Sep 2016, 06:08 AM
  2. Missing order total modules
    By hubert in forum General Questions
    Replies: 14
    Last Post: 12 Feb 2016, 09:51 PM
  3. v151 Order total modules don't appear in Modules/Order Total
    By godt in forum General Questions
    Replies: 8
    Last Post: 29 Nov 2013, 02:50 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR