Promotion Frontend dynamic
This commit is contained in:
parent
c9e1545693
commit
1cc8e025a1
29 changed files with 551 additions and 163 deletions
|
|
@ -296,7 +296,13 @@ class Product extends Model
|
|||
return $this->hasMany(ProductIngredient::class, 'product_ingredients', 'id');
|
||||
}
|
||||
|
||||
|
||||
public function getShortCopy($clean = false, $len = false){
|
||||
$ret = $this->short_copy ? $this->short_copy : $this->description;
|
||||
if($len && $clean){
|
||||
return substr_ellipsis($ret, $len, $clean);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
public function getActionName($id = 0){
|
||||
if(isset($this->actions[$id])){
|
||||
return $this->actions[$id];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue