VbzCart/docs/v1/class/vcPageContent ckout/RenderContent

From Woozle Writes Code
Jump to navigation Jump to search

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;
    }