Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

In the install instructions for the Ajax Order Editor contribution there are the following lines for the file catalog/admin/orders.php

 

 

*****************************
* - catalog/admin/orders.php*
*****************************

line 255-262:
FIND:
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
  echo '			  <tr>' . "\n" .
	   '				<td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
	   '				<td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
	   '			  </tr>' . "\n";
}
?>

REPLACE IT WITH:
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
	if (($order->totals[$i]['class'] != 'ot_subtotal') && ($order->totals[$i]['class'] != 'ot_total') && ($order->totals[$i]['class'] != 'ot_tax')) {
		echo '			  <tr>' . "\n" .
			 '				<td align="right" class="smallText"><a href="java script: updateOrdersTotal(\'' . $oID . '\', \'' . $order->totals[$i]['class'] . '\', \'' . addslashes(htmlspecialchars($order->totals[$i]['title'])) . '\', \'title\')"><u>' . $order->totals[$i]['title'] . '</u></a></td>' . "\n" .
			 '				<td align="right" class="smallText"><a href="java script: updateOrdersTotal(\'' . $oID . '\', \'' . $order->totals[$i]['class'] . '\', \'' . $order->totals[$i]['value'] . '\', \'value\')"><u>' . $order->totals[$i]['text'] . '</u></a></td>' . "\n" .
			 '			  </tr>' . "\n";
	} else {
		echo '			  <tr>' . "\n" .
			 '				<td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
			 '				<td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
			 '			  </tr>' . "\n";
	}
}
//link to create a new order_total
echo '			  <tr>' . "\n" .
	 '			  <td align="right" class="smallText" colspan="2"><a href="java script: createOrdersTotal(\'' . $oID . '\')"><u>Añadir un campo</u></a></td>' . "\n" .
	 '			  </tr>' . "\n";
?>

 

Can you tell me what "Añadir un campo" translates to in English please (I'm guessing it is "Create a new order total", but would like to be sure).

 

Could you possibly include a DEFINE for this in the language files and use it in place of this hard coded string please?

 

Nice Contribution, many thanks for the good work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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