View Single Post
  #1  
Old 12-07-2007, 03:57 AM
 
Saman Saman is offline
 

Member
  
Join Date: Nov 2007
Location: London
Posts: 28
 

Post Add Extra field to "Add new product" Page!

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.
__________________
Saman
-------------------
Having:
X-Cart 4.1.9
X-RMA
X-Special Offers
X-Survey
Reply With Quote