I've decided to try and build in an extra variable to help with my site, however, only knowing a very limited amount of php ive got halfway through and seem to have missed out an essential part of the process, defining my new variable - duhhh!!
What i want to do is create a new variable called "bestprice" . I will then call this on the product pages and also use it when populating some of my product feeds.
A lot of my products have price breaks or quanity discounts , so often, the price for 1 is not that attractive, however when listing the products on the site oc just grabs the "price" and displays that everywhere on the site, apart from the shopping cart if you qualify for a discount by buying say 3 of a particular item.
Is it possible to create a new variable called bestprice? So far i've added a new field into the mysql database and given it the same catorgristics as "price" (copy and paste job).
I've then added it to the addproduct function and editproduct function code in /public_html/admin/model/catalog/product.php
and also make a slight change to /public_html/admin/view/template/catalog/product_form.tpl adding in this little bit... "', price = '" . (float)$data['price'] . "', bestprice = '" . $this->db->escape($data['bestprice'])."', points = '" . (int)$data['points'] .
now somewhat unsurpisingly, when I go into the admin backend and click on a product my new textbox appears to enter my "bestprice" variable but with the following message<tr>
<td><?php echo $entry_bestprice; ?></td>
<td><input type="text" name="bestprice" value="<?php echo $bestprice; ?>" /></td>
</tr>
my question is where do I define $entry_bestprice ?Notice: Undefined variable: entry_bestprice in /home/www2/public_html/admin/view/template/catalog/product_form.tpl on line 81
AND
what else would I need to do to get "bestprice" displaying when I export my data to my .xls spreadsheet (where I do most of my data entry).
Anybody any ideas?
Thanks in advance.