Jump to content

Bug of the multistore: Customer->contacts displayed for every shops


Recommended Posts

Hi,

 

The customer contacts displayed in the drop down form and available in

customer -> contact

are showing up for every shop, depsite being setup for a single group shop.

 

In other words I have shops:

- group A

- shop 1

- shop 2

- group B

- shop 3

- shop 4

- shop 5

 

and contacts

webmaster1 & customerservice1 for group A

webmaster2 & customerservice2 for group B

 

Unfortunately webmaster1 & customerservice1 & webmaster2 & customerservice2 are displayed on the contact form.

 

Any idea how to fix this?

 

Thanks,

Link to comment
Share on other sites

  • 2 weeks later...

Hi. maybe this will help you.

 

I use prestashop in the multistore context and have created an Owner employee who is responsible for each individual shop. I noticed that no matter who logs in, they have full access to products, customers and order from other shops.

 

The multi-shop bar also shows an "All Shops" option that changes the shop context no matter who is logged in and gives them access to all shops.... huge bug..

 

To fix this I copy the function, "initShopContext", from classes/controller/AdminController.php to a new function in overide/classes/controller/AdminController.php and modify line 1657 to:

 

# Shop::setContext(Shop::CONTEXT_ALL);

Shop::setContext(Shop::CONTEXT_SHOP);

 

Though this is just a tempory fix, I have still to un-tanlge the spider web of if's and else's in this initShopContext function to come up with a more stable fix.

 

I do appreciate what the prestashop guys have done but they should really look at some form of unit-testing and I am not a fan of they way they have structured their controllers. I know in their documentation they have steered away from frameworks like Symfony and Cakephp but there are some key points that Prestashop could have taken from these frameworks. Two of those would be Restful controllers, this would have made code-maintenence much easier and a standardized naming convention for table names, as in either pluralize or singular not both.

Edited by snajuro (see edit history)
Link to comment
Share on other sites

"The multi-shop bar also shows an "All Shops" option that changes the shop context no matter who is logged in and gives them access to all shops.... huge bug.."

 

-> I don't have that bug in 1.5.0.13

 

The post here was related to contacts displayed in the contact form on the front end

"available in

customer -> contact"

 

Not sure whether you're discussing the same thing....

Link to comment
Share on other sites

×
×
  • Create New...