Limit Transactions to certain states

I'd like to exclude any users from California or Texas from purchasing our products. How do I accomplish this?


I can give you steps to do it, you need to do coding against it:

  • First you need to show a popup through header file (Use in header to appear it on all pages not just home page)
  • Popup will get area of user
  • Popup then send a request to a controller through ajax
  • Controller will validate input of user and create a session/cookie against given value
  • Now before showing popup again, you need to check if session/cookie is assigned, if it is assigned then you wont show popup again
  • In add to cart file, you can add check of you session/cookie and hide add to cart and quantity from product page
  • You can also add this check in cart initialize and checkout initialize event (Check available events list for this) or you can simple add this check on controller and redirect user to home with a splash message that you can't order from California or Texas

Hope this will help you out

Similar questions

Magento: A question about collection LIMIT by the way "Zend Db limit"
There are several ways to limit collection for magento you could find here Magento: Set LIMIT on collection. I tried the best answer, both ways work well. But when I am trying, I met a question is about the "Zend Db limit" way. When I use the "Zend Db limit" way like below, it works well. But if I use the way like follows, it doesn't work. I do not...
Magento Errors limit (100) reached. How to increase limit?
I am getting an error on my upload file for magento. Product Type is invalid or not supported in rows: 8473, 8474, 8475, 8476, 8477, 8478, 8479, 8494, 8495, 8496, 8497, 8515, 8516, 8517, 8518, 8519, 8520, 8521, 8522, 8552, 8553, 8559, 8562.... Errors limit (100) reached. Please fix errors and re-upload file is there a way to increase the errors lim...
What is a good method to handle suspected fraudulent transactions with
I have a client who has, in the past, used the Saved CC payment method on their store (despite attempts to persuade otherwise) for the single purpose of having convenient access to their CC data in the case that they suspect an order may be fraudulent. They would check each order manually, and for orders from international customers (or other appar...
How to change the default order status of Paypal transactions
When a customer places an order using Paypal the order status becomes processing. I want it to be pending. I tried to change the default order status in app/Core/code/Mage/Paypal/etc/config.xml but that did not work.
How to add a order to Transactions and billing agrrements?
I’m new to Magento. I know the little bit of definition about transactions and billing agreements modules under sales module. Transactions: sometimes customer calls to the site admin and order some item at that time we can use to transaction details. Billing agreements: billing agreement use when customer purchase item EMI based at that we can use ...
A single report containing credit card types and transactions
Not a Magento expert here, but gotta figure this out. My team wants to be able to see a report in Magento that puts the credit card type next to each transaction all in one sheet. we can click in to each order, but as we increase in number of transactions, this will be too time consuming. Can someone help us figure out if this is at all possible? T...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.