Цитировать
Warning: Missing argument 3 for currencies::display_price(), called in /www/product_info.php on line 171 and defined in /www/includes/classes/currencies.php on line 75

как я поняла не находит присвоенные цены. При попытке внести три цены к продукту она не изменилась + не подхватывает заданные ранее опции товаров.

у меня на данный момент осталась только эта ошибка. все остальное работает без проблем(даже файл spesials после удаления оттуда скобки и функции else). Вчера нашла на англ сайте вариант решения проблеммы но он для TotalB2B 1.2 версии. На этом и застряла

Вот что писал парень решивший ошибку у себя

Цитировать
    I had the same error message, and I believe I've seen others with it as well. There is actually a really simple reason for the problem (and a really easy fix).

If you look in your currencies.php file at line 72, you will see that it is expecting 4 pieces of data to be sent to it - but the totalb2b contribution is only sending through 3. Since the totalb2b contribution (in currencies.php) seems to be expecting 4, it complains when only 3 come through...

The following code is similar to what totalb2b script contains, in, for example, product_info.php (but not limited to this one file):

$currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))

The currencies.php class has the following in it (at least mine does): function display_price($products_id, $products_price, $products_tax, $quantity = 1)

You can see that 3 pieces of data are being sent, but the class expects to receive 4.

All you need to do is in each file that uses the display_price, put in the following as the first piece of data that is sent:

$product_info['products_id']

Ie, for the example in this thread, change the following:

$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))

to this:

$currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))

Worked for me a treat! 

Это выглядит логично. Задано всего 4 маркера для цены продукта но работают только 3. Из за этого и пошли ошибки. Но далее я не понимаю куда вносить изменения ((

разсматриваю эти два куска кода. первый из файла product_info

  $products_price = $currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); второй из currencies
function display_price($products_id, $products_price, $products_tax, $quantity = 1)
ошибка я так понимаю в стыковке  tep_get_tax_rate($product_info['products_tax_class_id']) с $products_tax

*

Spido

  • *
  • 1634

Он предлагает заменить во всех файлах, которые имеют строку:

$currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))На:
$currencies->display_price($product_info['products_id'], $product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))

Если вам помогли, то не стесняйтесь отблагодарить донатом:

Когда доберусь до рабочего компа рискну.  Авось выйдет 
(Здесь есть изображение, скрытое от гостей. Для просмотра зарегистрируйтесь или залогиньтесь)

можно уточнить - tep_get_tax_rate($product_info['products_tax_class_id']) отвечает за опции товара или за налог на него?

*

Spido

  • *
  • 1634

Ставка налога.

Если вам помогли, то не стесняйтесь отблагодарить донатом:

Не выйдет с предложеным вариантом ( функции и так уже с таким кодом

Цитировать
Sorry!!!! I think that I may have copied the wrong data in my post... however, the principle is there. If I get time, I'll have a look at my system and put the correct code in... make sure the 4 different pieces of data are sent to currencies.php and it will work.

Парень чуть ниже дописал такое. Тоесть работать нужно только с файлом валюты. Но какие изменения туда вносить еще нужно думать

« Последнее редактирование: 07 Май 2013 21:31:33 pm от Melise »

можете подсказать какая функция отвечает за работу опций товаров? у меня появилась идея относительно этого

Цитировать
Your function is modified and requires 4 parameters

function display_price($products_price, $products_tax, $quantity , $product_id)

The addition to default is the $products_id

In other places of your site,like the code you posted initially, you supply only 3 parameters

$currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty'])

Result is the error of course, why? Because the required 4rth parameter is missing.

What to do?

One option would be to set $products_id like this

function display_price($products_price, $products_tax, $quantity , $product_id = '') {

so, the error will go away, but I have no idea if the function will keep doing its job, this you need to test, or better you check pack to the support and/or installation instructions from where you got this code, probably an addon

опять таки все ведут к тому что не хватает заданного параметра (

Цитировать
Because we do not use TAX on are web site and I could not get any help from this forum,  I managed to munge the code into working for me! I really wish I could fix it the right way.

This is the piece of code that fails for what ever reason . . . in currencies.php

        function display_price($products_price, $products_tax, $quantity = 1) {
          return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
        }

and changed it to the following !!!

        function display_price($products_price, $products_tax = 1, $quantity = 1) {
          return $this->format($this->calculate_price($products_price, $products_tax, $quantity));
        }


I do not know if this will fix your problem, but for now this has resolved mine, I hope this help you out !!!

пробовала вот этот вариант - он работает. ошибка исчезает. основная цена отображается но  опция товаров не высчитывается (

разобралась! Все работает просто на ура!

Решение - www/product_info.php
в строке 171 заменить 

if ($products_options['options_values_price'] != '0') {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';}
на
if ($products_options['options_values_price'] != '0') {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($product_info['products_id'], $products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';}
и все. Проблемма была в том что опции товаров не могли определить с чем им работать. После внесения маркера $product_info['products_id'] все начало работать как надо. Теперь займусь русификацией и выложу весь рабочий архив сюда. Если найду еще какие то ошибки сразу отпишусь.

« Последнее редактирование: 08 Май 2013 10:37:35 am от Melise »
*

Spido

  • *
  • 1634

Возьмите этот клон, там есть уже русский язык для B2B https://forum.oscommerce.ru/index.php?action=dlattach;topic=123.0;attach=74
Легче будет переводить.

Если вам помогли, то не стесняйтесь отблагодарить донатом:

обнаружились следующие зацепки - в боксе корзина в графе "Общая цена" не тянет маркер(выводит только SUB_TITLE_SUB_TOTAL ) причем выводится на любой странице кроме shoping_cart.php - там все отображается корректно.

далее - при добавлении товара в корзину в корзине не отображает цену(там 0 ) НО общая цена сумируется и отобраюжается верно, даже с учетом скидки