<?php
/******************************************************************************/
//                                                                            //
//                             Smarty plugin                                  //
//                            @package Smarty                                 //
//							 @subpackage plugins                              //
//                        http://life-style.uz/                               //
//                   produced by Life Style, life-style.uz                    //
//                                                                            //
/******************************************************************************/

function smarty_function_fetch_stock_status($params, &$smarty){

	$assign        = fetch_getParam('assign', $params, 'stock_status');
    $status_id        = (int) fetch_getParam('status', $params, 1);

	$stock_status =  connect('product_stock_status')->select('name')->where('stock_status_id', $status_id)->getValue();

	$smarty->assign($assign, $stock_status);

	return null;

}