PDA

View Full Version : "Jason has a copy of the Tool Kit...example"??


max
09-07-06, 11:32 PM
I am hoping to find Jason and maybe if an example of using the toolkit with a blog. I am trying to figure out how to put a blog on our site that allows people to join it and leave a review. But I am a visual person and would like to see how it would work.

wcw (http://extranet.miva.com/forums/member.php?u=63) vbmenu_register("postmenu_19713", true);

Posted: Today, 04:05 PM

http://smallbusiness.miva.com/forums/images/reputation/reputation_pos.gif

If you use something like the Emporium Plus Tool Kit you would call the external program directly into your page. So when the chosen page comes up, the blog would be in the middle of it as if it is part of your store. The callurl function lets you call any external program and pass variables (settings) to it. Jason has a copy of the Tool Kit so maybe he has an example of using it with a blog like wordpress.

Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS (http://www.emporiumplus.com/mivamodule_wcw.mvc?Screen=SPTS)

Brandon MUS
09-07-06, 11:45 PM
In Miva 5, why not just call the database directly? Leave Miva out of it, speed things up and use your own SQL. I do this a lot in our site (in fact I have rebuilt the product display and customer login in PHP).

max
09-07-06, 11:49 PM
Thank you Brandon, what do you mean by call the database directly? I don't understand databases and so I don't know how that can create a blog/review. Can I view your site to see what you have created?

Thank you!

Brandon MUS
09-07-06, 11:56 PM
Looking at my site, you'd more or less see a basic miva page. What you wouldn't see is the backend technology that greatly improves the functionaly for us because of how we operate.

What I mean by doing a direct call to the database is write your own SQL. For example, you could write some php like this:
<?php
//make a connection to miva
$miva_db = mysql_connect("localhost", "DB_USERNAME", "DB_PASSWORD") or die(mysql_error());
mysql_select_db("DB_NAME", $miva_db) or die(mysql_error());

/* now you can make whatever query you want */

//get some basic product info
$product_select = "SELECT
s01_Products.id
, s01_Products.code
, s01_Products.name
FROM
s01_Products
WHERE
s01_Products.code = '".$product_code."'

$product_result = mysql_query($product_select, $miva_db);
$product_fetch = mysql_fetch_array($product_result);

echo($product_fetch['name']);
?>

anything in all caps you'd need to get from your host. If you choose to go this route, I'd create a seperate mySQL user for this for security purposes (and limit DROP privelages, etc. if you can).

Also, I forgot to mention that this method requires the mysql api and not the mivasql...

I can give you some better instructions if this is within your realm.

max
09-08-06, 12:03 AM
Wow...that is very much out of my realm. Our miva store has mivasql but the host offers mySQL. I have a lot to learn about databases and php, that it still above my head.

Thank you though.

Brandon MUS
09-08-06, 12:06 AM
If your store isn't established yet, I'd highly recommend changing to mysql instead of mivasql. mySQL is much faster and is IMO a much more developer friendly platform. Once you chose your database type already, I don't think there is a way to convert though.

max
09-08-06, 01:08 AM
Unfortunately, the store is already established.

Thank you for your help Brandon.

max
09-11-06, 11:04 PM
Still hoping to find Jason for example

Thank you!:D

max
09-11-06, 11:08 PM
This is the thread I am referencing:

http://extranet.miva.com/forums/showthread.php?t=3773&page=2