Juanmaria Posted January 22, 2014 Share Posted January 22, 2014 (edited) Hi, When working on a multi-shop environment all the existent catalog price rules appear on the backoffice list notwhistanding the operator permissions or the shop selected, so one operator with permissions only for shop "A" can see, change and delete rules for shops "B", "C", etc. This problem has bugged me a lot and I've made this little code to fix it. In override/controllers/admin/AdminSpecificPriceRuleController.php I add this function: public function init() { parent::init(); if (Shop::getContext() == Shop::CONTEXT_SHOP) { // Hay seleccionada una tienda $this->_where = 'AND s.id_shop = ' .(int)$this->context->shop->id; } } And that's all. Dont forget to delete cache/class_index.php before testing it if you're using 1.5.6.0 or so. Hope it helps somebody. Greetings from Spain. Juan María. Edited January 22, 2014 by Juanmaria (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted January 22, 2014 Share Posted January 22, 2014 Juan, thanks for sharing. Could you please report this via ps forge? Otherwise all your good work will be lost for future fix releases. login or create an account here http://forge.prestashop.com http://screencast.com/t/6KLOcktoXmR Link to comment Share on other sites More sharing options...
Juanmaria Posted January 22, 2014 Author Share Posted January 22, 2014 Hi, There was already a report at: http://forge.prestashop.com/browse/PSCFV-3389?jql=text%20~%20%22catalog%20price%20rules%22 I've posted there a link to this thread. Thank you. 1 Link to comment Share on other sites More sharing options...
Recommended Posts