Difference between revisions of "VbzCart/pieces/checkout/archive"

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
(outdated stuff)
 
(moved code flow here)
Line 1: Line 1:
 
==Other Pages==
 
==Other Pages==
 
* [[vbzwiki:VbzCart/checkout]]: what the checkout sequence looked like in the Perl version
 
* [[vbzwiki:VbzCart/checkout]]: what the checkout sequence looked like in the Perl version
 +
==Code Flow==
 +
===Form Render===
 +
* '''page/vbz-page-ckout.php''' class vcPageCkout protected function '''RenderShippingPage()'''
 +
** '''cart/cart-shop.php''' vcrCart_ShopUI public function '''RenderShippingPage()'''
 +
*** $oCDMgr = $this->FieldsManager();
 +
*** $oCDMgr->FetchBlob();
 +
*** $oCD_Buyer = $oCDMgr->BuyerObject();
 +
*** $oCD_Recip = $oCDMgr->RecipObject();
 +
*** $oCD_Buyer->RenderContact(TRUE) // edit email/phone
 +
**** '''cart/cart.data.fg-ep.php''' trait vtCartData_EmailPhone public function '''RenderContact()'''
 +
*** $oCD_Recip->RenderShipping(TRUE) // edit shipping address / instructions
 +
**** '''cart/cart.data.fg.recip.php''' class vcCartData_Recip public function '''RenderShipping()'''
 +
***** $this->LoadShippingFields();
 +
* '''page/vbz-page-ckout.php''' class vcPageCkout protected function '''RenderBillingPage()'''
 +
** '''cart/cart-shop.php''' vcrCart_ShopUI public function '''RenderBillingPage()'''
 +
*** $oCDMgr = $this->FieldsManager();
 +
*** $oCD_Buyer = $oCDMgr->BuyerObject();
 +
*** $oCD_Buyer->RenderPayment(TRUE) // edit payment information
 +
**** '''cart/cart.data.fg.buyer.php''' class vcCartData_Buyer public function '''RenderPayment()'''
 +
 +
===Form Capture===
 +
''archived 2018-09-16 - refers to obsolete file/class names''
 +
* '''page/vbz-page-ckout.php''': class clsPageCkout function '''CapturePage()'''
 +
** '''page/vbz-page-ckout.php''': class clsPageCkout function '''CaptureShipping()'''
 +
*** $rcCart->CaptureShippingPage();
 +
**** '''cart/cart.shop.php''': class vcrCart_ShopUI function '''CaptureShippingPage()'''
 +
***** $oCD_Buyer->CaptureContact();
 +
***** $oCD_Recip->CaptureShipping();
 +
****** '''cart/cart.data.fg-na.php''': trait vtCartData_NameAddress function '''CaptureShipping()'''
 +
******* $this->InvokeNameAddressFields();
 +
******* $this->ReceiveForm();
 +
***** $oCDMgr->FetchBlob();
 +
****** '''cart/cart.data.mgr.php''': class vcCartDataManager function '''FetchBlob()'''
 +
******* $sBlob = $this->GetBlobString();
 +
******* $this->SetBlobArray(...)
 +
***** $oCDMgr->UpdateBlob($oCD_Buyer);
 +
***** $oCDMgr->UpdateBlob($oCD_Recip);
 +
***** $oCDMgr->StoreBlob();
 +
****** '''cart/cart.data.mgr.php''': class vcCartDataManager function '''StoreBlob()'''
 +
******* $sBlob = serialize($this->GetBlobArray());
 +
******* $this->SetBlobString($sBlob);
 +
** '''page/vbz-page-ckout.php''': class clsPageCkout function '''CaptureBilling()'''
 +
*** $rcCart->CaptureBillingPage();
 +
**** '''cart/cart.shop.php''': class vcrCart_ShopUI function '''CaptureBillingPage()'''
 +
***** $oCD_Buyer = $oCDMgr->BuyerObject();
 +
***** $oCD_Buyer->CapturePayment(); // card #/exp, and I *think* name/address
 +
***** $this->AddMissing($oCD_Buyer->GetMissingArray());
 +
***** $oCDMgr->FetchBlob();
 +
****** '''cart/cart.data.mgr.php''': class vcCartDataManager function '''FetchBlob()'''
 +
******* $sBlob = $this->GetBlobString();
 +
******* $this->SetBlobArray(...)
 +
***** $oCDMgr->UpdateBlob($oCD_Buyer);
 +
***** $oCDMgr->StoreBlob();
 +
****** '''cart/cart.data.mgr.php''': class vcCartDataManager function '''StoreBlob()'''
 +
******* $sBlob = serialize($this->GetBlobArray());
 +
******* $this->SetBlobString($sBlob);
 +
***** $this->Save();
 +
 +
InvokeNameAddressFields() defines which fields are handled.
 
==Address Resolution==
 
==Address Resolution==
 
''These notes no longer apply, as the cart-to-order process was completely rewritten in 2015-2016.''
 
''These notes no longer apply, as the cart-to-order process was completely rewritten in 2015-2016.''

Revision as of 15:26, 16 September 2018

Other Pages

Code Flow

Form Render

  • page/vbz-page-ckout.php class vcPageCkout protected function RenderShippingPage()
    • cart/cart-shop.php vcrCart_ShopUI public function RenderShippingPage()
      • $oCDMgr = $this->FieldsManager();
      • $oCDMgr->FetchBlob();
      • $oCD_Buyer = $oCDMgr->BuyerObject();
      • $oCD_Recip = $oCDMgr->RecipObject();
      • $oCD_Buyer->RenderContact(TRUE) // edit email/phone
        • cart/cart.data.fg-ep.php trait vtCartData_EmailPhone public function RenderContact()
      • $oCD_Recip->RenderShipping(TRUE) // edit shipping address / instructions
        • cart/cart.data.fg.recip.php class vcCartData_Recip public function RenderShipping()
          • $this->LoadShippingFields();
  • page/vbz-page-ckout.php class vcPageCkout protected function RenderBillingPage()
    • cart/cart-shop.php vcrCart_ShopUI public function RenderBillingPage()
      • $oCDMgr = $this->FieldsManager();
      • $oCD_Buyer = $oCDMgr->BuyerObject();
      • $oCD_Buyer->RenderPayment(TRUE) // edit payment information
        • cart/cart.data.fg.buyer.php class vcCartData_Buyer public function RenderPayment()

Form Capture

archived 2018-09-16 - refers to obsolete file/class names

  • page/vbz-page-ckout.php: class clsPageCkout function CapturePage()
    • page/vbz-page-ckout.php: class clsPageCkout function CaptureShipping()
      • $rcCart->CaptureShippingPage();
        • cart/cart.shop.php: class vcrCart_ShopUI function CaptureShippingPage()
          • $oCD_Buyer->CaptureContact();
          • $oCD_Recip->CaptureShipping();
            • cart/cart.data.fg-na.php: trait vtCartData_NameAddress function CaptureShipping()
              • $this->InvokeNameAddressFields();
              • $this->ReceiveForm();
          • $oCDMgr->FetchBlob();
            • cart/cart.data.mgr.php: class vcCartDataManager function FetchBlob()
              • $sBlob = $this->GetBlobString();
              • $this->SetBlobArray(...)
          • $oCDMgr->UpdateBlob($oCD_Buyer);
          • $oCDMgr->UpdateBlob($oCD_Recip);
          • $oCDMgr->StoreBlob();
            • cart/cart.data.mgr.php: class vcCartDataManager function StoreBlob()
              • $sBlob = serialize($this->GetBlobArray());
              • $this->SetBlobString($sBlob);
    • page/vbz-page-ckout.php: class clsPageCkout function CaptureBilling()
      • $rcCart->CaptureBillingPage();
        • cart/cart.shop.php: class vcrCart_ShopUI function CaptureBillingPage()
          • $oCD_Buyer = $oCDMgr->BuyerObject();
          • $oCD_Buyer->CapturePayment(); // card #/exp, and I *think* name/address
          • $this->AddMissing($oCD_Buyer->GetMissingArray());
          • $oCDMgr->FetchBlob();
            • cart/cart.data.mgr.php: class vcCartDataManager function FetchBlob()
              • $sBlob = $this->GetBlobString();
              • $this->SetBlobArray(...)
          • $oCDMgr->UpdateBlob($oCD_Buyer);
          • $oCDMgr->StoreBlob();
            • cart/cart.data.mgr.php: class vcCartDataManager function StoreBlob()
              • $sBlob = serialize($this->GetBlobArray());
              • $this->SetBlobString($sBlob);
          • $this->Save();

InvokeNameAddressFields() defines which fields are handled.

Address Resolution

These notes no longer apply, as the cart-to-order process was completely rewritten in 2015-2016.

It's probably a bit of a frill, but I wanted to avoid creating unnecessary contact information records (address, phone, email, name) when customers check the "ship to self" or "card address is shipping address" checkboxes. The following are some written notes on how the resolution works -- which pieces are copied under what circumstances, and what the temporary storage structures look like:

2009-11-15 VbzCart address resolution.adj.jpg

2009-11-19 Update: The Person's Contact information should always have an Address object if there is one -- pointing to the Card's Address object if necessary. Otherwise we have to have more complicated to code to go looking for the Card.Address if there is no Contact.Address.

2009-11-28 update: Each Person object should also have a Name node directly underneath, pointing to the Name node of whichever Address object seems appropriate. (Some Person objects won't have Addr nodes under some circumstances.)