Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Warren Harding 132 posts 275 karma points
    Oct 25, 2021 @ 06:57
    Warren Harding
    0

    GetStore in a JsonResult Controller

    Hi there, I'm clearly too tired - but how do I get the store inside of an ajax (well JsonResult) surface controller?

    CurrentPage.GetStore isn't working.

    Thank you

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Oct 25, 2021 @ 08:10
    Matt Brailsford
    100

    Hi Warren,

    I'm gonna need a bit more context I'm afraid. GetStore sounds like an extension method to me as it's not something we ship in the core, but I believe we do have this helper in the demo store codebase and possibly in Vendr Checkout.

    If you don't have either of these, you might need to check if you have a GetStore extension method of your own defined anywhere in case you've copied a code snippet from somewhere but missed this bit.

  • Warren Harding 132 posts 275 karma points
    Oct 25, 2021 @ 23:47
    Warren Harding
    1

    Ah yes - it is an extension method sorry easy enough to get the store based on the home node's model... so pretty much ignore this

Please Sign in or register to post replies

Write your reply to:

Draft