- Priority: 0
- Status: Closed
- Theme: Venedor
-
Assigned To:
Marek
- Private: No
- Open Date: 30.03.18, 10:48
- Opened by: Aris Schlingmann
- Closed by: Marek
- Closed on: 10.05.18, 23:41
- Reason: Closed
- Comment: Glad to help!
Ticket #11948 - Wrong shop context when updating menu
When using the menu builder in a multi shop, the code for updating a menu via AJAX is using the wrong shop context (always using shop 1).
See pk_menu/ajax_pk_menu.php.
- Select another shop than the default one in PrestaShop
- Go to Promokit → Venedor Menu
- Create a menu and select “Build submenu” - Create some columns
- Now try to change the change the column positions using drag & drop.
- The updated positions are not saved because the wrong shop_id is used in the queries.
Hope you can help us out!
Comments
I’ll check that and try to fix as soon as possible
I just make a could of tests on our demo server and localhost and I do not see the issue. I only noticed it could be in case your shop is in maintenance mode
That’s strange, I do have the issue both on my localhost (no maintenance mode) and online (maintenance mode) environments. However, the code in ajax_pk_menu.php uses standard PrestaShop session/context initialization, so there is not much you can do, I think. I’ll be using a temporary fix for my environment, so you can close this issue.
Thanks for your help!
What is your fix? maybe I understand what’s wrong if you will share it with me
Thanks for thinking along.
My fix is to use the back-office init.php instead of the front-office init.php. It works, but it’s no clean solution because I can’t get the admin directory properly, see below…
First lines of ajax_pk_menu.php
Thank you, I’ll check that out