Contributions
Product Cost/Margins Mod 1.0
This modification took about 20 minutes to make and simply adds the ability for osCommerce to record product cost prices with a simple java script reporting feature, similar to how NET price is calculated from Tax and the Gross Price.
Adds flexibilities for more advanced profitability reporting in osCommerce and brings it that one step closer to E.R.P.
Package Includes:
- Easy Install HTML Manual
- Preview Image
Expand All / Collapse All
Fixed a 1136 SQL bug, there was missing code within the installation document.
With this you will be able to set the cost of a product and its mark up . Will work whatever you change (price, cost , gross price)
the original contrib does NOT store the cost so I combined adding the cost from contib http://addons.oscommerce.com/info/1594 with showing the margin from this one .
I replaced sales margin with mark up because I think its better for a shop owner to know his mark up.
Iam not a coder so any clean up will be appreciated .
Please back up database and the files changed . I have not tested it on a live shop
Missing "?>" at the bottom of first modification
Should be
<td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td>
</tr>
<?php
/*
ADDED FOR COST MARGIN MOD
START OF CODE ADDITION
*/
?>
<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_COST; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_cost', $pInfo->products_cost, 'OnKeyUp="updateMargin()"'); ?></td>
</tr>
<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_MARGINS; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' ?><span id='products_price_margins'></div></td>
</tr>
<?php
/*
ADDED FOR COST MARGIN MOD
END OF CODE ADDITION
*/
?>
This modification took about 20 minutes to make and simply adds the ability for osCommerce to record product cost prices with a simple java script reporting feature, similar to how NET price is calculated from Tax and the Gross Price.
Adds flexibilities for more advanced profitability reporting in osCommerce and brings it that one step closer to E.R.P.
Package Includes:
- Easy Install HTML Manual
- Preview Image
Note: Contributions are used at own risk.