No announcement yet.

Accessing the store DB from JavaScript?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing the store DB from JavaScript?

    I need to make a small custom element that will help shoppers compare products.

    I know I can rely on jQuery to do an AJAX load of the other product page, parse the page and then display the elements I want in the specified area. Yet this seems a "long way to go" when the store is already using an API.

    I'm trying to sort through the developer docs to get the information about the store API so I can try to access it directly.

    If there is a better way using MivaScript to do access this API I'm open to that option.

    Is there a particular part of the docs I should be reading?

  • Not sure what you mean by accessing it directly, but you'd never want to bypass using Miva Merchant as your gateway to the database. You can use raw mivascript reads/writes/etc to manipulate the data...but be very careful if you are doing updates to miva tables as many have large numbers of dependencies (which the api naturally handles). (See for the raw functions.)
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook


    • Good points, Bruce.

      I'm looking to get the data, a view only if you will. Once I have it I'll just display it, and do a little on page JavaScript manipulation, nothing that would be pushed back to the store or the server.

      It's very possible I'm over complicating things, I was just curious how or if the idea would work.



      This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

      This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.