Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

One bug plaguing going live...


tkeats

Recommended Posts

url

http://test.rainbowcomputersystems.com/adm...D=1&action=edit

 

To-wards the bottom of the page I am recieving an error still. I have even gone so far as to remove the last contribution that I added to that page and still it remains.

 

Products Model UPC Tax Price (ex) Price (inc) Total (ex) Total (inc)

1 x Intel D845GERG2 Motherboard

Fatal error: Call to undefined function: tep_currency_format() in /home/www/test.rainbowcomputers.ca/htdocs/admin/orders.php on line 219

 

Whats going on with this tep_currency_format() that its undefined?

 

Thomas Keats

RainbowComputerSystems.com

[/b]

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

Link to comment
Share on other sites

OK.

 

I got the fatal error out, but simply by commenting out those 3 or 4 lines of code that placed tax and price info...

 

 

Does anyone know what they SHOULD be replaced with???

 

Thomas Keats

RainbowComputerSystems.com

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

Link to comment
Share on other sites

tep_currency_format() should be defined in either catalog/includes/functions/general.php or html_output.php... best bet is general.php.

 

It's a newer function for formatting the currencies so I assume you have upgraded things? If it only happens on product_info.php you might be better of using the old function which was (*think*) just tep_currency().

If you have an older backup look at how that does the price formatting.

Or get it from CVS.

 

Regards

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

OK, I will check that, thanks.

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

Link to comment
Share on other sites

ok, this is from my OLD (currently live) shop in the admin/orders.php

 

<?php

   for ($i=0; $i<sizeof($order->products); $i++) {

     echo '          <tr class="dataTableRow">' . "n" .

          '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty']

. ' x</td>' . "n" .

          '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];



     if (sizeof($order->products[$i]['attributes']) > 0) {

       for ($j=0; $j<sizeof($order->products[$i]['attributes']); $j++) {

         echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': '

. $order->products[$i]['attributes'][$j]['value'];

         if ($order_packingslip == false) {

             if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' ('

. $order->products[$i]['attributes'][$j]['prefix']

. $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true,

$order->info['currency'], $order->info['currency_value']) . ')';

         }

         echo '</i></small></nobr>';

       }

     }



     echo '</td>' . "n" .

          '            <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "n";

     if ($order_packingslip == false) {

          echo '            <td class="dataTableContent" align="right" valign="top">'

. tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "n" .

          '            <td class="dataTableContent" align="right" valign="top"><b>'

. $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'],

$order->info['currency_value']) . '</b></td>' . "n" .

          '            <td class="dataTableContent" align="right" valign="top"><b>'

. $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true,

$order->info['currency'], $order->info['currency_value']) . '</b></td>' . "n" .

          '            <td class="dataTableContent" align="right" valign="top"><b>'

. $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true,

$order->info['currency'], $order->info['currency_value']) . '</b></td>' . "n" .

          '            <td class="dataTableContent" align="right" valign="top"><b>'

. $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) *

$order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "n";

       }

          echo '          </tr>' . "n";

   }

   if ($order_packingslip == false) {

?>

 

And this is the admin/orders.php in the September snapshot...

 

<?php

   for ($i=0; $i<sizeof($order->products); $i++) {

     echo '          <tr class="dataTableRow">' . "n" .

          '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty']

. ' x</td>' . "n" .

          '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];



     if (sizeof($order->products[$i]['attributes']) > 0) {

       for ($j=0; $j<sizeof($order->products[$i]['attributes']); $j++) {

         echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': '

. $order->products[$i]['attributes'][$j]['value'];

         if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' ('

. $order->products[$i]['attributes'][$j]['prefix']

. tep_currency_format($order->products[$i]['attributes'][$j]['price']) . ')';

         echo '</i></small></nobr>';

       }

     }



     echo '</td>' . "n" .

          '            <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "n" .

// For UPC Code Mod

          '            <td class="dataTableContent" align="right" valign="top">' . $order->products[$i]['upc']

. '</td>' . "n" .

// End UPC Code Mod

          '            <td class="dataTableContent" align="right" valign="top">'

. tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "n" .

//           '            <td class="dataTableContent" align="right" valign="top">'

. tep_currency_format($order->products[$i]['final_price'], true, $order->info['currency'],

$order->info['currency_value']) . '</td>' . "n" .

//           '            <td class="dataTableContent" align="right" valign="top">'

. tep_currency_format(($order->products[$i]['final_price'] * $order->products[$i]['tax']/100) +

$order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</td>'

. "n" .

//           '            <td class="dataTableContent" align="right" valign="top"><b>'

. tep_currency_format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true,

$order->info['currency'], $order->info['currency_value']) . '</b></td>' . "n" .

//           '            <td class="dataTableContent" align="right" valign="top"><b>'

. tep_currency_format((($order->products[$i]['final_price'] * $order->products[$i]['qty']) * $order->products[$i]['tax']/100$

          '          </tr>' . "n";

   }

?>

 

the only thing I see that comes near is tep_display_tax_value.

 

Having a hard time reading this section period...

 

Thomas Keats

RainbowComputers.ca

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...