������Դ��רע����ҵԴ�롢��ҵ�̡̳���ҵ�زġ���ҵģ�塢��Ʒ��������Ϊ���վ�������ṩ�����ʵķ���
�û���:
����:
ע��

��ҵԴ�����

VIP

CMS�̳�

վ��ѧԺ

ecshop��Ʒ����ҳ��̬������

lucyptak.com / 2015-08-15
ECShop 2.7.2�汾�ṩ��һ���µ����ԣ���Ʒ��
���в�ͬ���Ե���Ʒ���Ϳ��Ը��ݲ�ͬ����¼����Ӧ�Ļ����Լ���������������һЩ�̼��Ǻ����ô��ˣ��ر�����ERP�У������ϸ����������Ļ����¡�
����ǰ̨����ȴ��û�и�����һ�����ԵIJ�����ѡ���˲�ͬ���Ե�ʱ������Ȼ����Ʒ���ܿ�棬��Ȼ��������ʱ���Ǹ��ݻ�Ʒ�Ŀ�����жϵġ�
������һ������û���㹻�õ��û����飬�����б�Ҫ���ƣ�ΪECShop��Ʒ����ҳ��Ӷ�̬��涯̬���ŵĹ��ܡ�
 
��Ҫ��ͨ��ԭ�е�json��ʵ��
��goods.php��
if (!empty($_REQUEST['act']) && $_REQUEST['act'] == ‘price’)
��һ���������һ�����û�Ʒ���/���ŵ����
ͨ��js��̬���µ�ecshop��Ʒ����ҳ����ȥ��
������䣺
//$goods_tinfo = $GLOBALS['db']->getRow($sql);
$goods_tinfo = get_goods_info($goods_id);
 
$goods_sn = $goods_tinfo['goods_sn'];
$sql = "SELECT * FROM " .$GLOBALS['ecs']->table('products'). " WHERE goods_id = '$goods_id' LIMIT 0, 1";
    $prod = $GLOBALS['db']->getRow($sql);
    if (is_spec($attr_id) && !empty($prod))
    {
        $product_info = get_products_info($goods_id, $attr_id);
    }
 
    if ($product_info['product_number'])
    {
        $res['stock'] = $product_info['product_number'];
    }else{
$res['stock'] = $goods_tinfo['goods_number'];
}
 
if ($product_info['product_sn'])
{
        $res['goods_sn'] = $product_info['product_sn'];
    }else{
$res['goods_sn'] = $goods_tinfo['goods_sn'];
}
 
if ($product_info['product_weight'])
{
        $res['goods_pweight'] = $product_info['product_weight'].' ǧ��(kg)';
    }else{
$res['goods_pweight'] = $goods_tinfo['goods_weight'];
}
//$res['goods_pweight'] = $product_info['product_weight'];
$res['ecs_shopprice'] = price_format($shop_price);
������die($json->encode($res)); ǰ
����