if (empty($this->sSettings
['languageID'
])) { $defaultShop =
$shopRepository->
getDefault();
// Just a fall back for update reasons
$this->sSettings
['languageID'
] =
$defaultShop->
getId();
} $shop =
$shopRepository->
getActiveById($this->sSettings
['languageID'
]);
if (!
$shop instanceof Shop
) { throw new ModelNotFoundException(Shop::
class,
$this->sSettings
['languageID'
]);
} $this->shopData =
$this->
getShopData($this->sSettings
['languageID'
]);
if (empty($this->sSettings
['categoryID'
])) { $this->sSettings
['categoryID'
] =
$this->shopData
['category_id'
];
} if (empty($this->sSettings
['customergroupID'
])) { $this->sSettings
['customergroupID'
] =
(int) $shop->
getCustomerGroup()->
getId();
} else { $this->sSettings
['customergroupID'
] =
(int) $this->sSettings
['customergroupID'
];
} if (empty($this->sSettings
['currencyID'
])) { $this->sSettings
['currencyID'
] =
$this->shopData
['currency_id'
];
}