Jump to content

How To Set Minimum Order Validation


sebgonz

Recommended Posts

Hey everyone. I'm working on a Wordpress site that uses the WP-eCommerce plugin, and I was wondering if any of you could point me in the right direction for creating a little hack. The plugin is great, but it lacks the functionality to set a minimum order amount. For example, I want to set it so the transaction can't take place unless the customer has at least 12 items in the shopping cart. Where would I begin? If there's anything you need from me, just let me know and I'll get it to you asap.

Link to comment
Share on other sites

Have you asked this on the WP e-commerce forum? http://getshopped.org/forums

 

This could be complicated -- it most likely would involve some PHP knowledge and editing the plugin itself (and then either never updating the plugin, or updating and then re-adding any changes back in.)

 

It's probably something that I could take care of, but my free time is pretty limited at the moment and I'd need to charge for my time. PM me if you're interested. Otherwise, perhaps you'll find the answer via the GetShopped forums or by doing some web searching.

 

Another option would be to check and see if any other WP ecommerce plugins (http://shopplugin.net/ or http://www.phpurchase.com/) have that sort of functionality built in. Of course, if you've spend a significant amount of time working with WP e-commerce, perhaps that isn't really an option at this point. This shopping cart solution http://tribulant.com/plugins/view/10/wordpress-shopping-cart-plugin says that it does minimum orders, but I've never heard of it and I don't know how easy it is to work with or if it's a quality plugin.

Link to comment
Share on other sites

Yes, I've checked the WP e-commerce forum. Many people have the same question, but no one is providing a solution. I have some PHP knowledge, and it doesn't actually have to be a setting in the administration of the plugin. It can be some backend code that just verifies it silently. I just don't know where I would begin with something like this.

Link to comment
Share on other sites

Probably the easiest way would be to edit whatever PHP file within the plugin controls the shopping cart page. You'd need to find the bit of code that displayed the "check out" or "continue" button (whatever it is called) and add some PHP logic that checked how many items were currently in the shopping cart and disabled that button/showed an error message until the minimum number of items were added.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...