24/7 Support: 800.608.6482


Developer Videos

Videos | Understanding The Limited Source Kit

ver.9.0 and later

Video Transcript

Today I want to talk about one of the greatest tools available to you as a Developer building Miva Merchant Modules and it's called the Limited Source Kit, or LSK for short. The Limited Source Kit is exactly what it sounds like. It's the majority, but not all of the source code to Miva Merchant. While Miva Merchant is not an open source product, having a Limited Source Kit gives you a great resource to see the foundational code that makes up Miva Merchant. Using Miva Merchant's API it gives you the extensibility of an open source product without the dangers of having all the source code available for everyone to see. 

When your first starting out building a Miva Merchant Module, the LSK is the best resource available. it provides example code which can be used as a starting point to build your own module which you can then take to build and take and add new features and functionality to. However, even more important than that, you can use it to look up all the functions that are available to you, as well as code samples and snippets you can reuse in your own modules. 

Let's take a look at where you download the LSK as well as a few examples of the source code contained within it. To get this LSK click here. These are the files of the LSK. it contains a lot of the source code of Miva Merchant. Now if I scroll down here to Modules, and here are the different kinds of modules you can create, if I look at say... System, which is a System Extension Module, you'll see you have a sample file and they are all prefixed with "mmlsk" which stands for Miva Merchant LSK and this is "ex" for Example and then System for a System Extension Module. Now if I open this, I can see that this is a MivaScript file that's written in the Miva Script Languages which we'll talk about more in depth in some later videos. However, you can see that it provides me a shell or a template for what a system extension shell looks like. So it has this module description here. This function which is important and required in every module and then there are a bunch of other functions that are here that don't have a lot of code, but it does provide a shell of a system extension module. 

Now, we're going to dive into each one of these functions later and why they need to be there when we talk about the Miva Merchant api. However, for now just know that the LSK contains sample files like these that allow you to get started quickly and easily building a Miva Merchant module. 

Now, I want to talk about one more thing in this video. One of the benefit of the LSK is that it allows you to search for all functions that already exist that you can then use in your module. An example of that is Miva Merchants Database API or our Utilities. We have a library of existing functions that you can call into from your own module to add new features and functionality. 

One other very useful feature of the LSK is you can use it to look up functions that you can use within your module. Here I'm using the sublime text editor. A lot of text editors have this feature. If I go to Find and and Find in Files, here I have the path to the LSK, so the entire source code. I'm going to look for this function called the "Product Load Code." When I hit Enter it will search the entire LSK for that function. So here's there's three different results and here's the one I want. If I double click on this, it will show me this entire function. I can now see what it's actually doing. So it's selecting all from the Products table, where the code is equal to the code you pass in and it also has a couple of parameters. So this is a great way to quickly find functions that you can use within your own code. There's also examples of how to use them which is very very useful. 

One last thing I want to show you in this video, is probably the second most useful piece of documentation besides the Limited Source Kit. That's the module API Documentation. Now this can be downloaded from our web site. This is the entire API Reference Guide that you'll use quite a bit when working with Miva Merchant. Now, we're not going to go through this in a lot of detail. However, this is a great resource when first getting started building Miva Merchant Modules. If I keep scrolling down here I have a section on the Limited Source Kit. It talks about the LSK, about the structure, what all the different folders mean. This is a great resource to understand how the LSK is structured, which really is how Miva Merchant is structured. This will help you quite a bit in understanding some background about Miva Merchant's file structure and the different components that make up the API. 

That's it for this video. These few resources will go a long way in helping you build your Miva Merchant Module. Before we jump into the Miva Merchant API itself, we're going to dig into the language that Miva Merchant is written in, MivaScript and take a look at the syntax of the Miva Merchant language. 

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

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.


Copyright © 1997 – 2024 Miva®, Miva Merchant®, MivaPay®, MivaCon®, Camp Miva®, Miva Connect®, Miva, Inc. All Rights Reserved.