getSvipPriceAttr 非空判断
This commit is contained in:
parent
0f827e0108
commit
cdfede89ee
@ -53,6 +53,7 @@ class ProductAttrValue extends BaseModel
|
|||||||
|
|
||||||
public function getSvipPriceAttr()
|
public function getSvipPriceAttr()
|
||||||
{
|
{
|
||||||
|
if ($this->product){
|
||||||
try {
|
try {
|
||||||
if ($this->product->product_type == 0 && $this->product->show_svip_price && $this->product->svip_price_type == 1) {
|
if ($this->product->product_type == 0 && $this->product->show_svip_price && $this->product->svip_price_type == 1) {
|
||||||
$rate = merchantConfig($this->product->mer_id,'svip_store_rate');
|
$rate = merchantConfig($this->product->mer_id,'svip_store_rate');
|
||||||
@ -62,7 +63,7 @@ class ProductAttrValue extends BaseModel
|
|||||||
}catch (\Exception $e){
|
}catch (\Exception $e){
|
||||||
Log::error([$e->getMessage(),$e->getLine(),$e->getFile()]);
|
Log::error([$e->getMessage(),$e->getLine(),$e->getFile()]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $this->getData('svip_price');
|
return $this->getData('svip_price');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user