PDA

View Full Version : An Introduction


mgersting
06-05-06, 06:40 AM
Hey everyone,
I apologize if this topic has been discussed before but I am having the worst time trying to navigate Miva's information. I'm a web developer taking on a Miva-related project for a client and I'm trying to get my feet wet. I believe I will need to do some MivaScripting for Miva 5, but I'm trying to get some pointers.

Here are my questions:
1) I would like to test everything locally. So that means I should install Mia and Miva Merchant 5? I have installed Mia, but is there a developer version of Merchant? If so I cannot find it.

2) It seems like according to this page (http://smallbusiness.miva.com/support/docs/api/) that Miva Script is only compatible with Miva 4. Is that so, or does it work with Miva 5?


Any help you guys can give me to clear up the obvious issues would be awesome.....thanks so much in advance.

Keith Hunniford
06-05-06, 06:57 AM
No apology required.. the docs have not yet caught up with the technology.

1) It is typical to FTP download the MIVA Merchant MM5/ scripts directory to your PC and run it under Mia for your development environment. In the "old days" one used to drag down the data files too ( when they were just .dbf files ) but that is less of an option now as most stores run on MySQL. Perhaps someone else will chime in on that one.

2) The MIVAScript documents are drastically out of date. There is currently no reference to the syntax for the commands to hit MySQL / SQL databases.. it's an issue. There are docs for the MIVA Merchant API though..

http://docs.smallbusiness.miva.com/en-US/merchant/api/api_docs.htm

Best

Keith

mgersting
06-05-06, 07:05 AM
Thanks for the info, Keith.
That begs a couple questions to me:

1) When you say it's typical to download the MM5 scripts - where do I get those and what is that accomplishing? Is that the same as "installing" MM5?

2) If the scripting documentation is out of date, are there any references you would recommend? Places to look or anyone else who has figured it out that has perhaps posted the information?

Keith Hunniford
06-05-06, 07:10 AM
1) Yes, effectively, if you have the files at your disposal. Typically most people have MM5 bundled with their hosting account, so they don't have a zip of the files.. So, you just download the MM5 directory from the server, and run setup.mvc

2) I'm looking for the same thing.. and it's tough. Mark.. are you reading this? Julie, can you forward to Mark? Any chance of a quick post of how to use the Mv command syntax for the database related commands?

Keith

Vic - WolfPaw Computers
06-05-06, 07:11 AM
In order to use Mia, you must download your existing store and use its data.

However, it is extremely limited. You're best bet is to develop online, or ask your host to create a dev store for you - assuming you are with a MIVA Hosting Specialist and they offer this to their clients.

Mia is a waste of time.

MivaScript docs are good, however you will still need to download the MivaScript compiler if you want to incorporate your custom scripting into your store. You will also need to understand how modules work. You can also create your own components.

Docs for MM5 and the API are sorely lacking.

mgersting
06-05-06, 07:15 AM
OK....that's definitely a place to start!
I feel like the code I need is relatively straight forward, just need to get some of the tools in place :)

Julie Wilber
06-05-06, 08:30 AM
I'm actually out of the office until Thursday, but I will drop Mark a note to make sure that he sees this. :)

Thanks!

djlins
06-05-06, 01:37 PM
Hiya sting, I have just started getting my feet wet with this as well (they are at the damp stage at the moment).
I am not going to pretend that I know too much about it, but I do think it is worth getting MIVA Mia. I have had good experiences with that so far and it allows me to make quick changes and see them straight away on my laptop and work offline.

Is it temporamental Vic? Why would you advise not using it to develop with?

Anyway I would say download it and decide for yourself if it is helpful to develop with or not.

Cheers,

Lins.

aGorilla
06-05-06, 05:46 PM
Personally, I think developing without Mia is a complete waste of time. There are a couple of minor inconsistencies (minor bugs with time and handling external javascript files), but other than that, it's tough to beat the 'save, alt-tab, reload' approach. Having to ftp before you can reload is likely to slow that down quite a bit.

For modules, Jeff Huber has generously put together an excellent reference (http://4thebest.net/miva-merchant-5-api/miva-merchant-5-module-api-toc.html).

DanLynn
06-06-06, 08:22 PM
I've only gotten to look through some of this, but so far it is fantastic.

Since it seems Miva's support techs are looking through these forums (thank you for that by the way), could I suggest that Miva puts out something like this?

mvmarkus
06-06-06, 10:27 PM
2) I'm looking for the same thing.. and it's tough. Mark.. are you reading this? Julie, can you forward to Mark? Any chance of a quick post of how to use the Mv command syntax for the database related commands?

Keith

Hi keith,

Actually, regarding MySQL there aren't really many new things in there that aren't in the old standard Mivascript docs - most things that work for ODBC now works with MySQL. The MySQL-views and queries use the '?' as variable replacement; like in:

<MvOPENVIEW
NAME = "{ l.schema }"
VIEW = "v"
QUERY = "SELECT * FROM products WHERE id=? AND price>?"
FIELDS="l.prod_id,l.min_price">

New tags are MvCOMMIT, MvCOMMAND, MvROLLBACK command (I probably missed some), which are documented in the readme-file that came with EmpresVM 5.3 or 5.4 (which is a cumulated readme of all 5.x changes). Of course, the readme files don't come with any examples.

Markus

Keith Hunniford
06-06-06, 11:46 PM
Hi keith,

Actually, regarding MySQL there aren't really many new things in there that aren't in the old standard Mivascript docs - most things that work for ODBC now works with MySQL. The MySQL-views and queries use the '?' as variable replacement; like in:

<MvOPENVIEW
NAME = "{ l.schema }"
VIEW = "v"
QUERY = "SELECT * FROM products WHERE id=? AND price>?"
FIELDS="l.prod_id,l.min_price">

New tags are MvCOMMIT, MvCOMMAND, MvROLLBACK command (I probably missed some), which are documented in the readme-file that came with EmpresVM 5.3 or 5.4 (which is a cumulated readme of all 5.x changes). Of course, the readme files don't come with any examples.

Markus

Ahah! Well that makes sense. I can't look at the docs from where I am right now, but never thought to look at the docs from an ODBC perspective.. comes of assuming that I knew everything pre-5 ;-)

I'm still hoping to be able to twist some arms and get an appendix / addendum to the current docs to bring SQL more into context.

Thanks

Keith

mvmarkus
06-07-06, 12:03 AM
I'm still hoping to be able to twist some arms and get an appendix / addendum to the current docs to bring SQL more into context.

Keith

LOL, who isn't???

markus

mgersting
06-07-06, 04:41 AM
I've got Mia up and running and I've downloaded the files from my web server so I can try to start playing with stuff on my local machine. Do I have to purchase a license to setup a store on my local machine?

aGorilla
06-07-06, 04:47 AM
You _shouldn't_ have to. Most license checks are kind enough to ignore Mia.

You may, however, have to make minor adjustments to domain.dbf and/or config.mv(c).

mgersting
06-07-06, 04:56 AM
hehe...it wasn't very kind to me. i tried leaving it blank, no luck. and i tried using the license number from my actual online store and it said the license was non-transferable.

those files are compiled...how do I make adjustments to them?

i downloaded the script compiler and it installed but i don't know where to...lol.

i swear i'm not stupid.

mgersting
06-07-06, 04:59 AM
scratch that on script compiler...found it and setting it up.

is that what i need to view the uncompiled scripts?

djlins
06-07-06, 11:39 AM
Hi again. I view and edit the uncompiled scripts (.mv files) in notepad and then the script compiler is a command line program to turn it into the .mvc file to import into MIVA as a module.
The instructions on the compiler are very good and as long as you set up the path and other attributes correctly then you shouldn't have any real problems with it. You just go to the folder of the .mv file and type
MVC DOODAA.MV
and hey presto DOODAA.MVC appears :)


Cheers,

Lindsay.

Vic - WolfPaw Computers
06-07-06, 04:41 PM
If you want to run your Merchant store locally on your PC, you need to download the entirety of your Merchant2 and mivadata folders.

The license key will work, but only with that installed version of your store. You cannot do a new install on your PC and expect a license key that has already been used to work.

You can view uncompiled scripts in any text editor. Nothing special there. Many of us like TextPad for editing script.

The compiler is needed to compile your uncompiled source code, into a compiled script Empresa can read.


hehe...it wasn't very kind to me. i tried leaving it blank, no luck. and i tried using the license number from my actual online store and it said the license was non-transferable.

those files are compiled...how do I make adjustments to them?

i downloaded the script compiler and it installed but i don't know where to...lol.

i swear i'm not stupid.

mgersting
06-07-06, 08:51 PM
That's understandable, Vic. But what's not (at least in my opinion) understandable is why Miva wouldn't provide a developer version that didn't not require a license and was restricted to requests being generated from the same IP.

Also, I understand regarding the compiled/uncompiled files - aGorilla had mentioned making adjustments to certain files that come compiled - that's why I was asking about the possibility editing those files.