VbzCart/docs/v1/class/vcPageContent ckout/RenderContent: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
imported>Woozle
(Created page with "{{page/code/class/method}} ==Call Chains== * {{l/version/method|vcPageContent_ckout|Render}}() [public, events system] calls... ** {{hilite|{{l/version/method|vcPageContent_ck...")
 
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
* {{l/version/method|vcPageContent_ckout|Render}}() [public, events system] calls...
* {{l/version/method|vcPageContent_ckout|Render}}() [public, events system] calls...
** {{hilite|{{l/version/method|vcPageContent_ckout|RenderContent}}() [protected]}}, which calls...
** {{hilite|{{l/version/method|vcPageContent_ckout|RenderContent}}() [protected]}}, which calls...
*** {{l/version/method|vcPageContent_ckout|RenderCart}}(), which calls...
**** $rcCart->Render(FALSE) (read-only version of cart)
*** {{l/version/method|vcPageContent_ckout|RenderShippingPage}}(), which calls
*** {{l/version/method|vcPageContent_ckout|RenderShippingPage}}(), which calls
**** {{l/version/method|vcCartDataManager|RenderShippingPage}}()
**** {{l/version/method|vcCartDataManager|RenderShippingPage}}()

Latest revision as of 01:58, 25 February 2024

Template:Page/code/class/method

Call Chains

Code

    /*----
      ACTION: 
      OUTPUT:
	$doBackBtn: if TRUE, show the BACK navigation button
	$doRefrBtn:
	$doNavCtrl:
    */
    protected function RenderContent() {
	$out = NULL;
	$this->SetShowNavigation(TRUE);	// default
	//$doNav = TRUE;

	$sKeyShow = $this->GetPageKey_forShow();
	switch ($sKeyShow) {
	  case KSQ_PAGE_CART:	// shopping cart
	    $this->SetShowBackButton(FALSE);
	    $this->SetShowRefreshButton(TRUE);
	    $htMain = $this->RenderCart();
	    break;
	  case KSQ_PAGE_SHIP:	// shipping information
	    $htMain = $this->RenderShippingPage();
	    break;
	  case KSQ_PAGE_PAY:	// billing information
	    $htMain = $this->RenderBillingPage();
	    break;
	  case KSQ_PAGE_CONF:	// confirm order
	    $this->SetShowNavigation(FALSE);
	    //$doNav = FALSE;
	    $htMain = $this->RenderConfirm();
	    break;
	  case KSQ_PAGE_RCPT:	// order receipt
	    $this->SetShowNavigation(FALSE);
	    //$doNav = FALSE;
	    $this->ReceiveOrder();		// mark order as received
	    $htMain = $this->RenderReceipt();	// display receipt & send by email
	    break;
	  default:
// The normal shopping cart does not specify a target within the checkout sequence
// ...so show the first page which follows the cart page:
	    $htMain = $this->RenderShippingPage();
	}
	
	//$htNavStatus = $this->RenderNavigationStatus();
	
	$out =
	  $this->RenderContentHeader()
	  //.$htNavStatus
	  .$htMain
	  //.$htNavButtons
	  .$this->RenderContentFooter()
	  ;
	return $out;
    }