Auto Set Weight

  • Posts: 4
  • Thank you received: 0
12 years 8 months ago #41671

Hi,
is there an opportunity to set automatically the weight of products to 1.000? I edited the file 'common.php', but without any successfully result.
The affected line must be this one:

<tr>
<td class="key">
<label for="product_weight">
<?php echo JText::_( 'PRODUCT_WEIGHT' ); ?>
</label>
</td>
<td>
<input type="text" name="data[product][product_weight]" value="<?php echo @$this->element->product_weight; ?>"/>
</td>
</tr>


Regards

darksum

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 8 months ago #41847

Edit the file "common" of the view "product" via the menu Display->Views.
Before the line:

<input type="text" name="data[product][product_weight]" value="<?php echo @$this->element->product_weight; ?>"/><?php echo $this->weight->display('data[product][product_weight_unit]',@$this->element->product_weight_unit); ?>

add the line:
<?php if(!isset($this->element->product_weight_unit)) $this->element->product_weight_unit=1.000; ?>

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum