Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add a new box to admin/categories


14steve14

Recommended Posts

Posted

I may be wanting to bite of more than I can chew here. I am trying to include a feature in the admin categories page that will make it easier for my new staff member to compare various supplier prices.

 

I use the margin report add on which includes a cost price which is added in the admin/categories.php page. What I want to try and do is to add a cost price and a cost price including VAT (20%), which will also be entered into the database for the margin report add on. The cost price is already installed and working.

 

I dont particularly want to sit with a calculaor to work this out every time a product is added, or current products are updated.

 

So what I really want is a box above the cost price which will contain a price, then turn the cost price box to a box that will include the price plus the VAT which will then be used in the margin report add on.

 

I have tried looking to see how the product gross price is calculated in the admin/categories.php file so that I can copy and work with that, but I cannot seem to get the box to fill.

 

Does anyone have any help or advice on how to achieve this? I hope I have explained this well enough

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

Been playing a bit. I have coppied the install again for the products_cost code that was added during the margin report addon. Changed product cost to product_cost_net and added a new table to the database. This figure can now be manually entered into the database and all is working fine.

 

Now is there a way to have the price for the cost_price automatically fill from the cost_price_gross times the vat rate of 20%.

 

The code for the products_cost is

 

<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, ''); ?></td>
	  </tr>

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

With help from another forum, I eventually got this working. The cost price box now adds vat to the price and automatically fills the box, just like the gross price box on the categories page.

REMEMBER BACKUP, BACKUP AND BACKUP

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...