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.


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

  1. When You add any prodcut to cart you will create a Quote object
  2. This object contains a quote items, which have a isVirtual property
  3. When you switch to checkout, Quote is loading to Knockout.js model. This model is using in all checkout.
  4. Quote model has a method called "isQuoteVirtual" which return true if all quote items are virtual
  5. First step of checkout has 'visible' property which depends on the isQuoteVirtual method. When Quote is virtual, then 1-st step is hidden

It's all in a nutshell :)

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.