Author Topic: Automatically create four prices lists when I add a product  (Read 2326 times)

nolifeonmars

  • Beginner
  • *
  • Posts: 9
Automatically create four prices lists when I add a product
« on: October 24, 2013, 10:39:04 am »
Joomla 1.5.21 - Virtuemart 1.1.9

Hello to all,
I'm trying to customize a function:

When I add a product and insert the price in the "Price Field" automatically creates a
"Price List" with the price listed. And this is normal operation.

Since my products have four types of prices depending on the amount, I would like to automatically create
four lists already during add new product (see attachments)

I understand that the files to be changed are:

product.product_form.php
product.product_price_form.php
product.product_price_list.php

as you can see I changed the following code: (line 324 of product.product_form.php)

             <tr class="row1">
                  <td width="29%" ><div style="text-align:right;font-weight:bold;">
                    <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_PRICE_GROSS') ?>:</div>
                  </td>
                  <td width="71%" ><input type="text" class="inputbox" onkeyup="updateNet();" name="product_price_incl_tax" size="10" /></td>
             </tr>


with:

             <tr class="row1">
                  <td width="29%" ><div style="text-align:right;font-weight:bold;">
                    <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_PRICE_GROSS') ?>:</div>
                  </td>
                  <td width="71%" ><input type="text" class="inputbox" onkeyup="updateNet();" name="product_price_incl_tax" size="10" /></td>
             </tr>
             <tr class="row1">
                  <td width="29%" ><div style="text-align:right;font-weight:bold;">
                    <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_PRICE_GROSS') ?>:</div>
                  </td>
                  <td width="71%" ><input type="text" class="inputbox" onkeyup="updateNet();" name="product_price_incl_tax1" size="10" /></td>
             </tr>
             <tr class="row1">
                  <td width="29%" ><div style="text-align:right;font-weight:bold;">
                    <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_PRICE_GROSS') ?>:</div>
                  </td>
                  <td width="71%" ><input type="text" class="inputbox" onkeyup="updateNet();" name="product_price_incl_tax2" size="10" /></td>
             </tr>
             <tr class="row1">
                  <td width="29%" ><div style="text-align:right;font-weight:bold;">
                    <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_PRICE_GROSS') ?>:</div>
                  </td>
                  <td width="71%" ><input type="text" class="inputbox" onkeyup="updateNet();" name="product_price_incl_tax3" size="10" /></td>
             </tr>


I do not know how to edit the files: product.product_price_form.php and product.product_price_list.php so that they are automatically created
the four list prices!

Thanks for your help

[attachment cleanup by admin]