// Removing stock form into product admin tab
This commit is contained in:
1 parent
308b8624e7
commit
d64f7ace35
2 files changed
+26
-85
No files matched your search
@@ -228,28 +228,6 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/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"/>
|
|
||||||
<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>
|
<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 style="width:150px;vertical-align:top;text-align:right;padding-right:10px;font-weight:bold;" class="col-left">{l s='Minimum quantity:' }
|
||||||
</td>
|
</td>
|
||||||
@@ -258,14 +236,10 @@
|
|||||||
<p>{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
|
<p>{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="display:none;" id="attr_qty_stock">
|
<tr>
|
||||||
<td style="width:150px">{l s='Quantity in stock:' }</td>
|
<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;"><b><span style="display:none;" id="attribute_quantity"></span></b></td>
|
<td style="padding-bottom:5px;"><input class="datepicker" id="available_date" name="available_date" value="{$available_date}" style="text-align: center;" type="text" />
|
||||||
</tr>
|
<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">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".datepicker").datepicker({
|
$(".datepicker").datepicker({
|
||||||
|
|||||||
@@ -2741,76 +2741,43 @@ switch ($this->action)
|
|||||||
<td>
|
<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>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>';
|
||||||
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>';
|
|
||||||
|
|
||||||
|
|
||||||
if ((int)Configuration::get('PS_STOCK_MANAGEMENT'))
|
if ((int)Configuration::get('PS_STOCK_MANAGEMENT'))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!$has_attribute)
|
if (!$has_attribute)
|
||||||
{
|
{
|
||||||
if ($obj->id)
|
$content .= '
|
||||||
{
|
<tr><td colspan="2" style="padding-bottom:5px;"><hr style="width:100%;" /></td></tr>
|
||||||
$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"/>
|
|
||||||
<span style="display:none;" id="mvt_sign"></span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"> </td>
|
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
|
||||||
<td>
|
<td style="padding-bottom:5px;">
|
||||||
<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>
|
<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>
|
</td>
|
||||||
</tr>';
|
</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"> </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
|
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>
|
<td colspan="2">'.$this->l('The stock management is disabled').'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
if (!$has_attribute)
|
||||||
$content .= '
|
{
|
||||||
<tr>
|
$content .= '
|
||||||
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
|
<tr>
|
||||||
<td style="padding-bottom:5px;">
|
<td class="col-left">'.$this->l('Minimum quantity:').'</td>
|
||||||
<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).'" />
|
<td style="padding-bottom:5px;">
|
||||||
<p>'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'</p>
|
<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).'" />
|
||||||
</td>
|
<p>'.$this->l('The minimum quantity to buy this product (set to 1 to disable this feature)').'</p>
|
||||||
</tr>
|
</td>
|
||||||
';
|
</tr>
|
||||||
|
';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '
|
$content .= '
|
||||||
|
|||||||
Reference in new issue
Block a user