PDA

View Full Version : Questions about Miva 5



Chimichanga15
06-01-2005, 01:43 PM
I'm about to begin creating my first website with e-commerce, and being a WestHost user, Miva seems like a logical choice. I have a couple questions about its capabilities though before I choose:

1. My client would like two versions of a store: one for service providers, and one for pool owners. He would like the pool owners' store to be basically a subset of the service providers' store, but would only have to update a product in one place in order for both stores to be updated. Would it be possible to have, for instance, certain categories be omitted from one store?

2. My client would like one of the versions of the store to be browseable by anyone, but would require registering (with the client's company, not with a credit card or whatever to buy things) to actually buy products. I am fairly experienced with PHP and registering and such, so could I make it so that depending on whether the user is registered or not it would display or not display the buttons to check things out?

Thanks in advance.

rispku
06-04-2005, 01:38 PM
1. My client would like two versions of a store: one for service providers, and one for pool owners. He would like the pool owners' store to be basically a subset of the service providers' store, but would only have to update a product in one place in order for both stores to be updated. Would it be possible to have, for instance, certain categories be omitted from one store?


Take a look at Merchant's Availability Groups (http://smallbusiness.miva.com/support/tips_tricks/tips.mv?tip=/support/tips_tricks/tips/21.html&title=Tips%20%26%20Tricks%3A%20Use%20Avail ability%20Groups%20to%20Offer%20Special%20Products %20to%20Customers) feature.



2. My client would like one of the versions of the store to be browseable by anyone, but would require registering (with the client's company, not with a credit card or whatever to buy things) to actually buy products. I am fairly experienced with PHP and registering and such, so could I make it so that depending on whether the user is registered or not it would display or not display the buttons to check things out?

You might need a module to do this.
Merchant can be setup to only allow users registered in it's database to order products. If you want users to only have to register in one place, you'd have to create your own account page/script. While PHP can write to Merchant's databases (they're dbase databases), they (the folks at php.net) strongly caution you against writing to dbase files. If you can come up with some way of doing it safely, you'll find that Miva has full documentation for Merchant's database (http://smallbusiness.miva.com/docs/api/db_HTML/MMdb4x.html) on their site.

Chimichanga15
06-07-2005, 09:37 AM
1. Availability Groups look great. Thanks.

2. a) It does look like directly modifiying Miva's databases could be a little dangerous; however, I do need some information about the customers that Miva does not have. Therefore, it looks like I'll need two databases, but I would like users to not have to deal with two accounts. Would it be possible to have users register using a system I create, then have that system create/update entries in Miva's databases through its pages (so that I'm not messing with the databases directly)? If this works, then could I have the system I create log in registered users to Miva, so that they can log in with my system, then have that effectively log them into Miva so that they can buy stuff?

b) It appears you put a lot of Miva components in with some code like "<mvt:item name="proddesc" />". Do you also do this with the "Add to Cart" and "Check out" buttons, and if so, could you display them conditionally using some code like "if (user registered) print '<mvt:item name="checkout" />';"?

rispku
07-04-2005, 10:43 AM
Would it be possible to have users register using a system I create, then have that system create/update entries in Miva's databases through its pages (so that I'm not messing with the databases directly)? If this works, then could I have the system I create log in registered users to Miva, so that they can log in with my system, then have that effectively log them into Miva so that they can buy stuff?

That's a pretty good idea.
One way of doing it would be to copy the form on Merchant's customer add/edit page (screen=acnt) into a new file, remove the session ID from the form action, and then have your system redirect the user to this page after creating the account in your database. Then you could use PHP to insert their data, from the post data, into the form, and use Javascript to automatically submit the form.

Did that make sense? ;)


b) It appears you put a lot of Miva components in with some code like "<mvt:item name="proddesc" />". Do you also do this with the "Add to Cart" and "Check out" buttons, and if so, could you display them conditionally using some code like "if (user registered) print '<mvt:item name="checkout" />';"?

That's SMT from Merchant 5. I'm not really familiar with most of what it can be made to do, but I think something like that may be possible.