VbzCart/docs/pieces/checkout/page 3
Jump to navigation
Jump to search
About
This process takes place in /lib/page/ckout/content.php
. I've gone back and forth between two possible confirmation processes:
- Render the confirmation from the Cart data; if approved, convert the Cart data into an Order and submit.
- Advantages: creates fewer junk Order records
- Disadvantages: If there's a bug in the order conversion, we might receive different order data than was approved by the user. Also, slightly harder to debug in that the problem shows up a step later
- Convert the Cart data into an order, then render the confirmation page from the Order data.
- Advantages: ensures data integrity between what the customer approves and what we receive
- Disadvantages: creates more junk Order records
Given this, I decided to keep both versions available and make it easy to switch between them. It may be that once the code is more mature/reliable, we will want to switch to the first method (confirm-from-Cart) -- but for now, it seems like the reliability of the second method is needed. Functions:
RenderConfirm_fromCart()
- confirm then convertRenderConfirm_fromOrder()
- convert then confirmRenderConfirm()
- dispatcher
Screenshot
This shows the general layout of the Order Confirmation page: