classes/php5_classes/Cart.class.php

Properties

Description

Holds the geoCart class.

Constants

  geoCart_LOADED = 1




Classes

geoCart

Properties

 
 
System  
No 
No 

Description

This class is behind the cart, loading all the order items and such and displaying, and processing all the different pages.

Methods

__construct, _combineSteps, _getCartItemDetails, _getStepParts, _getUserData, _initNewStandaloneCart, _initReg, _isNextStepCart, _validateStep, addError, addErrorMsg, addPreviewTemplateVars, addStep, cartCheckVars, cartDisplay, cartLabel, cartProcess, checkVars, clearAllSteps, combinedCheckVars, combinedDisplay, combinedDisplayAjax, combinedLabel, combinedProcess, createNewCart, deleteCheckVars, deleteDisplay, deleteLabel, deleteProcess, displayCartInterruption, displaySingleOtherDetails, displayStep, forcePreviewOnStep, get, getAction, getAllSteps, getCartBaseUrl, getCartTotal, getChildItem, getCommonTemplateVars, getCurrentStep, getErrorMsg, getErrorMsgs, getInstance, getNextStep, getPreviousStep, getProcessFormUrl, init, initItem, initSession, initSteps, initStepsView, insertStep, isCombinedStep, isInMiddleOfSomething, isRecurringCart, isRecurringPossible, isStandaloneCart, isStep, labelStep, other_detailsCheckVars, other_detailsDisplay, other_detailsLabel, other_detailsProcess, payment_choicesCheckVars, payment_choicesDisplay, payment_choicesLabel, payment_choicesProcess, performAction, previewDisplay, previewLabel, processStep, process_orderDisplay, process_orderLabel, remove, removeSession, save, set, setCurrentStep, setPricePlan, showPreviewBox, showPreviewButtonOnStep, skipCart, stepIsActive,

__construct( ) : n/a

Description

Do not create new cart object, instead use geoCart::getInstance()

Return value

Type Description
n/a n/a

_combineSteps( ) : n/a

Description

Used internally to combine the steps that need to be combined into a single built-in step to load all the combined steps.

Return value

Type Description
n/a n/a

_getCartItemDetails( bool   $noTotal = false, bool   $inCart = true, ) : array|bool

Description

Used internally to get the cart item details

Arguments

Name Type Description Default
$noTotal bool false
$inCart bool true

Return value

Type Description
array|bool

_getStepParts( string   $step, ) : array

Description

Returns an array with the different parts of the step, like so: array( item_name => 'item_name', 'step' => 'step' )
Assumes step has already been checked for validity.

Arguments

Name Type Description Default
$step string

Return value

Type Description
array

_getUserData(   $userId = null, ) : \unknown

Description

Gets the user data and stores it in this->user_data in array format.

Arguments

Name Type Description Default
$userId n/a null

Return value

Type Description
\unknown

_initNewStandaloneCart( \geoOrderItem   $item, ) : boolean

Description

Used internally to initialize a new standalone cart

Arguments

Name Type Description Default
$item \geoOrderItem

Return value

Type Description
boolean

_initReg( ) : n/a

Description

Initializes the registry for the cart

Return value

Type Description
n/a n/a

_isNextStepCart( string   $currentStep = null, ) : boolean

Description

Used internally to see if the "next step" is going to be the cart or not.

Arguments

Name Type Description Default
$currentStep string

If specified, will test if the step after this one is the cart. If not specified, will use the current step of the cart.

null

Return value

Type Description
boolean

_validateStep( string   $name, ) : bool

Description

Validate that the step is valid

Arguments

Name Type Description Default
$name string

Return value

Type Description
bool

addError( ) : \geoCart

Description

Used during checkVars to signify there is a problem, so do not proceed to next step yet.
Can also be used in process section, but discouragede except in situations like when charging a credit card, and the transaction doesn't go through

Return value

Type Description
\geoCart For easy chaining.

addErrorMsg( string   $error_name, string   $msg, ) : n/a

Description

Add an error message that can be used in other areas. Typically used in checkVars step to record what the error was, so that in display step it can display an appropriate message.
Note that using this function alone DOES NOT prevent it from proceeding to the next step, you will need to use addError() to keep it from proceeding to the next step, and addErrorMsg to let the display step know what is wrong.

Arguments

Name Type Description Default
$error_name string

How error message is accessed, handy to specify an error message to be displayed next to a specific input field

$msg string

Return value

Type Description
n/a n/a

addPreviewTemplateVars( array   $tpl_vars, ) : n/a

Description

Use this to add the tpl vars needed for preview button and box, on steps that could potentially be the last step and may need to add a preview button.

Arguments

Name Type Description Default
$tpl_vars array

The array of template vars to add the preview vars to, note that this is passed by reference

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

addStep( string   $step, string   $where = self::LAST_STEP, string   $otherStep = null, bool   $canCombine = true, ) : n/a

Description

Add a step to the cart system, with the option to insert the step before or after an already added step, or at the beginning of all the currently added steps.
Designed to be used in order items, in the init steps function.

Arguments

Name Type Description Default
$step string

The step to add, in the format item_name:step_name

$where string self::LAST_STEP
$otherStep string null
$canCombine bool

If false, will not be able to combine this step with others. Will be moved to be "after" all combined steps, so needs to be able to work "after" all combinable steps. Also item needs to be able to be previewed without this step taking place. {@since Version 7.2.0}

true

Return value

Type Description
n/a n/a

cartCheckVars( ) : n/a

Description

Checks the vars (or lets the order items check any vars they want to) for the built-in main cart display page.

Return value

Type Description
n/a n/a

cartDisplay( bool   $renderPage = true, ) : n/a

Description

Displays the main built-in cart display page.

Arguments

Name Type Description Default
$renderPage bool

If false, will skip actually displaying the page. Useful if needing to set everything up for a cart to be displayed, without actually displaying the cart.

true

Return value

Type Description
n/a n/a

cartLabel( ) : string

Description

Gets the label to use for the cart.

Return value

Type Description
string

cartProcess( ) : n/a

Description

Processes the vars (or lets the order items do any processing they want to) for the built-in main cart display page.

Return value

Type Description
n/a n/a

checkVars( string   $step = '', ) : bool

Description

Checks the input vars for problems, like if user didn't fill in a required field.
Acutally it leaves it up to each order item to do it.

Arguments

Name Type Description Default
$step string ''

Return value

Type Description
bool true if everything is good, false otherwise.

clearAllSteps( ) : n/a

Description

Clears all the steps. This is used mainly in the admin panel setting pages.

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

combinedCheckVars( ) : n/a

Description

CheckVars method for the combined step, just loops through all the steps combined, and runs the checkVars for each

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

combinedDisplay( ) : n/a

Description

Built-in step, that goes through list of combined steps and displayes all of them

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

combinedDisplayAjax( array   $tpl_vars, ) : n/a

Description

Does the ajax portion of combined display step, when steps are being loaded via AJAX call.

Arguments

Name Type Description Default
$tpl_vars array

The tpl vars as loaded in the main combinedDisplay method.

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

combinedLabel( ) : string

Description

Gets the label to use for the combined step.

Return value

Type Description
string

Tags

Name Description
since Version 7.2.0

combinedProcess( ) : n/a

Description

Process step for the combined step that is built in step for the cart

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

createNewCart( int   $userId, int   $adminId, string   $sessionId, bool   $useCart = true, ) : int

Description

Way to create a brand new cart (and attached order). This is used by init process and a few cart management tools in admin panel, it should not be called directly.

Arguments

Name Type Description Default
$userId int
$adminId int
$sessionId string
$useCart bool

If true, will assign the normal cart vars as is needed during the init process.

true

Return value

Type Description
int The cart ID for the created cart, or false on failure.

Tags

Name Description
since Version 6.0.0

deleteCheckVars( ) : n/a

Description

This is the checkvars method for the built-in delete step.

Return value

Type Description
n/a n/a

deleteDisplay( ) : n/a

Description

This is the display method for the built-in delete step.

Return value

Type Description
n/a n/a

deleteLabel( ) : string

Description

The delete label, used for the delete step (is just a blank string)

Return value

Type Description
string

deleteProcess( ) : n/a

Description

This is the process method for the built-in delete step.

Return value

Type Description
n/a n/a

displayCartInterruption( ) : n/a

Description

Displays the message saying that they are already in the middle of doing something, and gives them the option to either continue with it, or to cancel and remove it, and start on the new thing they are trying to do.

Return value

Type Description
n/a n/a

displaySingleOtherDetails( string   $item_type, ) : \unknown_type

Description

Mimics the other details step, but this is only used to display the info for specific item.
Designed so that you put your main settings to be set in other details step, then use this function if that info needs to be displayed on another step as well. This function calls display_page if everything goes well.

Arguments

Name Type Description Default
$item_type string
  • item type to call on to get the data for displaying on the other details page.

Return value

Type Description
\unknown_type

displayStep( ) : n/a

Description

Displays the current step, if a step is for an order item, hands it over to that order item to display the step.

Return value

Type Description
n/a n/a

forcePreviewOnStep( ) : bool

Description

If this returns true, the normal "continue" button should not be displayed on the step, ONLY the preview button should be shown. Making the only way to continue, is to preview the item, then click "accept and submit" button.

Return value

Type Description
bool

Tags

Name Description
since Version 7.2.2

get( string   $setting, mixed   $default = false, ) : Mixed

Description

Gets the specified item from the Cart's registry. Should only be used for settings that are global to the entire cart. This is not typical, usually you would set the setting on an individual order item, not the entire cart.

Arguments

Name Type Description Default
$setting string
$default mixed

If setting not set for cart, return this value instead

false

Return value

Type Description
Mixed the specified setting, or the $default if setting not found

getAction( ) : string

Description

Gets the action for the page.

Return value

Type Description
string

getAllSteps( ) : array

Description

Gets the array of all the steps for the current item.

Return value

Type Description
array

Tags

Name Description
since Version 7.2.0

getCartBaseUrl( boolean   $ssl = true, ) : string

Description

Generates the base URL of a=cart without any other parameters. Handy for instances where you need to create a url for a certain action, or to link to the cart, just append the extra parameters to the end of the url returned by this function. It automatically accounts for the SSL setting in the admin turned on or off, as long as $ssl is left to be true. If $ssl is set to false, it will use the non-ssl URL even if SSL is turned on in the admin.

Arguments

Name Type Description Default
$ssl boolean true

Return value

Type Description
string

getCartTotal( int   $up_to_process_order = 0, ) : float

Description

Gets the cost of all the items in the cart so far, by adding up all the getCost() values. If $up_to_process_order is not 0 (default value), it will only add up items who's process order is less than the process order specified.

Arguments

Name Type Description Default
$up_to_process_order int 0

Return value

Type Description
float

getChildItem( string   $item_name, ) : \geoOrderItem

Description

Gets the child order item as specified by the type name. Gets the one that is a child of the current main order item.
Requires that order and order items are serialized so that they have an ID already. Returns null if no child item by that name could be found.

Arguments

Name Type Description Default
$item_name string

Return value

Type Description
\geoOrderItem

getCommonTemplateVars( ) : array

Description

Gets an array of common template variables that are needed on most cart pages.

Return value

Type Description
array

Tags

Name Description
since Version 5.2.0

getCurrentStep( ) : string

Description

Retrieve the current step set for the cart.

Return value

Type Description
string

Tags

Name Description
since Version 7.2.0

getErrorMsg( string   $name, ) : string

Description

Gets an error message previously set (on same page load) using geoCart::setErrorMsg()

Arguments

Name Type Description Default
$name string

Return value

Type Description
string The error message, or an empty string if the error message is not found.

getErrorMsgs( ) : array

Description

Gets all the error messages in an associative array.

Return value

Type Description
array

getInstance( ) : \geoCart

Description

Only valid way to get an instance of the geoCart.
You would do something like: $cart = geoCart::getInstance();

Return value

Type Description
\geoCart Instance of geoCart

getNextStep( string   $currentStep = null, bool   $skipUncombined = false, ) : string

Description

Gets the next step after the current one.

Arguments

Name Type Description Default
$currentStep string

If specified, will check the next step after this one, otherwise will default to current step set in the cart. {@since Version 7.2.0}

null
$skipUncombined bool

If true, skip over all steps that are set to not be "combinable" (like JIT step or anon pass step). {@since Version 7.2.0}

false

Return value

Type Description
string

getPreviousStep( string   $currentStep = null, ) : string|null

Description

Gets the previous step before the current one. Note that this will not work if cart has switched from process of "adding" something to the cart, to the built-in cart steps.
If there is no step before the current one, or the current step is not in the list of steps, will return null.

Arguments

Name Type Description Default
$currentStep string

Will use this as the current step, defaults to the cart's current step if not specified.

null

Return value

Type Description
string|null The step before the currentStep, or null if there is a problem or the current step is the first one.

Tags

Name Description
since Version 7.2.3

getProcessFormUrl( boolean   $ssl = true, boolean   $onlyCart = false, ) : string

Description

Generates the URL to be used in a form tag, that would allow the form to submit so that the current page gets processed.
Note that this is ONLY the URL, it is not the entire FORM tag. It automatically accounts for the SSL setting in the admin turned on or off, as long as $ssl is left to be true. If $ssl is set to false, it will use the non-ssl URL even if SSL is turned on in the admin.

Arguments

Name Type Description Default
$ssl boolean true
$onlyCart boolean

If true, will only return base URL plus a=cart.

false

Return value

Type Description
string

init( bool   $onlyInitItems = false, int   $userId = null, bool   $renderPage = true, ) : n/a

Description

Initializes the cart for the first time in the page load.

Arguments

Name Type Description Default
$onlyInitItems bool

if true, will only initialize the cart order items, and not do any of the other stuff.

false
$userId int

If set, will create the cart for the given user instead of the user from the current session.

null
$renderPage bool

Only used if $onlyInitItems is false, if this is true, the page will be displayed, if false, everything will be done except any processing or checkvars calls, or the last step of displaying the page.

true

Return value

Type Description
n/a n/a

initItem( int   $item_id = 0, bool   $force_parent = true, bool|string   $enforceAnon = false, ) : bool

Description

Initializes an item, either creating a new one or restoring an existing one in the cart, and sets {@link geoCart::item} to the item.

Arguments

Name Type Description Default
$item_id int

The item id to restore, or if 0, will create a new item with the type specified by the currently set {@link geoCart::main_type}

0
$force_parent bool

if true, will make sure the item is a parent.

true
$enforceAnon bool|string

Only used if creating a new item. If true (strict), will call {@link geoOrderItem::enforceAnonymous} passing "aiscart" as first param. If string, will call {@link geoOrderItem::enforceAnonymous} passing $enforceAnon as first param. Note that the empty string or null is allowed. If false (strict), will not perform any anonymous checks.

false

Return value

Type Description
bool true if item was initialized, false otherwise.

initSession( int   $trys = 0, bool   $restoreOnly = false, ) : bool

Description

Used internally, to initialize the cart session data.

Arguments

Name Type Description Default
$trys int

Number of times session was inited.

0
$restoreOnly bool

If true, will not create a new session, or something like that...

false

Return value

Type Description
bool True if successful, false otherwise.

initSteps( ) : boolean

Description

Initializes the steps of the cart

Return value

Type Description
boolean

initStepsView( bool   $returnSteps = false, bool   $include_uncombined = true, ) : array|null

Description

Sets the steps info in the geoView class, so that templates can display current step and progress.

Arguments

Name Type Description Default
$returnSteps bool

If true, instead of setting steps on the view object, will return the steps in an array. {@since Version 7.2.0}

false
$include_uncombined bool

If false, will skip steps that are "not combined" {@since Version 7.2.0}

true

Return value

Type Description
array|null If $returnSteps is true, returns an array, otherwise does not return anything.

insertStep( string   $step, ) : n/a

Description

NOT Meant for use in initSteps functions in order items, use addStep for that.
Inserts a step right before the current one, then sets it up so that the inserted step will be the next called step when geoCart::getNextStep() is called. Designed to be used in order items in the check vars or process steps in order to change what step is actually displayed.

Arguments

Name Type Description Default
$step string

Return value

Type Description
n/a n/a

isCombinedStep( string   $step = null, ) : boolean

Description

Whether or not the "current" step (or step specified in parameter) is being combined with others or not. If this is "true" then your display step should not exit on it's own.
..

Arguments

Name Type Description Default
$step string

The step to see if is combined, step defaults to the current step if none is set currently.

null

Return value

Type Description
boolean

Tags

Name Description
since Version 7.2.0

isInMiddleOfSomething( ) : bool

Description

Whether or not the current cart is "in the middle of something", in other words, if you were to attempt to add something new to the cart, would it be interrupting something? Be sure the cart is init before calling this, even if only items are inited.

Return value

Type Description
bool True if it's in the middle of something, false otherwise.

Tags

Name Description
since Version 4.1.0

isRecurringCart( ) : bool

Description

Returns whether or not the cart is specifically a recurring cart or not.

Return value

Type Description
bool

Tags

Name Description
since Version 4.1.0

isRecurringPossible( ) : bool

Description

Checks to see if recurring billing is even possible given the current enabled payment gateways and whether any of them can handle processing recurring billing.

Return value

Type Description
bool

Tags

Name Description
since Version 4.1.0

isStandaloneCart( ) : bool

Description

Best way to tell if the cart is currently in "standalone" mode, meaning there can only be 1 thing in the cart right now, and that thing is already in there.

Return value

Type Description
bool

isStep( string   $step, ) : boolean

Description

Whether the step is one of the steps currently loaded. Note that this will return false if the step is a combined step, if wish to check that as well, use {@link geoCart::isCombinedStep()}

Arguments

Name Type Description Default
$step string

Return value

Type Description
boolean

Tags

Name Description
since Version 7.2.0

labelStep( string   $step = null, ) : string

Description

Returns the label for the current step, or the passed in step if provided.

Arguments

Name Type Description Default
$step string

If provided, will get the label for this step rather than the current step on the cart.

null

Return value

Type Description
string The label for the current step or step passed in $step

Tags

Name Description
since Version 7.2.0

other_detailsCheckVars( ) : n/a

Description

Special built-in step of "other details" aka listing extras, or any other misc. data needing to be collected, this checks the vars by calling each order item and letting it check the vars specific to it.

Return value

Type Description
n/a n/a

other_detailsDisplay( bool   $return = false, ) : Mixed

Description

Special built-in step of "other details" aka listing extras, or any other misc. data needing to be collected, this displays the step by calling each order item and letting it send in stuff to be displayed on the page.
See the _template order item for further documentation.

Arguments

Name Type Description Default
$return bool

if true, will return rendered display for other details

false

Return value

Type Description
Mixed

other_detailsLabel( ) : string

Description

Gets the label for the built in step of other details (aka extras).

Return value

Type Description
string

other_detailsProcess( ) : n/a

Description

Special built-in step of "other details" aka listing extras, or any other misc. data needing to be collected, this processes the vars by calling each order item and letting it process the vars specific to it.

Return value

Type Description
n/a n/a

payment_choicesCheckVars( ) : n/a

Description

Payment choices check vars method

Return value

Type Description
n/a n/a

payment_choicesDisplay( ) : n/a

Description

Displays the payment choices page.

Return value

Type Description
n/a n/a

payment_choicesLabel( ) : string

Description

Gets the label for the payment choices step.

Return value

Type Description
string

payment_choicesProcess( bool   $free_cart = false, ) : n/a

Description

This is the process method for the built in payment_choices step, it is the step that the invoice is created, site fees added, etc.

Arguments

Name Type Description Default
$free_cart bool

If true, treats it as if there is nothing owed for the cart.

false

Return value

Type Description
n/a n/a

performAction( string   $action, ) : n/a

Description

Performs the given action, usually this is done in init()

Arguments

Name Type Description Default
$action string

Return value

Type Description
n/a n/a

previewDisplay( ) : n/a

Description

This is the display method for the built-in preview step.

Return value

Type Description
n/a n/a

previewLabel( ) : string

Description

gets the label for the preview step, is just a blank string.

Return value

Type Description
string

processStep( string   $step = '', ) : n/a

Description

Processes a step, or rather, calls the process step for the current order item.

Arguments

Name Type Description Default
$step string

The step to process (will override the current step)

''

Return value

Type Description
n/a n/a

process_orderDisplay( ) : n/a

Description

The built in display method for process order step.

Return value

Type Description
n/a n/a

process_orderLabel( ) : string

Description

Gets the label for the process order step.

Return value

Type Description
string

remove( int   $id, ) : n/a

Description

Static function ideal for getting rid of a particular cart, without having to instantiate the cart class.

Arguments

Name Type Description Default
$id int

Return value

Type Description
n/a n/a

removeSession( int   $id = 0, bool   $saveOrder = true, ) : n/a

Description

Used to remove a cart session, this is used when a cart is done, paid for, and needs to be cleared out to allow for more junk to be added to.

Arguments

Name Type Description Default
$id int

If set, will remove the cart for the specified ID instead of the one for the current user.

0
$saveOrder bool

Added in Version 4.0.9: if true (default) and no ID passed in, it will automatically save the order attached to the cart before removing the cart.

true

Return value

Type Description
n/a n/a

save( ) : \geoCart

Description

Saves the cart, the order attached to the cart, and all the stuff in that order. This is normally done by app_bottom but will need to be done manually if you are calling removeSession as otherwise, the final order changes won't be able to be saved.

Return value

Type Description
\geoCart Returns instance of geoCart to allow method chaining

set( string   $item, mixed   $value, ) : n/a

Description

Sets the given item to the given value. If item is one of built-in items, it sets that instead of something from the registry.

Arguments

Name Type Description Default
$item string
$value mixed

Return value

Type Description
n/a n/a

setCurrentStep( string   $step, ) : n/a

Description

Set the current step for the cart. This is usually only used in special cases, most of the time should let the cart set the step automatically.

Arguments

Name Type Description Default
$step string

Return value

Type Description
n/a n/a

Tags

Name Description
since Version 7.2.0

setPricePlan( int   $pricePlanId = 0, int   $category = 0, ) : bool

Description

Gets the price plan for the user, and stores it in the cart variable

Arguments

Name Type Description Default
$pricePlanId int 0
$category int 0

Return value

Type Description
bool True if price plan was retrieved, false otherwise

showPreviewBox( bool   $inProcess = false, ) : boolean

Description

Check to see if it should be showing an inline preview box. This is used in 2 places, first in the process step automatically called by the cart, and second by {@see geoCart::addPreviewTemplateVars()} to let templates know to display the preview box.

Arguments

Name Type Description Default
$inProcess bool

Only set to true if in the process step and should be adding an error to prevent going to next step. Note that in that case it is automatically called by the cart, no need for individual items to call this during process step.

false

Return value

Type Description
boolean

Tags

Name Description
since Version 7.2.0

showPreviewButtonOnStep( ) : bool

Description

See if should show the preview button on the current step. Checks to see if the step is the last one before the cart step, and if the current item is set to skip the cart, or set to "always" show the preview (if not skipping the cart, and not set to "always" preview, there is a preview shown on the cart so no need to show preview during the process of adding the item)

Return value

Type Description
bool True if should show the preview button, false otherwise.

Tags

Name Description
since Version 7.2.0

skipCart( bool   $checkSettings = true, bool   $showOrderComplete = true, ) : bool

Description

Used to skip the cart and checkout steps.
This will only skip the cart / checkout steps, if the cart total is $0 and there is only one parent item in the cart. In addition, prior to calling this, the current step must be set to "cart", so be aware of that if attempting to call this inside of a step processing. Note that this is not typically used directly by an order item, it should only be used in special cases. This is primarily used by the cart system directly.

Arguments

Name Type Description Default
$checkSettings bool

If false, will skip the setting check for whether to skip the cart or not (set in admin in the listing placement steps page), defaults to true. Parameter {@since Version 7.2.3}

true
$showOrderComplete bool

If false, will do everything leading up to actually displaying the order complete page. If true (default), will also display the order complete page and stop further script execution. Parameter {@since Version 7.2.3}

true

Return value

Type Description
bool Returns bool false if it did not skip the cart for some reason. Returns bool true if $showOrderComplete is false and the stuff was able to skip the cart and checkout pages successfully. Does not return at all if skiping cart is successful and $showOrderComplete is true, as that will make it show order complete page and stop further script execution early.

Tags

Name Description
since Version 7.2.0

stepIsActive( String   $name, ) : bool

Description

Determines whether a given step is in-use during the current cart process.

Arguments

Name Type Description Default
$name String

The name of the step to check

Return value

Type Description
bool true if the step is active, false otherwise

Tags

Name Description
since Version 6.0.7

Properties

$_pendingChanges, $actions_performed, $all_steps, $all_steps_standard, $built_in_steps, $cart_variables, $combined_steps, $current_step, $db, $error_msgs, $errors, $initialized_full, $initialized_onlyItems, $item, $main_type, $order, $price_plan, $session, $site, $uncombined_steps, $user_data,

boolean  private  $_pendingChanges =

Used internally to remember whether there has been changes to the order since it was last serialized. If there is not changes, when serialize is called, nothing will be done.


array  public  $actions_performed = array()

Associative array of actions and what item types those actions were performed on if applicable.
Useful for telling if a particular item type was just canceled, in order to do something special at the time the cart is being displayed.

array  protected  $all_steps = array()

Stores all of the steps


array  protected  $all_steps_standard = array()

Stores all of the "standard" steps "would be" without combining them


array  private  $built_in_steps = array('delete', 'preview', 'combined', 'other_details', 'cart', 'payment_choices', 'process_order')

The built in steps


array  public  $cart_variables =

The cart vars, used to hold vars specific to the current "cart session".


array  private  $combined_steps = array()

Works like {@link geoCart::$all_steps}, but this is the combined steps that will be part of the combined step.


string  public  $current_step =

The current step the cart is on.


\DataAccess  public  $db =

The DataAccess object for easy access.


array  public  $error_msgs = array()

An array of error messages.


int  public  $errors = 0

Number of errors currently accumulated, if there are any number more than 0 the cart will not proceed to the next step automatically. Don't modify this directly, instead use {@link geoCart::addError()}


bool  public  $initialized_full = false

Whether or not the cart has been "fully" initialized or not.


bool  public  $initialized_onlyItems = false

Whether or not the cart has been partially inited or not.


\geoOrderItem  public  $item =

Order item, the type will match main_type.


string  public  $main_type =

This is the "main type" that is currently being "worked on" in the cart.
If not working on any specific item type, will be set to 'cart'.

\geoOrder  public  $order =

Order attached to the cart


array  public  $price_plan =

An array of all the current price plan settings.


\geoSession  public  $session =

The geoSession object for easy access.


\tempSiteClass  public  $site =

Site (temporary till we move everything in site to other classes)


array  private  $uncombined_steps = array()

Steps that are not able to be combined, like the JIT or anonymous steps, are kept track of here.


array  public  $user_data =

The current user's data.


Constants

  AFTER_STEP = 'after'




  BEFORE_STEP = 'before'




  COMBINED_PREFIX = '_system_combine:'

Used as the prefix for setting names, used to store values on plan items that deal with combined steps.


  FIRST_STEP = 'first'




  LAST_STEP = 'last'




  REPLACE_STEP = 'replace'




Documentation was generated by phpDocumentor 2.2.0 .

Namespaces

  • global

    Packages

    • Default
      • ExampleAddon
        • addon_example_admin
          In charge of doing stuff on the admin side, this is optional.
        • addon_example_info
          Required class for addons, this is the Addon information class, used by the addon system to determine what the addon can do. Also contains info about the addon that can be viewed in the addon management page in the admin.
        • addon_example_pages
          Addon page class, used by the addon system to display pages on the client side.
        • addon_example_setup
          This class is not required. If it, and the function for a particular routine exist, then that function will be called IN ADDITION TO the automated routines of the addon framework.
        • addon_example_tags
          Expects one function for each tag. Function name should be the same as the tag name. Can also have a constructor if anything needs to be constructed.
        • addon_example_util
          This is where to put functions that the main part of the addon will use.
        • eWidgetOrderItem
          This order item is designed to allow users on your site to purchase an eWidget.
      • System
        • DataAccess
          This is the main Database access object.
        • Singleton
          Singleton method class
        • _templateOrderItem
          Developers: use this file as a template to create a new order item.
        • _templatePaymentGateway
          This is the "developer template" payment gateway handler, a developer could use this file as a starting point for creating a new payment gateway in the system.
        • geoAPI
          The main system class for receiving and handling remote API calls, this acts as a translation layer between the communication with the "outside" and each API call.
        • geoAddon
          This is the class that handles anything and everything to do with addons.
        • geoArrayTools
          Utility functions for manipulating arrays
        • geoBrowse
          Contains functions common to browsing listings
        • geoBrowsingFilter
          System for activating, storing, and deactivating browsing filters.
        • geoCJAX
          Class that wraps the CJAX_FRAMEWORK, used to get the CJAX class.
        • geoCache
          This is the main part of the Geo cache system, it does all the "low level" stuff like writing files and escaping cache data.
        • geoCacheModule
          Part of Geo Cache system, specifically tuned to work best with cacheing module data (which will be an array).
        • geoCachePage
          Cache system specifically tuned to work best with cacheing output of pages and modules
        • geoCacheSetting
          Part of Geo Cache system, specifically tuned to work best with cacheing site-wide key=value type settings.
        • geoCacheText
          Part of Geo Cache system, this part specifically tuned to work best with cacheing language specific messages.
        • geoCalendar
          Holds utility method(s) for manipulating stuff dealing with calendar selector.
        • geoCart
          This class is behind the cart, loading all the order items and such and displaying, and processing all the different pages.
        • geoCategory
          Utility class that holds various methods to do stuff with categories in the system.
        • geoCombineResources
          This class helps to combine CSS and JS files, minify them, and optionally compress them.
        • geoCron
          This is the cron job backend, it handles all the communication and security and all that.
        • geoCrypt
          Class to use for encrypting information that needs to be able to be retrieved later.
        • geoDate
          Holds utility method(s) for manipulating stuff dealing with dates.
        • geoEmail
          Class that sends out e-mails.
        • geoFields
          Class that holds settings information for fields to use.
        • geoFieldsField
          A mini object to hold data about a specific field.
        • geoFile
          As the name implies, this is used for file-based utility methods.
        • geoFilter
          A few utility methods, good for filtering stuff.
        • geoFormatString
          Used to display a message nice and pretty, we'll probably be getting rid of this class though so don't go crazy using it.
        • geoHTML
          Class to generate chunks of HTML that are very common, used the most in the admin panel.
        • geoImage
          This class is responsible for a lot of the image processing, along with other aspects like generating the image tag for thumbnails.
        • geoInvoice
          This is the invoice object representing an invoice in the system.
        • geoLeveledField
          Class for doing common things with leveled fields.
        • geoListing
          A listing object, basically a container object for particular listing.
        • geoListingDisplay
          This is basically a container that is responsible for helping to display {listing .
        • geoListingFeed
          Class that helps to render RSS or other types of feeds based on list of listings.
        • geoMaster
          This is dedicated class for getting the value of, and setting, the various "master switches" within the software. Since this is meant as an easy way to get the values of master switches, most of the methods are static.
        • geoNumber
          Utility functions relating to number conversion/manipulation/validation ect.
        • geoOrder
          The geoOrder object, an object representation of an order in the system.
        • geoOrderItem
          The class that all order items must extend.
        • geoPC
          Used for login credential validation, password hashing, etc. along with software licensing.
        • geoPagination
          Utility functions useful for generating pagination of a results page such as when browing ads or searching
        • geoPaymentGateway
          This class should be extended by each different payment gateway, this will have some default functions that each gateway will inherit, and also has a few final static methods used by the system to affect all order items.
        • geoPlanItem
          A container to hold settings for a particular order item type, according to price plan ID, and optionally category ID for category specific settings.
        • geoRecurringBilling
          The geoRecurringBilling object, an object representation of a recurring billing in the system.
        • geoRegion
          Stuff for regions and sub-regions.
        • geoRegistry
          Handy little object, can be used to set registry type settings.
        • geoSearchUtils
          Class for search utilities.
        • geoSellerBuyer
          Handles back-end for the seller/buyer payment gateways, to allow the buyer to more easily pay the seller for a won auction. This handles the underlying system, but the actual work is done by individual seller/buyer gateways, for instance the Paypal buy-now functionality.
        • geoSession
          Manages session storage and session cookies for user sessions.
        • geoString
          Utility functions relating to languages and string manipulation.
        • geoStringData
          This class is to store accented chars, to be used by {@link geoString::removeAccents()}, mainly to keep the String.class.php file un-cluttered.
        • geoTable
          NOT FULLY IMPLEMENTED! Do not use this class yet as it is not finished and may change drastically before we are done with it, or may even be removed.
        • geoTableRow
          NOT FULLY IMPLEMENTED! Do not use this class yet as it is not finished and may change drastically before we are done with it, or may even be removed.
        • geoTableRowset
          NOT FULLY IMPLEMENTED! Do not use this class yet as it is not finished and may change drastically before we are done with it, or may even be removed.
        • geoTableSelect
          Class used to generate a select query, useful when multiple areas want to affect a single query, for instance when generating a search query and there are addons involved.
        • geoTables
          Used to hold database table names, used throughout the code.
        • geoTemplate
          Template object that extends the Smarty class (a 3rd party library) to enable using templates to display things.
        • geoTransaction
          This is the object used for a transaction in the order and invoice system.
        • geoUser
          An object representative of a certain user in the system.
        • geoUserRating
          Store, retrieve, and display inter-user ratings
        • geoUtil
          Misc utility functions
        • geoView
          As the name implies, this is used for creating the page view. It does take a little setup (like any class), the setup is normally done in the display_page method in geoSite, or display_page in geoAdmin if displaying a page in the admin.
        • iApiTransport
          Interface for API Transports, a transport must implement this interface for the system to use it.
        • iOrderItem
          You cannot have abstract static functions, so instead need to have an interface to force the given static functions to be defined.
        • metaDbTables
          Used so that old locations that use the old name geoTables will still work.