|
@@ -242,14 +242,14 @@ class Info
|
|
|
|
|
|
public function getPayInfo($id, $sku, $num = 1, $user = array())
|
|
public function getPayInfo($id, $sku, $num = 1, $user = array())
|
|
{
|
|
{
|
|
- $info = Dever::db($this->table_info)->getOne($id);
|
|
+ $info = Dever::db($this->table_info)->find($id);
|
|
|
|
|
|
if ($info) {
|
|
if ($info) {
|
|
$info['sku_id'] = 0;
|
|
$info['sku_id'] = 0;
|
|
if ($sku > 0) {
|
|
if ($sku > 0) {
|
|
$where['info_id'] = $info['id'];
|
|
$where['info_id'] = $info['id'];
|
|
$where['id'] = $sku;
|
|
$where['id'] = $sku;
|
|
- $sku = Dever::db('goods/info_sku')->getOne($where);
|
|
+ $sku = Dever::db('goods/info_sku')->find($where);
|
|
if ($sku) {
|
|
if ($sku) {
|
|
$info['sku_id'] = $sku['id'];
|
|
$info['sku_id'] = $sku['id'];
|
|
$info['price'] = $sku['price'];
|
|
$info['price'] = $sku['price'];
|
|
@@ -277,7 +277,7 @@ class Info
|
|
|
|
|
|
public function storeInfo($goods_id, $area_id = '')
|
|
public function storeInfo($goods_id, $area_id = '')
|
|
{
|
|
{
|
|
- $info = Dever::db($this->table_info)->getOne($goods_id);
|
|
+ $info = Dever::db($this->table_info)->find($goods_id);
|
|
if (!$info) {
|
|
if (!$info) {
|
|
return array();
|
|
return array();
|
|
}
|
|
}
|
|
@@ -308,14 +308,14 @@ class Info
|
|
|
|
|
|
public function getFreight($id, $goods_price, $user, $num)
|
|
public function getFreight($id, $goods_price, $user, $num)
|
|
{
|
|
{
|
|
- $info = Dever::db($this->table_info)->getOne($id);
|
|
+ $info = Dever::db($this->table_info)->find($id);
|
|
return $this->freight($info, $goods_price, $user, $num);
|
|
return $this->freight($info, $goods_price, $user, $num);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getInfo($id, $attr = true, $order = 'view_reorder', $user = array(), $reward = false)
|
|
public function getInfo($id, $attr = true, $order = 'view_reorder', $user = array(), $reward = false)
|
|
{
|
|
{
|
|
- $info = Dever::db($this->table_info)->getOne($id);
|
|
+ $info = Dever::db($this->table_info)->find($id);
|
|
|
|
|
|
if ($info && $attr) {
|
|
if ($info && $attr) {
|
|
$info = $this->info($info, $order, false, $user, $reward);
|
|
$info = $this->info($info, $order, false, $user, $reward);
|
|
@@ -380,10 +380,11 @@ class Info
|
|
'price' => $price,
|
|
'price' => $price,
|
|
's_price' => $s_price
|
|
's_price' => $s_price
|
|
);
|
|
);
|
|
|
|
+ $info['price']['value'] = $price;
|
|
$info['price']['max'] = array();
|
|
$info['price']['max'] = array();
|
|
}
|
|
}
|
|
|
|
|
|
- $info['platform_name'] = Dever::db('goods/info')->config['config_platform'][$info['platform']];
|
|
+
|
|
|
|
|
|
if (isset($info['cdate']) && $info['cdate']) {
|
|
if (isset($info['cdate']) && $info['cdate']) {
|
|
$info['cdate_string'] = Dever::mdate($info['cdate'], 2);
|
|
$info['cdate_string'] = Dever::mdate($info['cdate'], 2);
|
|
@@ -391,15 +392,21 @@ class Info
|
|
|
|
|
|
$info = $this->getInfoLink($info);
|
|
$info = $this->getInfoLink($info);
|
|
|
|
|
|
- $info['freight'] = 0;
|
|
+
|
|
- if ($info['platform'] == 1 && $user) {
|
|
+ unset($info['f_price']);
|
|
-
|
|
+ unset($info['cdate']);
|
|
- $info['freight'] = $this->freight($info, $info['price']['min']['price'], $user);
|
|
+ unset($info['udate']);
|
|
- }
|
|
+ unset($info['category']);
|
|
-
|
|
+ unset($info['top_category_id']);
|
|
- if ($reward) {
|
|
+ unset($info['second_category_id']);
|
|
- $info['reward'] = $this->reward($info, $info['price']['min']['price']);
|
|
+ unset($info['category_id']);
|
|
- }
|
|
+ unset($info['area']);
|
|
|
|
+ unset($info['mode']);
|
|
|
|
+ unset($info['top']);
|
|
|
|
+ unset($info['youhui']);
|
|
|
|
+ unset($info['status']);
|
|
|
|
+ unset($info['reorder']);
|
|
|
|
+ unset($info['state']);
|
|
|
|
|
|
return $info;
|
|
return $info;
|
|
}
|
|
}
|