ошибка tomatocart v2 PHP, отсутствует аргумент 2

#php #codeigniter

#php #codeigniter

Вопрос:

Я получаю 2 ошибки из-за отсутствия аргумента. Проблема возникает у кого-нибудь? Вот ошибка и код, на который она, похоже, ссылается:

Обнаружена ошибка PHP Серьезность: Предупреждение

Сообщение: Отсутствует аргумент 2 для currencies_display_price(), вызываемый в D:Amppswwwtomatocartv2.lstemplatesbasewebviewsproductsinfo.php в строке 62 и определен

Имя файла: helpers/toc_currencies_helper.php

Номер строки: 161

и это вторая ошибка:

Обнаружена ошибка PHP Серьезность: Обратите внимание

Сообщение: Неопределенная переменная: tax_class_id

Имя файла: helpers/toc_currencies_helper.php

Номер строки: 165

вот код для файла toc_currencies_helper.php:

 <?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * TomatoCart Open Source Shopping Cart Solution
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License v3 (2007)
 * as published by the Free Software Foundation.
 *
 * @package     TomatoCart
 * @author      TomatoCart Dev Team
 * @copyright   Copyright (c) 2009 - 2012, TomatoCart. All rights reserved.
 * @license     http://www.gnu.org/licenses/gpl.html
 * @link        http://tomatocart.com
 * @since       Version 2.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * TomatoCart Currencies Helpers
 *
 * @package     TomatoCart
 * @subpackage  Helpers
 * @category    Helpers
 * @author      TomatoCart Dev Team
 * @link        http://tomatocart.com/wiki/
 */

/**
 * Get default currency code
 *
 * @access public
 * @return string
 */
if( ! function_exists('currency_code'))
{
    function currency_code()
    {
        $CI =amp; get_instance();

        return $CI->currencies->get_code();
    }
}

/**
 * Get default currency title
 *
 * @access public
 * @return string
 */
if( ! function_exists('currency_title'))
{
    function currency_title()
    {
        $CI =amp; get_instance();

        return $CI->currencies->get_title();
    }
}

/**
 * Get default currency left symbol
 *
 * @access public
 * @return string
 */
if( ! function_exists('currency_symbol_left'))
{
    function currency_symbol_left()
    {
        $CI =amp; get_instance();
        return $CI->currencies->get_symbol_left();
    }
}

/**
 * Get all currencies
 *
 * @access public
 * @return array
 */
if( ! function_exists('get_currencies'))
{
    function get_currencies()
    {
        $CI =amp; get_instance();

        return $CI->currencies->get_currencies();
    }
}

/**
 * Format currency value with currency symbol
 *
 * @access public
 * @param $number
 * @param $currency_code
 * @param $currency_value
 * @return string
 */
if( ! function_exists('currencies_format'))
{
    function currencies_format($number, $currency_code = '', $currency_value = '')
    {
        $CI =amp; get_instance();

        return $CI->currencies->format($number, $currency_code, $currency_value);
    }
}

/**
 * Format currency raw value without symbol
 *
 * @access public
 * @param $number
 * @param $currency_code
 * @param $currency_value
 * @return string
 */
if( ! function_exists('currencies_format_raw'))
{
    function currencies_format_raw($number, $currency_code = '', $currency_value = '')
    {
        $CI =amp; get_instance();

        return $CI->currencies->format_raw($number, $currency_code, $currency_value);
    }
}

/**
 * Add tax value to product price
 *
 * @access public
 * @param $price
 * @param $tax_rate
 * @param $quantity
 * @return string
 */
if( ! function_exists('currencies_add_tax_rate_to_price'))
{
    function currencies_add_tax_rate_to_price($price, $tax_rate, $quantity = 1)
    {
        $CI =amp; get_instance();

        return $CI->currencies->add_tax_rate_to_price($price, $tax_rate, $quantity);
    }
}

/**
 * Display total price for certain amount of products with currency symbol
 *
 * @access public
 * @param $price
 * @param $tax_rate
 * @param $quantity
 * @return string
 */
if( ! function_exists('currencies_display_price'))
{
    function currencies_display_price($price, $tax_class_id, $quantity = 1, $currency_code = null, $currency_value = null)
    {
        $CI =amp; get_instance();

        return $CI->currencies->display_price($price, $tax_class_id, $quantity, $currency_code, $currency_value);
    }
}

/**
 * Display total price with tax value for certain amount of products with currency symbol
 *
 * @access public
 * @param $price
 * @param $tax_rate
 * @param $quantity
 * @param $currency_code
 * @param $currency_value
 * @return string
 */
if( ! function_exists('currencies_display_price_with_tax_rate'))
{
    function currencies_display_price_with_tax_rate($price, $tax_rate, $quantity = 1, $currency_code = '', $currency_value = '')
    {
        $CI =amp; get_instance();

        return $CI->currencies->display_price_with_tax_rate($price, $tax_rate, $quantity, $currency_code, $currency_value);
    }
}


/**
 * Display raw price (without tax value) with symbol
 *
 * @access public
 * @param $number
 * @param $currency_code
 * @return string
 */
if( ! function_exists('currencies_display_raw_price'))
{
    function currencies_display_raw_price($number, $currency_code = '')
    {
        $CI =amp; get_instance();

        return $CI->currencies->display_raw_price($number, $currency_code);
    }
}

/* End of file toc_currencies_helper.php */
/* Location: ./system/tomatocart/helpers/toc_currencies_helper.php */
  

Если кто-нибудь может помочь, это было бы очень ценно.

Комментарии:

1. Похоже, это то, с чем у него проблема: if( ! function_exists(‘currencies_display_price’)) { функция currencies_display_price($ price, $tax_class_id, $quantity = 1, $currency_code = null, $ currency_value = null) { $CI =amp; get_instance(); возвращает $ CI-> currencies-> display_price($ price, $ tax_class_id, $количество, $currency_code, $currency_value); } }

2. Ни у кого нет идей?