1

I want to know how shipping step is skipped on checkout page for virtual product. I know virtual product skips shipping step on checkout page but how it it works internally.

Acually I want to apply same functionality for bundle product but firstly I want to know real working of skipping shipping step for virtual product.

1 Answer 1

4

Okay, so you should start with understanding how checkout works:

  1. When you add any product to cart you will create a quote object.
  2. This object contains quote items, which have a is_virtual property.
  3. When you switch to checkout, quote is loaded to a JavaScript model object. This model is used throughout checkout.
  4. The JS quote model has a method called isVirtual() which returns true if all quote items are virtual.
  5. First step of checkout has a Knockout.js visible property which depends on the isVirtual() method. When quote is virtual, then the first step is hidden.

That's it in a nutshell. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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