View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006590 | OXID eShop (all versions) | 4.12. Subshop handling | public | 2017-02-14 13:55 | 2017-02-14 16:50 |
Reporter | choeft | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 4.10.3 / 5.3.3 | ||||
Summary | 0006590: Function getSubShopList of Model oxShop returns list of supershops instead of subshops | ||||
Description | We found the following bug: When trying to retrieve a list of subshops of a current shop (which is a supershop), you'll recieve a list of supershops. | ||||
Steps To Reproduce | Try the following setup: Shop A - Supershop (ID: 1) Shop B - Subshop of A (ID: 2) Shop C - Supershop (ID: 3) When now executing this code: $currentShop = oxNew("oxshop"); $currentShop->load(3); $subShops = $currentShop->getSubShopList(); You'll recieve a list of the shops A + B, which is not what we expect of this function. The function getSubShopList() calls oxShopList::loadSuperShopList() if the current shop is a supershop, which is wrong I suppose; the correct function to call would be oxShopList::loadSubShopList() If we use use this code instead of the above: $oShopList = oxNew("oxShopList"); $oShopList->loadSubShopList(3); it is working as expected. | ||||
Additional Information | Thank you for investigating. | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
This is the expected behaviour of the method \oxShop::getSubShopList(). When a shop is a supershop you can assign products to any shop. Hence all other shops are listed using this method. For example: The Mall tab under shipping methods should list all the shops other than the supershop selected. The method \oxShop::getSubShopList() is used here. For the setup mentioned in the "Steps To Reproduce": Shop A - Supershop (ID: 1) Shop B - Subshop of A (ID: 2) Shop C - Supershop (ID: 3) when only B is to be listed as subshop for Shop A, then the \oxShopList::loadSubShopList() could be used. Question: Are there any specific shop functionalities affected due to this method? |
|
Thank you for your quick feedback. The function name suggested, that if I create an object of e.g. Shop A and then call a function by the name "getSubShopList", I would get only the assigned subshops of Shop A. Hence, if I call it on Shop C, I would get an empty list. As I wrote, we already found a workaround. So if this is the intended behaviour, ok; we just found it confusing. |
|
Thanks for the reply. Closing the issue. |