// Removing stock form into product admin tab

This commit is contained in:
mDeflotte
2011-10-25 08:16:02 +00:00
parent 308b8624e7
commit d64f7ace35
2 changed files with 26 additions and 85 deletions
@@ -228,28 +228,6 @@
</td>
</tr>
{/if}
<tr id="stock_mvt_attribute" style=";">
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left">{l s='Stock movement:' }</td>
<td style="padding-bottom:5px;">
<select id="id_mvt_reason" name="id_mvt_reason">
<option value="-1">--</option>
{foreach from=$reasons item=reason}
<option
rel="{$reason.sign}" value="{$reason.id_stock_mvt_reason}"
{if $ps_stock_mvt_reason_default == $reason.id_stock_mvt_reason}
selected="selected"
{/if}>{$reason.name}
</option>
{/foreach}
</select>
<input type="text" name="attribute_mvt_quantity" size="3" maxlength="6" value="0"/>&nbsp;&nbsp;
<span style="display:none;" id="mvt_sign"></span>
<br />
<div class="hint clear" style="display: block;width: 70%;">
{l s='Choose the reason and enter the quantity that you want to increase or decrease in your stock'}
</div>
</td>
</tr>
<tr>
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left">{l s='Minimum quantity:' }
</td>
@@ -258,14 +236,10 @@
<p>{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
</td>
</tr>
<tr style="display:none;" id="attr_qty_stock">
<td style="width:150px">{l s='Quantity in stock:' }</td>
<td style="padding-bottom:5px;"><b><span style="display:none;" id="attribute_quantity"></span></b></td>
</tr>
<tr>
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left" style="width:150px">{l s='Available date:'}</td>
<td style="padding-bottom:5px;"><input class="datepicker" id="available_date" name="available_date" value="{$available_date}" style="text-align: center;" type="text" />
<p>{l s='The available date when this product is out of stock'}</p>
<tr>
<td style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left" style="width:150px">{l s='Available date:'}</td>
<td style="padding-bottom:5px;"><input class="datepicker" id="available_date" name="available_date" value="{$available_date}" style="text-align: center;" type="text" />
<p>{l s='The available date when this product is out of stock'}</p>
<script type="text/javascript">
$(document).ready(function(){
$(".datepicker").datepicker({
+22 -55
View File
@@ -2741,76 +2741,43 @@ switch ($this->action)
<td>
<div class="hint clear" style="display: block;width: 70%;">'.$this->l('You can define many discounts and specific price rules in the Prices tab').'</div>
</td>
</tr>
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>';
</tr>';
if ((int)Configuration::get('PS_STOCK_MANAGEMENT'))
{
if (!$has_attribute)
{
if ($obj->id)
{
$content .= '
<tr><td class="col-left">'.$this->l('Stock Movement:').'</td>
<td style="padding-bottom:5px;">
<select id="id_mvt_reason" name="id_mvt_reason">
<option value="-1">--</option>';
$reasons = StockMvtReason::getStockMvtReasons($this->context->language->id);
$smarty->assign('ps_stock_mvt_reason_default', $ps_stock_mvt_reason_default = Configuration::get('PS_STOCK_MVT_REASON_DEFAULT'));
foreach ($reasons as $reason)
$content .= '<option rel="'.$reason['sign'].'" value="'.$reason['id_stock_mvt_reason'].'" '.($ps_stock_mvt_reason_default == $reason['id_stock_mvt_reason'] ? 'selected="selected"' : '').'>'.$reason['name'].'</option>';
$content .= '</select>
<input id="mvt_quantity" type="text" name="mvt_quantity" size="3" maxlength="6" value="0"/>&nbsp;&nbsp;
<span style="display:none;" id="mvt_sign"></span>
</td>
</tr>
$content .= '
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
<tr>
<td class="col-left">&nbsp;</td>
<td>
<div class="hint clear" style="display: block;width: 70%;">'.$this->l('Choose the reason and enter the quantity that you want to increase or decrease in your stock').'</div>
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
<td style="padding-bottom:5px;">
<input size="3" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="'.($this->getFieldValue($obj, 'minimal_quantity') ? $this->getFieldValue($obj, 'minimal_quantity') : 1).'" />
<p>'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'</p>
</td>
</tr>';
}
$content .= '<tr>
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
<td style="padding-bottom:5px;">
<input size="3" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="'.($this->getFieldValue($obj, 'minimal_quantity') ? $this->getFieldValue($obj, 'minimal_quantity') : 1).'" />
<p>'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'</p>
</td>
</tr>';
}
if ($obj->id)
$content .= '
<tr><td class="col-left">'.$this->l('Quantity in stock:').'</td>
<td style="padding-bottom:5px;"><b>'.$qty.'</b><input type="hidden" name="quantity" value="'.$qty.'" /></td>
</tr>
';
if ($has_attribute)
$content .= '<tr>
<td class="col-left">&nbsp;</td>
<td>
<div class="hint clear" style="display: block;width: 70%;">'.$this->l('You used combinations, for this reason you can\'t edit your stock quantity here, but in the Combinations tab').'</div>
</td>
</tr>';
}
else
{
$content .= '<tr>
$content .= '
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
<tr>
<td colspan="2">'.$this->l('The stock management is disabled').'</td>
</tr>';
$content .= '
<tr>
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
<td style="padding-bottom:5px;">
<input size="3" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="'.($this->getFieldValue($obj, 'minimal_quantity') ? $this->getFieldValue($obj, 'minimal_quantity') : 1).'" />
<p>'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'</p>
</td>
</tr>
';
if (!$has_attribute)
{
$content .= '
<tr>
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
<td style="padding-bottom:5px;">
<input size="3" maxlength="6" name="minimal_quantity" id="minimal_quantity" type="text" value="'.($this->getFieldValue($obj, 'minimal_quantity') ? $this->getFieldValue($obj, 'minimal_quantity') : 1).'" />
<p>'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'</p>
</td>
</tr>
';
}
}
$content .= '