Hi,
the MallShopUrls are located in oxconfig table and the matching logic
which shop is currently active is in oxUtilsObject.
It is required that the oxid framework loads the whole config of the
shop to get mallshopurls. It is cached in filesystem but it would be a
better solution to separate it in a table -> OneToMany Relation
You iterate the oxconfig table multiple times in oxconfig.php to get
Shop Urls, match with language urls, ...
oxUtilsObject, oxUtilsServer, etc. aren't for buisness logic.
My suggestion is:
remove shop handling from core-classes and separate it in shoplist and
the shop model.
create new tables:
oxShopUrls:
OXID
OXSHOPID
OXPROTOCOL
OXPATH
OXPORT
OXLANG
OXURL
oxLanguages:
OXID
OXTITLE
OXTITLE_1
OXACTIVE
OXBASELANG
OXSORT
The languages should be in a new table too. The enterprise-edition has
multiple clients with own languages. If you have different languages for
the clients you can not bequeath articles with correct language columns.
Shop 1 has english -> id 1, german -> id 2 -> french -> id 3
Shop 2 has german -> id 1, russian -> id 2
oxShopList->loadShopByUrl($sURL); (-> load oxShopUrlList, iterate it and
return an array with shop instance)
To check if the current url matches with the url, move the method
"oxUtilsObject::isCurrentUrl" to the oxShop-model.
oxShop->matchUrl($sURL);
This method trims the unnecessary path of url and check if current url
is active.
e.g.:
mallurl: shop.example.com/shop1
current url: shop.example.com/shop1/category/product.html
replace "shop.example.com/shop1" with "" in
"shop.example.com/shop1/category/product.html"
and check the urls: mallurl == current url -> true
(see https://github.com/OXID-eSales/oxideshop_ce/pull/191)
your sincerely,
Robin Lehrmann
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general