1

I have to develop an option which customer can do a quick order.

In here, the customer can use product SKU and order quantity to add items to cart.

How can I implement that on my home page?

I need to check whether inserted SKU is valid/available and quantity is no need to check whether exceed the available stock or not. Need to check SKU and get SKU and quantity from the input box and dropdown respectively. then on button click, I need to add the selected quantity of selected item into cart.

My interface would seem like this:

Order by SKU

2

I assume that you are aware of how to create a module in Magento 2. I will point out the steps only:

  • Create a controller action in which you can check the existence of product by SKU. Send an Ajax request on key up or key down event to that controller's action.

I don't think that there is any need to check product's available quantity in advance. You can check it at the time of adding the product to the cart.

  • Create another controller's action to add the product to cart and send the request to that action when add to cart button is clicked.

Please let me know if you have any questions.

| improve this answer | |
  • Hi @Mohit Kumar Arora can you please explain more? Im not expert magento developer – Joey Sep 27 '17 at 11:00
  • Anybody can help me with this please? – Joey Oct 12 '17 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.