shish 4 år sedan
förälder
incheckning
ab6cfa818a
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      console/controllers/ShopController.php

+ 4 - 0
console/controllers/ShopController.php

@@ -60,6 +60,10 @@ class ShopController extends Controller
             $ownShop = ShopClass::getById($ownShopId, true);
             $ownShop = ShopClass::getById($ownShopId, true);
             if ($ownShop->mainId != $ownMainId) {
             if ($ownShop->mainId != $ownMainId) {
                 echo "ghs own {$item->id} {$ownMainId} {$ownShop->mainId} \n";
                 echo "ghs own {$item->id} {$ownMainId} {$ownShop->mainId} \n";
+                if (!empty($ownShop->mainId)) {
+                    $item->ownMainId = $ownShop->mainId;
+                    $item->save();
+                }
             }
             }
         }
         }
     }
     }