Hallo zusammen,
unser Setting: OXID EE 6.1.2 mit 2 Master-Shops, die wiederum einige Sub-Shops besitzen.
Verhalten : ich möchte je Sub-Shop unterschiedliche Länder freischalten. Wenn ich im Backend Länder aktiviere/deaktiviere, wirkt sich das jedoch auf JEDEN Shop aus - egal, aus welchem Shop heraus ich die Länder aktiviere/deaktiviere. Beispiel: im Sub-Shop X deaktiviere ich Zypern -> in ALLES Shops ist nun Zypern als Land deaktiviert.
Frage : Besteht die Möglichkeit, dass Länder pro Sub-Shop aktiviert/deaktiviert werden können?
Vielen Dank für eure Hilfe!
Beste Grüße
Stefan
Hallo und herzlich willkommen, @Bresser ,
schau mal, hier ist die Vererbung für die verschiedenen Mall-Arten recht anschaulich erklärt: https://docs.oxid-esales.com/eshop/de/6.1/konfiguration/mall-funktion/index.html
Falls das nicht hilft, frag gern mal beim Support an
Hallo Marco,
vielen Dank für die freundliche Begrüßung.
Die Standardshop Funktionalität sieht diesbezüglich leider keine Möglichkeit vor - ich bin in Kontakt mit dem Support
Beste Grüße
Stefan
1 Like
5CL6
September 16, 2022, 1:08pm
5
Gab es zu diesem Thema noch weitere Information, wir haben aktuell das gleiche Problem.
ist nur über ein Modul machbar, z.B.:
<?php
namespace VT\SubshopCountries;
use OxidEsales\Eshop\Core\Registry;
class ViewConfig extends ViewConfig_parent {
/** @var array list of country oxIDs per subshop */
protected $aSubshopCountries = [
// DE
'2' => [
'a7c40f631fc920687.20179984' // DE
],
// UK
'3' => [
'a7c40f632a0804ab5.18804076', // UK
'a7c40f632be4237c2.48517912' // IE
],
// CH
'4' => [
'a7c40f6321c6f6109.43859248' // CH
],
// USA
'5' => [
'8f241f11096877ac0.98748826' // USA
],
];
public function getCountryList()
{
if ($this->_oCountryList === NULL) {
$this->_oCountryList = oxNew(\OxidEsales\Eshop\Application\Model\CountryList::class);
$iShopID = Registry::getConfig()->getActiveShop()->getId();
if (\array_key_exists($iShopID, $this->aSubshopCountries)) {
$sViewName = getViewName('oxcountry');
$sIdsSql = implode(',', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($this->aSubshopCountries[$iShopID]));
$sSelect = "SELECT oxid, oxtitle, oxisoalpha2 FROM {$sViewName} WHERE oxactive = '1' AND oxid IN ({$sIdsSql}) ORDER BY oxorder, oxtitle ";
$this->_oCountryList->selectString($sSelect);
} else {
$this->_oCountryList->loadActiveCountries();
}
}
return $this->_oCountryList;
}
}