Difference between revisions of "VbzCart/pieces/checkout/page 3"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | pieces‎ | checkout
Jump to navigation Jump to search
(Created page with "This shows the general layout of the Order Confirmation page: File:2019-08-29.screenshot.VBZ checkout page 3.png")
 
 
Line 1: Line 1:
 +
==About==
 +
This process takes place in <code>/lib/page/ckout/content.php</code>. 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:
 +
* <code>RenderConfirm_fromCart()</code> - confirm then convert
 +
* <code>RenderConfirm_fromOrder()</code> - convert then confirm
 +
* <code>RenderConfirm()</code> - dispatcher
 +
==Screenshot==
 
This shows the general layout of the Order Confirmation page:
 
This shows the general layout of the Order Confirmation page:
  
 
[[File:2019-08-29.screenshot.VBZ checkout page 3.png]]
 
[[File:2019-08-29.screenshot.VBZ checkout page 3.png]]

Latest revision as of 00:56, 21 October 2019

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 convert
  • RenderConfirm_fromOrder() - convert then confirm
  • RenderConfirm() - dispatcher

Screenshot

This shows the general layout of the Order Confirmation page:

2019-08-29.screenshot.VBZ checkout page 3.png