예제 #1
0
 public static function setProfile($id_ebay_profile)
 {
     $id_shop = (int) EbayProfile::_getIdShop(false);
     // check that this profile is for the current shop
     $shop_profiles = EbayProfile::getProfilesByIdShop($id_shop);
     if ($id_shop) {
         $is_shop_profile = false;
         foreach ($shop_profiles as $profile) {
             if ($profile['id_ebay_profile'] == $id_ebay_profile) {
                 $is_shop_profile = true;
                 break;
             }
         }
         if (!$is_shop_profile) {
             return false;
         }
     }
     Configuration::updateValue('EBAY_CURRENT_PROFILE', $id_ebay_profile . '_' . $id_shop, false, 0, 0);
     return true;
 }