Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function Savefavorite($supplier, $id_shop, $id_supplier, $favActive)
- {
- $four = json_decode(Configuration::get('imp_favorite_'.$id_shop), true); // load
- if (!empty($favActive)) { // if 1 exist
- // ??????? DELETE element ???????
- }else { // if 0 no exist ok next
- $four['Suppliers'][$id_supplier]['supplier'] = $supplier;
- }
- Configuration::updateValue('imp_favorite_'.$id_shop, json_encode($four)); //save
- }
- {"Suppliers":{"1":{"supplier":"blablabliblou"},"2":{"supplier":"papapipipupi"}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement