RE: Adding Unit Price to Cart
JB <[email protected]> 23 Jul 2003 20:27:29 -0000
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <e543339c7ab38db97bf64bd543b35a16@osCommerce-Forums> |
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=200863#200863
----------------------------------------------------------------
Updated codes for newer snapshots that no longer have the file order_details.php :D :
In catalog/includes/languages/english/shopping_cart.php add the define:
[code]
define('TABLE_HEADING_EACH', 'Price Each');
[/code]
In catalog/shopping_cart.php find this around line 70:
[code]
$info_box_contents[0][] = array('align' => 'center',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_QUANTITY);[/code]
Add this right after:
[code]
$info_box_contents[0][] = array('align' => 'right',
'params' => 'class="productListing-heading"',
'text' => TABLE_HEADING_EACH);[/code]
Next in catalog/shopping_cart.php find this around line 148:
[code]
$info_box_contents[$cur_row][] = array('align' => 'center',
'params' => 'class="productListing-data" valign="top"',
'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));[/code]
Add this right after:
[code]
$info_box_contents[$cur_row][] = array('align' => 'right',
'params' => 'class="productListing-data" valign="top"',
'text' => '<b>' . $currencies->display_price($products[$i]['price'], tep_get_tax_rate($products[$i]['tax_class_id'])) . '</b>');[/code]
HTH