- Posts: 4
- Thank you received: 0
Auto Set Weight
14 years 6 months ago #41671
by darksum
Auto Set Weight was created by darksum
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
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.
14 years 6 months ago #41847
by nicolas
Replied by nicolas on topic Re: Auto Set Weight
Edit the file "common" of the view "product" via the menu Display->Views.
Before the line:
add the line:
Before the line:
Code:
<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:
Code:
<?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.147 seconds