Squiz Matrix
4.12.2
|
Data Fields | |
$confirm_view = 'confirmation' | |
$process_view = 'process' | |
$receipt_view = 'receipt' | |
$_bodycopies = Array('Form', 'Confirmation', 'Receipt') | |
Additional Inherited Members | |
Protected Member Functions inherited from Form | |
_getName ($short_name=FALSE, $contextid=NULL) | |
_handleCompletedFileUploads () | |
_getConfirmationPageContentsBodycopyKeywords () | |
_getCommonQuestionKeywords (Form_Question $question, Asset $parent) | |
_getCommonSectionKeywords (Form_Section $section) | |
_getQuestionResponseKeywords (Form_Question $question, Asset $parent) | |
_getCaptchaDisplayKeywords () | |
_getMollomCaptchaDisplayKeywords () | |
Definition at line 37 of file form_ecommerce.inc.
_addAssetItem | ( | $assetid, | |
$quantity = 1 |
|||
) |
Adds an asset item to order
string | $assetid | Asset ID to add |
int | $quantity | Quantity of asset to add |
Definition at line 2116 of file form_ecommerce.inc.
_addAssetItemPromotionalCode | ( | $assetid, | |
$promo_code | |||
) |
Adds a promotional code asset ID to a purchasable asset
string | $assetid | Asset ID of the purchasable asset to add |
string | $promo_code | The code of the promotional code asset |
Definition at line 2185 of file form_ecommerce.inc.
_clearAssetItemPromotionalCodes | ( | ) |
Clear the list of promotional code assets on order
Definition at line 2169 of file form_ecommerce.inc.
_clearAssetItems | ( | ) |
Clear the list of assets on order
Definition at line 2100 of file form_ecommerce.inc.
_createAdditional | ( | & | $link | ) |
Do extra processing when creating
array | &$link | link |
Definition at line 86 of file form_ecommerce.inc.
_createBodycopies | ( | ) |
Creates the necessary bodycopies
Definition at line 99 of file form_ecommerce.inc.
_deleteOrderFile | ( | ) |
Delete file with order
Definition at line 1365 of file form_ecommerce.inc.
_formatPriceAmount | ( | $amount = 0 | ) |
Format price amount with 2 decimals
string | $amount | amount to format |
Definition at line 2536 of file form_ecommerce.inc.
_getAllowedLinks | ( | ) |
Returns an array of all the permitted link type, the type asset and the cardinality
Definition at line 119 of file form_ecommerce.inc.
_getAssetItemPromotionalCodes | ( | ) |
Get the list of promotional code assets on order
Definition at line 2151 of file form_ecommerce.inc.
_getAssetItems | ( | ) |
Get the list of assets on order
Definition at line 2083 of file form_ecommerce.inc.
_getCommonFormKeywordReplacements | ( | ) |
Gets replacements for question keywords
TODO: Move this into the local getKeywordReplacement function
Definition at line 807 of file form_ecommerce.inc.
_getConfirmationBodycopyKeywords | ( | ) |
Get keywords for Confirmation bodycopy
Definition at line 882 of file form_ecommerce.inc.
_getEcommerceRule | ( | $name = '' | ) |
Return question rule for e-commerce form
string | $name | question type code |
Definition at line 189 of file form_ecommerce.inc.
_getFormBodycopyKeywords | ( | ) |
Get keywords for Form bodycopy
Definition at line 869 of file form_ecommerce.inc.
_getLogFileName | ( | ) |
Get the filename of log file
Definition at line 2566 of file form_ecommerce.inc.
_getLogFilePath | ( | ) |
Get the path to log file
string | $string | string to log |
Definition at line 2580 of file form_ecommerce.inc.
_getOrderFileName | ( | $order_no = FALSE | ) |
Return file name for order file
string | $order_no | id of the saved file |
Definition at line 1385 of file form_ecommerce.inc.
_getOrderItems | ( | ) |
Get the itesm being ordered
Definition at line 2329 of file form_ecommerce.inc.
& _getParentPageAsset | ( | ) |
_getParentPageAssetId | ( | ) |
_getPassThroughVars | ( | ) |
Get the pass through variables under key - value pair array
Definition at line 2390 of file form_ecommerce.inc.
_getPromotionalCodeAsset | ( | & | $asset, |
$promo_code | |||
) |
Return the promotional code asset if it is linked to the passed asset and has the promotional code matching the passed promotional code string
object | &$asset | The asset to get promotional code asset from |
string | $promo_code | The promotional code string to search |
Definition at line 2511 of file form_ecommerce.inc.
_getPromotionalCodeDiscount | ( | $promo_code_assetid, | |
$price, | |||
$quantity | |||
) |
Get the discount of promotional code on an asset with price and quantity
string | $promo_code_assetid | Asset ID of the promotional code |
float | $price | The price of the asset to apply the promotional code |
int | $quantity | The quantity of the asset to apply the promtional code |
Definition at line 2223 of file form_ecommerce.inc.
_getPurchasableAssetName | ( | & | $asset | ) |
Get the name of purchasable asset
object | &$asset | asset to check |
Definition at line 2370 of file form_ecommerce.inc.
_getPurchasableAssetPrice | ( | & | $asset | ) |
Get the price of purchasable asset
object | &$asset | asset to check |
Definition at line 2350 of file form_ecommerce.inc.
_getReceipt | ( | $as_html = TRUE | ) |
Format reciept values into table for nice output
boolean | $as_html | whether to get HTML copy or note |
Definition at line 1146 of file form_ecommerce.inc.
_getReceiptBodycopyKeywords | ( | ) |
Get keywords for Receipt bodycopy
Definition at line 895 of file form_ecommerce.inc.
_getReceiptHeader | ( | $as_html = TRUE | ) |
Makes Receipt Header
boolean | $as_html | whether to get HTML copy or note |
Definition at line 923 of file form_ecommerce.inc.
_getTaxableTotal | ( | ) |
Get taxable total
Part of total that inicludes tax
Definition at line 2280 of file form_ecommerce.inc.
_getTaxRate | ( | ) |
_getTaxTotal | ( | ) |
Get the total tax amount in current state
Definition at line 2311 of file form_ecommerce.inc.
_getThankYouBodycopyKeywords | ( | ) |
Get keywords for thank you bodycopy
Definition at line 1519 of file form_ecommerce.inc.
_getTotal | ( | ) |
Get the total in current order
Definition at line 2241 of file form_ecommerce.inc.
_getTotalDiscount | ( | ) |
Get the total discount in current order
Definition at line 2259 of file form_ecommerce.inc.
_isAllowedPassThroughQuestionType | ( | $type = '' | ) |
Check if question type can be used for pass through variable
string | $type | question type code |
Definition at line 161 of file form_ecommerce.inc.
_isAllowedQuestionType | ( | $type = '' | ) |
Check if question type can be used for e-commerce
string | $type | question type code |
Definition at line 136 of file form_ecommerce.inc.
_isItemTaxable | ( | $item_id | ) |
True if passed item id is taxable
string | $item_id | id of item to test |
Definition at line 2551 of file form_ecommerce.inc.
_isPurchasableAsset | ( | & | $asset | ) |
True if passed asset is purchasable
object | &$asset | asset to check |
Definition at line 2438 of file form_ecommerce.inc.
_isPurchasableAssetPromotable | ( | & | $asset | ) |
True if the passed asset is promotable
object | &$asset | asset to check |
Definition at line 2492 of file form_ecommerce.inc.
_isPurchasableAssetQuantityAllowed | ( | & | $asset | ) |
True if multiples of passed asset can be purchased
object | &$asset | asset to check |
Definition at line 2474 of file form_ecommerce.inc.
_isPurchasableAssetTaxable | ( | & | $asset | ) |
True if passed asset is taxable
object | &$asset | asset to check |
Definition at line 2456 of file form_ecommerce.inc.
_log | ( | $string = '' | ) |
Writes a string to log file
string | $string | string to log |
Definition at line 2595 of file form_ecommerce.inc.
_logOrderToFile | ( | ) |
_makeOrder | ( | ) |
Generates order array, which contains all necessary information for payment processing
Definition at line 1193 of file form_ecommerce.inc.
_readOrder | ( | ) |
_saveOrder | ( | ) |
Save order into file, to prevent losing information in case of session dying
Definition at line 1331 of file form_ecommerce.inc.
_saveOrderAsset | ( | ) |
Brings the submission asset up-to-date with the current state
Definition at line 1013 of file form_ecommerce.inc.
_setEcommerceRule | ( | $name, | |
$value | |||
) |
Save one rule
string | $name | rule name - question id |
mixed | $value | rule contents |
Definition at line 208 of file form_ecommerce.inc.
& createOrder | ( | ) |
& createSubmission | ( | ) |
creates a new submission object
Definition at line 908 of file form_ecommerce.inc.
Form_Ecommerce | ( | $assetid = 0 | ) |
Constructor
int | $assetid | the asset id to be loaded |
Definition at line 71 of file form_ecommerce.inc.
& getAllQuestionsCached | ( | ) |
Gets a list of all questions in the form (cached)
Caches the output of getAllQuestions in tmp vars to avoid memory problems with arrays
Definition at line 786 of file form_ecommerce.inc.
& getBodycopy | ( | $bodycopy | ) |
Get bodycopy by name
string | $bodycopy | code of bodycopy to print |
Definition at line 848 of file form_ecommerce.inc.
getCancelTextKeywordReplacement | ( | ) |
Cancel Text keyword replacement
Definition at line 1571 of file form_ecommerce.inc.
getCancelUrlKeywordReplacement | ( | ) |
Cancel URL keyword replacement
Definition at line 1600 of file form_ecommerce.inc.
getConfirmTextKeywordReplacement | ( | ) |
Confirm Text keyword replacement
Definition at line 1558 of file form_ecommerce.inc.
getConfirmUrlKeywordReplacement | ( | ) |
Confirm URL keyword replacement
Definition at line 1584 of file form_ecommerce.inc.
getCurrencySignKeywordReplacement | ( | ) |
Currency Sign keyword replacement
Definition at line 1897 of file form_ecommerce.inc.
& getCurrentOrderAsset | ( | ) |
getItemListingKeywordReplacement | ( | ) |
Item List keyword replacement
Definition at line 1862 of file form_ecommerce.inc.
getKeywordReplacement | ( | $keyword | ) |
Keyword replacement processor
string | $keyword | keyword to find a replacement for |
Definition at line 662 of file form_ecommerce.inc.
getOrderItemCountKeywordReplacement | ( | ) |
Order Item Count keyword replacement
Definition at line 1615 of file form_ecommerce.inc.
getOrderItemListKeywordReplacement | ( | ) |
Order Item List keyword replacement
Definition at line 1778 of file form_ecommerce.inc.
getOrderNumberKeywordReplacement | ( | ) |
Order Number keyword replacement
Definition at line 2041 of file form_ecommerce.inc.
getOrderPurchasableAssetListKeywordReplacement | ( | ) |
Order Purchasable Asset List keyword replacement
Definition at line 1815 of file form_ecommerce.inc.
getOrderTaxableItemCountKeywordReplacement | ( | ) |
Order Taxable Item Count keyword replacement
Definition at line 1734 of file form_ecommerce.inc.
getOrderTaxableTotalKeywordReplacement | ( | ) |
Order Taxable Total keyword replacement
Definition at line 1719 of file form_ecommerce.inc.
getOrderTotalBeforeDiscountKeywordReplacement | ( | ) |
Order Total Before Discount keyword replacement
Definition at line 1666 of file form_ecommerce.inc.
getOrderTotalDiscountKeywordReplacement | ( | ) |
Order Total Discount keyword replacement
Definition at line 1650 of file form_ecommerce.inc.
getOrderTotalExcludingTaxKeywordReplacement | ( | ) |
Order Total Excluding Tax keyword replacement
Definition at line 1685 of file form_ecommerce.inc.
getOrderTotalKeywordReplacement | ( | ) |
Order Total keyword replacement
Definition at line 1634 of file form_ecommerce.inc.
getOrderTotalTaxKeywordReplacement | ( | ) |
Order Total Tax keyword replacement
Definition at line 1704 of file form_ecommerce.inc.
getTaxableItemStringKeywordReplacement | ( | ) |
Taxable Item String keyword replacement
Definition at line 1884 of file form_ecommerce.inc.
getTaxNameKeywordReplacement | ( | ) |
Tax Name keyword replacement
Definition at line 1765 of file form_ecommerce.inc.
getTaxRateKeywordReplacement | ( | ) |
Tax Rate keyword replacement
Definition at line 1752 of file form_ecommerce.inc.
getTransactionAmountKeywordReplacement | ( | ) |
Transaction Amount keyword replacement
Definition at line 1962 of file form_ecommerce.inc.
getTransactionBillingAddressKeywordReplacement | ( | ) |
Transaction Billing Address keyword replacement
Definition at line 2002 of file form_ecommerce.inc.
getTransactionBillingNameKeywordReplacement | ( | ) |
Transaction Billing Name keyword replacement
Definition at line 1989 of file form_ecommerce.inc.
getTransactionCardNumberKeywordReplacement | ( | ) |
Transaction Card Number keyword replacement
Definition at line 1976 of file form_ecommerce.inc.
getTransactionDeliveryAddressKeywordReplacement | ( | ) |
Transaction Delivery Address keyword replacement
Definition at line 2028 of file form_ecommerce.inc.
getTransactionDeliveryNameKeywordReplacement | ( | ) |
Transaction Delivery Name keyword replacement
Definition at line 2015 of file form_ecommerce.inc.
getTransactionNumberKeywordReplacement | ( | ) |
Transaction Number keyword replacement
Definition at line 1910 of file form_ecommerce.inc.
getTransactionStatusKeywordReplacement | ( | ) |
Transaction Status keyword replacement
Definition at line 1923 of file form_ecommerce.inc.
getTransactionTimeKeywordReplacement | ( | ) |
Transaction Time keyword replacement
Definition at line 1949 of file form_ecommerce.inc.
getTransactionTypeKeywordReplacement | ( | ) |
Transaction Type keyword replacement
Definition at line 1936 of file form_ecommerce.inc.
getUrl | ( | ) |
Get URL
Returns url to the parent page asset
Definition at line 1494 of file form_ecommerce.inc.
isAllowedQuestionId | ( | $question_id | ) |
Checks if a passed question ID belongs to this form
Requires a full asset id
string | $question_id | question id to check |
Definition at line 770 of file form_ecommerce.inc.
printBody | ( | ) |
Called by the design to print the body of this asset
Definition at line 580 of file form_ecommerce.inc.
printConfirmationView | ( | ) |
printFormView | ( | ) |
printReceiptView | ( | ) |
printStandard | ( | ) |
Main controller for this asset
This function determines what action to take next, based on the various request parameters and statuses of various actions
Definition at line 231 of file form_ecommerce.inc.
printSummary | ( | $as_html = FALSE | ) |
Print Summary of the submission
Overridden parent function to include the receipt information
boolean | $as_html | flag whether to print as HTML |
Definition at line 980 of file form_ecommerce.inc.
processForm | ( | ) |
processes the form and returns TRUE or FALSE depending on whether form processed successfully
Definition at line 1000 of file form_ecommerce.inc.