Homparty dev
This commit is contained in:
parent
9252094a04
commit
ac0d5b781e
60 changed files with 3443 additions and 293 deletions
|
|
@ -4,6 +4,7 @@ namespace App\Services;
|
|||
use App\Models\Attribute;
|
||||
use App\Models\Category;
|
||||
use App\Models\Country;
|
||||
use App\Models\Ingredient;
|
||||
use App\Models\Product;
|
||||
use App\Models\ShippingCountry;
|
||||
use App\Models\ShoppingUser;
|
||||
|
|
@ -146,6 +147,18 @@ class HTMLHelper
|
|||
return $ret;
|
||||
}
|
||||
|
||||
public static function getProductIngredientsOptions($has_ids = array(), $all = true){
|
||||
$values = Ingredient::where('active', 1)->get();
|
||||
$ret = "";
|
||||
$attr = "";
|
||||
foreach ($values as $value){
|
||||
if(!in_array($value->id, $has_ids)){
|
||||
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$value->name.'</option>\n';
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getAttributesOptions($ids = array(), $all = true){
|
||||
$values = Attribute::where('active', 1)->get();
|
||||
$ret = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue