Marketpress as a small POS system - is my idea feasible...?

Ok... so, not a new problem. A user sells online and in their brick and mortar store, and keeping inventory in sync between them is difficult - especially for smaller stores with smaller inventory. There are a few "hack-arounds" to this, but most aren't user-friendly for the cashier - like doing manual orders in the admin.

I'm hashing a plot on making MarketPress handle this, but I wanted to get some feedback on if my plan seems even remotely feasible without any hacks to the actual MarketPress plugin.

Part one - completely doable
Create a new user role of Cashier - user must be logged into the site as Cashier to see or perform any of the "POS" related functions on the site. This would allow a function on the site to only show some pages and widgets to users with the Cashier role and hide the rest of the site content.

Part two - I think this is doable
Since there's no barcode scanner that would tie directly to MarketPress, utilize the SKU or another custom field and a custom search function to allow the cashier to type a short code into the field and have it add that item to the cart. This would basically be like how they do produce at the grocery store. Bananas have a short 4 digit code on them the cashier uses to ring them in. The only part I'm not sure if it's doable is having that "Enter" on the search field automatically add the item to the cart if it's found. I know I can display the product with an "Add to cart" button as a search result, which is still feasible, but it'd be better to eliminate that manual "Add to Cart" button push step for the cashier if possible.

Step three - this is where it gets fuzzy on if it's feasible
I would need to bypass or auto-populate the entire checkout process. I know it will store the values you put in once you check out once, and you can make a user that is for "In Store" purchases, but it's still a bunch of checkout screens and is a very "Hack-around" method that is time-consuming and tedious for the cashier. What would make more sense is if the "Cart" page had a "Submit Order" button instead of a "Checkout" button. The "In Store" user's information could still be submitted so it's not a major hack to Marketpress, but basically would just need to bypass the checkout screens and go straight from Cart to Order Complete and be ready for the next order.

Also - instead of just the basic "Manual Payment" method - track if the customer paid with credit, cash or check and store that with the order. This should be simple on the cashier. Have three fields for payment type:

- They choose credit card type from a dropdown or radio.

- Text field for cash. If they type the cash they were given in a field, it should calculate the change they need to give back (which would indicate for us that it's a cash transaction). A little bit of Ajax and this works fine.

- Or cashier types in a Check Number to choose check (which is fine at this point since they have time while the customer writes a check.)

This part seems doable - it just might need a new part in the database to track that with the transaction to accomplish it if something doesn't already exist. But this should store enough information to trace the purchase to a transaction payment.

So I guess my biggest questions out of all that:
1) Is it possible on a search to automatically trigger the "add to cart"?

2) Is it possible to bypass the "Checkout" screens and complete the order from the "Cart" page?

3) Does anyone have any major flaws to my diabolical plot that would kill it dead right out of the gate...?

  • Ash
    • WordPress Hacker

    Hello there

    I hope you are well today and thanks for asking the question.

    About #1: You can trigger a click function on the add to cart button if that is a search result page.

    About #2 and #3: I am not quite sure but I am letting the other stuffs know, if they can come up with any idea.

    Cheers
    Ash

  • christina_hooper
    • Site Builder, Child of Zeus

    Thanks for the feedback.

    I think out of the 3, that #2 is the one I'm the most uncertain about how to accomplish or work around in a way that wouldn't make it to complex for a cashier to operate quickly while a customer is standing in front of them.

  • Ash
    • WordPress Hacker

    About #2, we can use a hack. As you don't need user's email, address etc we can fiil that up with dummy data. Please add the following line your theme's functions.php:

    add_action('wp_footer', 'disable_checkout_page');
    function disable_checkout_page() {
    	if('YOUR_CHECKOUT_URL' == curPageURL()) {
    	?>
    	<script type="text/javascript">
    		jQuery(function($){
    			$('input[name=email]').val('test@test.com');
    			$('input[type=text]').not('input[name=email]').val(11251);
    			$('#mp_state').find('option[value="AL"]').attr('selected', 'selected');
    			$('#mp_shipping_submit').click();
    		});
    	</script>
    	<?php
    	}
    }
    
    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
      $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return $pageURL;
    }

    Hope it helps! Please feel free to ask more question if you have.

    Cheers
    Ash

  • christina_hooper
    • Site Builder, Child of Zeus

    Hmmm... that does seem to work... sort of.

    I enabled Manual Payments as my only gateway, and I had to copy the part that tests the url over a couple of times to get through the payment and confirm checkout steps, but it does work to kind of "auto-skip" through the checkout process.

    I'll do some more testing to make sure I can test on the current user's role so this "skipping" only happens on "Cashier" users and not general site users. I'll have to make Manual Payments only available to the "Cashier" user role too, but I think that's doable.

    I have to see if there's a way to store the type of payment they made with the order too, but I think that's possible.

    AND maybe, just maybe, I can Ajax the calls to the other pages that complete the checkout... maybe... and not have the cashier sitting there watching it jump through screens.

    This definitely gives me some ideas that it might be possible to accomplish this though. Thank-you!!

  • Ash
    • WordPress Hacker

    Yeah, it's something like auto skip, in fact it will fill up the checkout form and then submit in the background. But, I am pretty much confused if MP allows you to go to next step without filling the form, but yes - worth a try.

    Let me know, if you need more help on it.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.