0

On a magento site I've been working on a seperate store was set up for certain users (limited access etc). One function allows the user to create an order for a customer. Before they do this they must select which store they are using. This determines the list of products that are returned in the manually create order section.

From here one option that is available is to give a discount. I basically want to create a condition that if store-id != x display this. The trouble I'm having is getting the selected store id. In the backend the store-id is always 0 so I can't pull that. I need a way to find what option was selected.

I assume it's in the session somewhere but I haven't been able to find it.

  • to get current store id Mage::app()->getStore()->getId() – Sohil Desai Dec 17 '13 at 5:47
  • the store id in the admin is always the same. Doing that would give no indication of what the user had logged in through – develophper Dec 17 '13 at 11:37
2

As a temporary measure I created a listener for which option is selected when choosing the store you wish to use. All of the steps between here and the order are done through ajax so I created a global variable that is checked. If it is set to false then I disable some html using a javascript function.

This works fine unless the page is reloaded. If the page is reloaded the variable is lost so I will be looking at other options when I get a chance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.