Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Ecommerce_Checkout Class Reference
Inheritance diagram for Ecommerce_Checkout:
Page Asset MySource_Object

Public Member Functions

 __construct ($assetid=0)
 
 _getAvailableContexts ()
 
 _getAllowedLinks ()
 
 printBody ()
 
 _retrieveOrder ()
 
 _logOrderAction ($action, &$order=NULL)
 
 _processInterface ()
 
 _processOrder (&$delivery_method)
 
 _updateQuantities ($update=TRUE)
 
 _printContext ()
 
 _createAdditional (&$link)
 
 _createOrder ($cart_items)
 
 _moveOrder ($order_id, $review)
 
 _getDeliveryAssetIds ()
 
 _registerFormField ($field_name)
 
 _registerFormRequirement ()
 
 _isFormRequired ()
 
 _getActiveDeliveryMethod ()
 
 _getActiveDeliveryMethodId ()
 
 _getProductReceipt ()
 
 getFlatCharges ()
 
 _getCartSummary ($html=TRUE)
 
 _getCartXml ()
 
 _getCartTotal ($html=TRUE)
 
 getKeywordReplacement ($keyword)
 
 onRequestKeywords (&$broadcaster, $vars=Array())
 
 _getCheckoutContextKeywords ()
 
 _getConfirmationContextKeywords ()
 
 _getReceiptContextKeywords ()
 
 _getFailureContextKeywords ()
 
 _getReceiptFormatContextKeywords ()
 
 _getReceiptContentsContextKeywords ()
 
 getDeliverySelectorKeywordReplacement ()
 
 getDeliveryInterfaceKeywordReplacement ()
 
 getConfirmOrderButtonKeywordReplacement ()
 
 getReturnToCheckoutButtonKeywordReplacement ()
 
 getGoToConfirmationButtonKeywordReplacement ()
 
 getConfirmationSummaryKeywordReplacement ()
 
 getReceiptSummaryKeywordReplacement ()
 
 getCartSummaryKeywordReplacement ()
 
 getOrderXmlKeywordReplacement ()
 
 getErrorMessagesKeywordReplacement ()
 
 getFailureSummaryKeywordReplacement ()
 
 getInsufficientQuantityMessageKeywordReplacement ()
 
 getItemsCountKeywordReplacement ()
 
 getItemsTotalCountKeywordReplacement ()
 
 getCustomisedReceiptKeywordReplacement ()
 
 getBodycopy ($name='', $receipt_folder=FALSE)
 
 saveAttributes ($dont_run_updated=FALSE)
 
 finishCheckout (&$order_asset)
 
- Public Member Functions inherited from Page
 __construct ($assetid=0)
 
 _getAllowedLinks ()
 
 printBody ()
 
- Public Member Functions inherited from Asset
 Asset ($assetid=0)
 
 create (Array &$link)
 
 load ($assetid)
 
 _loadDataPaths ()
 
 reload ()
 
 canDelete ()
 
 delete ($release_lock=TRUE, $check_locked=TRUE)
 
 useSystemVersion ()
 
 loadSystemVersion ()
 
 saveSystemVersion ()
 
 clearSystemVersion ()
 
 revertToSystemVersion ()
 
 revertNoticeLinksToSystemVersion ()
 
 _updated ($update_parents=TRUE)
 
 type ()
 
 getTypeAncestors ($include_asset=TRUE)
 
 incrementVersion ($number='micro', $update_parents=TRUE)
 
 getLanguages ()
 
 setLanguages (Array $languages)
 
 setCharset ($charset)
 
 setForceSecure ($force_secure)
 
 remapAssetids (Array $map)
 
 morph ($new_type_code)
 
 _morphCleanup ($new_type_code)
 
 onRequestKeywords (Asset $broadcaster, Array $vars=Array())
 
 canClone ()
 
 cloneComponents (Asset $clone, Array $components, $override=FALSE)
 
 cloneComponentsAdditional (Asset $clone, Array $components)
 
 cloneLinks (Asset $clone)
 
 getStatus ()
 
 getAvailableStatii ()
 
 getStatusDescription ()
 
 processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE)
 
 setDate ($date_type, $time=NULL, $userid=NULL)
 
 lockTypes ()
 
 canForceablyAcquireLock ($lock_type)
 
 getEditingLocks ($keywords)
 
 _getAllowedLinks ()
 
 createLink (Asset $minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE, $locked=0)
 
 prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive)
 
 canCreateLink (Asset $minor, $link_type, $exclusive)
 
 canMoveLink (Asset $minor, Asset $old_major, $link_type)
 
 describeLink ($linkid)
 
 isDeletableLink ($linkid)
 
 canDeleteLink ($linkid)
 
 deleteLink ($linkid, $check_locked=TRUE)
 
 linksUpdated ()
 
 canCloneLink ()
 
 saveAttributes ($dont_run_updated=FALSE, $log_message=TRUE)
 
 setAttrValue ($name, $value)
 
 attr ($name)
 
attrByRef ($name)
 
 getAttribute ($name, $mute_errors=FALSE)
 
 getAssetKeywords ($descriptions=FALSE)
 
 getAvailableKeywords ()
 
 getKeywordReplacement ($keyword)
 
 getAssetWebPathKeywordReplacement ()
 
 getCustomKeywordReplacements ($keywords=Array(), $invoke_backend=FALSE)
 
 processCustomKeywords ($keywords=Array())
 
 getContent ()
 
 setContent ()
 
 getEffectiveLastUpdatedTime ($assetids)
 
 readAccess (Array $assetids=Array())
 
 writeAccess ($lock_type='', Array $assetids=Array(), $only_workflow=TRUE)
 
 adminAccess ($lock_type='', Array $assetids=Array())
 
 backendAccess ()
 
 liveEditAccess ($lock_type)
 
 canliveEdit ($lock_type)
 
 effectiveUnrestricted ()
 
 checkAccess ($perm, $lock_type, Array $assetids=Array(), $only_workflow=TRUE)
 
 accessEffective ()
 
 permissionsUpdated ()
 
 printFrontend ()
 
 printFrontendAsset (Asset $asset, $design=NULL)
 
 getValidProtocols ()
 
 printHead ()
 
 printBody ()
 
 getCurrentPaintLayoutName ()
 
 getCurrentDesignName ()
 
 printBodyWithPaintLayout ($layout_id='')
 
 initLimbo ()
 
 printLimbo ()
 
 paintBackend (Backend_Outputter $o)
 
 getPrefix ()
 
 processBackend (Backend_Outputter $o, Array &$link)
 
 getEI ()
 
 getEditFns ()
 
 getBackendHref ($screen='', $backend_page=TRUE)
 
 getURL ($base_url=NULL, $ignore_rollback=FALSE, $base_contextid=NULL)
 
 getURLs ()
 
 getHref ($base_url=NULL, $ignore_rollback=FALSE)
 
 getWebDataPath ()
 
 getWebPaths ()
 
 saveWebPaths ($paths, $auto_add_remaps=TRUE)
 
 getLookups ($field='')
 
 getDesignLookups ()
 
 getLookupValues ($inherited=NULL, $prefix='', $like_search=TRUE, $ignore_override=FALSE)
 
 deleteLookupValue ($layout_name, $layout_value)
 
 setPaintLayouts ($layouts)
 
 updateLookups ($auto_add_remaps=TRUE)
 
 setLookupValues (Array $values)
 
 getAssetStatusDescriptionKeywordReplacement ()
 
 getAssetStatusColourKeywordReplacement ()
 
 replaceKeywordsInString ($string)
 
 fastTrack ($tasks)
 
 unFastTrack ($tasks)
 
 shouldFastTrack ($task, $assetid=NULL)
 
 getFaskTrackedTaskAssetids ($task)
 
 getDependantParentsURL ()
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

 $print_context
 
 $insufficient_quantities = FALSE
 

Protected Member Functions

 _getName ($short_name=FALSE, $contextid=NULL)
 
- Protected Member Functions inherited from Page
 _preCreateCheck (Array &$link)
 
 _createAdditional (Array &$link)
 
 _getName ($short_name=FALSE)
 
- Protected Member Functions inherited from Asset
 _preCreateCheck (Array &$link)
 
 _createAdditional (Array &$link)
 
 _abortCreate ($trigger_level_changed=FALSE, $linkid=0)
 
 _loadVars ()
 
 _getName ($short_name=FALSE, $contextid=NULL)
 
 _getKeywordReplacement ($keyword)
 
 _checkPermissionAccess ($perm, $assetids=Array(), $only_workflow=TRUE)
 
 makeAndSaveInitialWebPath ($path, $parent_link=NULL)
 

Detailed Description

Definition at line 34 of file ecommerce_checkout.inc.

Constructor & Destructor Documentation

__construct (   $assetid = 0)

Constructor

Parameters
intassetid Id of this asset
Returns
void public

Definition at line 62 of file ecommerce_checkout.inc.

Member Function Documentation

_createAdditional ( $link)

Perform any additional processing required during the creation of this asset

Create bopycopy and folder assets when they are created

Parameters
array&$linkinformation used to create the initial link
Returns
boolean private

Definition at line 930 of file ecommerce_checkout.inc.

_createOrder (   $cart_items)

Create a pending ecommerce order

Parameters
array$cart_itemsInformation used to create the initial link
Returns
object private

Definition at line 1004 of file ecommerce_checkout.inc.

_getActiveDeliveryMethod ( )

Get The currently active delivery method asset

Looks at the current state of the asset to determine the active delivery method asset

Returns
object public

Definition at line 1219 of file ecommerce_checkout.inc.

_getActiveDeliveryMethodId ( )

Get Active Delivery Method Asset ID

Looks at the current state of the asset to determine the active delivery method asset id

Returns
int public

Definition at line 1243 of file ecommerce_checkout.inc.

_getAllowedLinks ( )

Returns an array of all the permitted links type, the type asset and the cardinality In the form

Array('[link_type]' => Array('[type_code]' => Array('card' => [cardinality], 'exclusive' => [exclusive]))); Where: link_type = SQ_LINK_TYPE_1|SQ_LINK_TYPE_2|SQ_LINK_TYPE_3|SQ_LINK_NOTICE cardinality = [max number of links]|'M' exclusive = true|false

Returns
array private

Definition at line 107 of file ecommerce_checkout.inc.

_getAvailableContexts ( )

Returns a list of available contexts

Returns
array private

Definition at line 82 of file ecommerce_checkout.inc.

_getCartSummary (   $html = TRUE)

Return a cart summary for the ecommer cart

Parameters
boolean$htmlif it's true, the summary string is wrapped by
 tags
Returns
 string
 private

Definition at line 1297 of file ecommerce_checkout.inc.

_getCartTotal (   $html = TRUE)

Return a cart total of ecommerce cart

Parameters
boolean$htmlif it's true, the summary string is wrapped by
 tags
Returns
 string
 private

Definition at line 1344 of file ecommerce_checkout.inc.

_getCartXml ( )

Get the XML representation of the cart to store in the order_xml attribute of Ecommerce Order asset

Returns
string private

Definition at line 1323 of file ecommerce_checkout.inc.

_getCheckoutContextKeywords ( )

Get keywords for 'Content' context

Returns
array private

Definition at line 1497 of file ecommerce_checkout.inc.

_getConfirmationContextKeywords ( )

Get keywords for 'Confirmation' context

Returns
array private

Definition at line 1522 of file ecommerce_checkout.inc.

_getDeliveryAssetIds ( )

Get the asset IDs for all the linked delivery methods

Returns
array private

Definition at line 1144 of file ecommerce_checkout.inc.

_getFailureContextKeywords ( )

Get keywords for 'Failure' context

Returns
array private

Definition at line 1567 of file ecommerce_checkout.inc.

_getName (   $short_name = FALSE,
  $contextid = NULL 
)
protected

Returns name of the asset

Parameters
boolean$short_namewhether or not we are after the shortname or the full name
int$contextidwhat context to return the name from
Returns
string private
See Also
Asset::_getName()

Definition at line 128 of file ecommerce_checkout.inc.

_getProductReceipt ( )

Return a receipt for the product section

Returns
string public

Definition at line 1256 of file ecommerce_checkout.inc.

_getReceiptContentsContextKeywords ( )

Get keywords for 'Receipt Contents' customised receipt context

Returns
array private

Definition at line 1606 of file ecommerce_checkout.inc.

_getReceiptContextKeywords ( )

Get keywords for 'Receipt' context

Returns
array private

Definition at line 1546 of file ecommerce_checkout.inc.

_getReceiptFormatContextKeywords ( )

Get keywords for 'Receipt Format' customised receipt context

Returns
array private

Definition at line 1586 of file ecommerce_checkout.inc.

_isFormRequired ( )

Is Form Required?

This function can reply to the question whether the form tags are required in asset's interface Form is required when _registerFormRequirement() was called

Returns
boolean private

Definition at line 1204 of file ecommerce_checkout.inc.

_logOrderAction (   $action,
$order = NULL 
)

Log the current ecommerce order's actions

Parameters
string$actionDescription of the activity to log
object$orderOrder being logged
Returns
void private

Definition at line 220 of file ecommerce_checkout.inc.

_moveOrder (   $order_id,
  $review 
)

Move and complete a pending ecommerce order

Parameters
int$order_idThe assetid of the existing pending ecommerce order
boolean$reviewWhether this ecommerce order is to be placed in the review folder
Returns
object private

Definition at line 1092 of file ecommerce_checkout.inc.

_printContext ( )

Print the context bodycopy

Provided that the context has already been determined, this function simply find an appropriate bodycopy and prints it, providing it with keywords

Returns
void public

Definition at line 867 of file ecommerce_checkout.inc.

_processInterface ( )

Process the interface

This is the main controller function. It determines the context asset is in based on the request and state variables

Returns
void private

Definition at line 253 of file ecommerce_checkout.inc.

_processOrder ( $delivery_method)

Calls the delivery method and asks it to process our order

Parameters
object&$delivery_methodThe delivery method asset passed by reference
Returns
void private

Definition at line 589 of file ecommerce_checkout.inc.

_registerFormField (   $field_name)

Register a form field name

This helps determine whether the output should be wrapped in a form

Parameters
string$field_nameName of the form field
Returns
void private

Definition at line 1170 of file ecommerce_checkout.inc.

_registerFormRequirement ( )

Register Form Requirement

If an element of the asset's interface requires a form, this will register that requirement

Returns
void private

Definition at line 1188 of file ecommerce_checkout.inc.

_retrieveOrder ( )

Retrieve the order from the current session data

Returns
object private

Definition at line 194 of file ecommerce_checkout.inc.

_updateQuantities (   $update = TRUE)

Validates or updates the quantities of items stored in the current cart

Parameters
boolean$updateWhether to update the product quantity values
Returns
boolean public

Definition at line 784 of file ecommerce_checkout.inc.

finishCheckout ( $order_asset)

Stuff that needs to be done at the end of the checkout

Parameters
object$order_asset
Returns
boolean public

Definition at line 2138 of file ecommerce_checkout.inc.

getBodycopy (   $name = '',
  $receipt_folder = FALSE 
)

Returns a reference to a bodycopy based of the name of the bodycopy

Parameters
string$namethe name of the bodycopy
boolean$receipt_folderwhether the bodycopy is inside the attached Customised Receipt Bodycopies folder
Returns
object public

Definition at line 1973 of file ecommerce_checkout.inc.

getCartSummaryKeywordReplacement ( )

Get Keyword Replacement for 'cart_summary' keyword

Returns
string public

Definition at line 1815 of file ecommerce_checkout.inc.

getConfirmationSummaryKeywordReplacement ( )

Get Keyword Replacement for 'get_checkout_summary' keyword

Checkout Summary consists of

Returns
string public

Definition at line 1779 of file ecommerce_checkout.inc.

getConfirmOrderButtonKeywordReplacement ( )

Get Keyword Replacement for 'confirm_order_button' keyword

Returns
string public

Definition at line 1722 of file ecommerce_checkout.inc.

getCustomisedReceiptKeywordReplacement ( )

Get Keyword Replacement for 'customised_receipt' keyword

Returns
string public

Definition at line 1940 of file ecommerce_checkout.inc.

getDeliveryInterfaceKeywordReplacement ( )

Get Keyword Replacement for 'delivery_interface' keyword

Returns
string public

Definition at line 1683 of file ecommerce_checkout.inc.

getDeliverySelectorKeywordReplacement ( )

Get Keyword Replacement for 'delivery_selector' keyword

Returns
string public

Definition at line 1633 of file ecommerce_checkout.inc.

getErrorMessagesKeywordReplacement ( )

Get Keyword Replacement for 'error_messages' keyword

Returns
string public

Definition at line 1847 of file ecommerce_checkout.inc.

getFailureSummaryKeywordReplacement ( )

Get Keyword Replacement for 'failure_message' keyword

Returns
string public

Definition at line 1868 of file ecommerce_checkout.inc.

getFlatCharges ( )

It returns an Array of the Flat Charges Array ('name of the charge' => 'value of the charge')

Returns
array public

Definition at line 1269 of file ecommerce_checkout.inc.

getGoToConfirmationButtonKeywordReplacement ( )

Get Keyword Replacement for 'go_to_confirmation_button' keyword

Returns
string public

Definition at line 1759 of file ecommerce_checkout.inc.

getInsufficientQuantityMessageKeywordReplacement ( )

Get Keyword Replacement for 'insufficient_quantity_message' keyword

Returns
string public

Definition at line 1886 of file ecommerce_checkout.inc.

getItemsCountKeywordReplacement ( )

Get Keyword Replacement for 'items_count' keyword

Returns
string public

Definition at line 1910 of file ecommerce_checkout.inc.

getItemsTotalCountKeywordReplacement ( )

Get Keyword Replacement for 'items_total_count' keyword

Returns
string public

Definition at line 1925 of file ecommerce_checkout.inc.

getKeywordReplacement (   $keyword)

Get bodycopy keyword replacement

Provides a mechanism for providing keyword replacement functions by looking up the function named 'getKeywordNameKeywordReplacement' so an asset wishing to add support for 'best_ever' custom keyword should implement a function getBestEverKeywordReplacement() which returns a replacement string

Parameters
string$keywordKeyword to find a replacement for
Returns
string public

Definition at line 1381 of file ecommerce_checkout.inc.

getOrderXmlKeywordReplacement ( )

Get order_xml keyword replacement for the success order

Returns
string public

Definition at line 1829 of file ecommerce_checkout.inc.

getReceiptSummaryKeywordReplacement ( )

Get Keyword Replacement for 'receipt_summary' keyword

Returns
string public

Definition at line 1797 of file ecommerce_checkout.inc.

getReturnToCheckoutButtonKeywordReplacement ( )

Get Keyword Replacement for 'return_to_checkout_button' keyword

Returns
string public

Definition at line 1741 of file ecommerce_checkout.inc.

onRequestKeywords ( $broadcaster,
  $vars = Array() 
)

Add valid keywords for this asset to an array of keywords when asked

Parameters
object&$broadcaster$asset the asset that triggered the event
array$varsthe vars that get submitted by the broadcaster we add keywords to the $vars['keywords'] array
Returns
boolean private

Definition at line 1432 of file ecommerce_checkout.inc.

printBody ( )

Called by the design to print the body of this asset

Returns
void public

Definition at line 153 of file ecommerce_checkout.inc.

saveAttributes (   $dont_run_updated = FALSE)

Save attributes set with setAttrValue to the database

Parameters
boolean$dont_run_updatedif TRUE this->_updated() won't be run (THIS IS ONLY EVER CALLED FROM Asset::create())
Returns
boolean public
See Also
setAttrValue()

Definition at line 2013 of file ecommerce_checkout.inc.

Field Documentation

$print_context

Screen Context

Variable holding context to be printed by 'printContext' function Context can change based on the logic of this asset.

Definition at line 44 of file ecommerce_checkout.inc.


The documentation for this class was generated from the following file: