Hi
I would like to have an extra field (not visible to the clients) such as the cost price.
I have added the extra field (Cost price) into the "Add new product " page, by adding the code below to the "product_details.tpl". also i added the field into the database "xcart_products" table.
Code:
<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[cost_price]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$lng.lbl_cost_price} <span class="Text">({$config.General.currency_symbol})</span></td>
<td class="ProductDetails"><input type="text" name="cost_price" size="18" value="{$product.cost_price|formatprice|default:$zero}" /></td>
</tr>
The problem is the new extra field (cost price) can show the data from the database (if i add it manually into the database by phpMyAdmin), but I can not modify or add it from the form itself.
Can any one please tell me what i am missing here? Do i need to modify any PHP file as well? and where i can find the ($product) variable?
Thank you
PS. I know how to add normal extra fields which they will be visible to the customers.