close ad
 
Important WebAssist Announcement
open ad
View Menu

Web development tutorial

eCart function referance

Tutorial created by Jason Byrnes, WebAssist

Categories: eCart

rating

This is a reference for the functions defined by eCart

[url=http://www.webassist.com/community/tutorials/view_tutorial.php?tid=200#section1]GetContent[/url]

arrow downIndex

  1. GetContent
  2. SaveCart
  3. BOF
  4. ClearCart
  5. ResetAll
  6. DeleteFromCart
  7. DisplayInfo
  8. EOF
  9. RulesInformation
  10. Rules_EOF

arrow downGetContent

GetContent()

Initialize the cart contents. should be used on nay page that includes the eCart object after the require_once line

php:
<?php
//WA eCart Include
require_once("WA_eCart/eCart1_PHP.php");
?>
<?php
$eCart1
->GetContent();
?>

arrow downSaveCart

SaveCart()

Save the cart contents

php:
$eCart1->SaveCart();

BOF()


Returns true if the pointer is on the first line item, else returns false

php:
$eCart1->BOF();

arrow downClearCart

ClearCart()

Remove all items from the cart

php:
$eCart1->ClearCart();

arrow downResetAll

ResetAll()

Reset the Cart

php:
$eCart1->ResetAll();

arrow downDeleteFromCart

DeleteFromCart($index, $reIndex)


$index - array index of the item to remove
$reIndex - true or false to reindex the cart.

php:
$eCart1->DeleteFromCart(1, true);

arrow downDisplayInfo

DisplayInfo($ItemProperty)

Used to display a cart column value on the page:

php:
echo($eCart1->DisplayInfo("Name"));

arrow downEOF()

EOF()



php:
$eCart1->EOF()

arrow downRulesInformation

RulesInformation($theSet)

Returns an array of the rules defined for theSet parameter.

Parameters:
$theSet - can be "Charges", "Discounts", "tax", "Shipping"

php:
$eCart1->RulesInformation("Discounts")

arrow downRules_EOF

Rules_EOF($theSet)

Returns true if the pointer is on the last rule for the selected set.

Parameters:
$theSet - can be "Charges", "Discounts", "Tax", "Shipping"

php:
$eCart1->Rules_EOF("Tax");

arrow downGetInfo

GetInfo($ItemID, $ItemProperty)

Returns the Item property for the Item ID that is passed.

Parameters:
$ItemID - ID for the item in the cart
$ItemProperty - name of the cart column value to return

php:
$eCart1->GetInfo(3, "Quantity");

arrow downGetItem

GetItem($ItemID)

returns an array of the properties for the specified item

Parameters:
$ItemID - The ID of the Item in the cart

php:
$eCart1->GetItem(5);

arrow downInCart

InCart($itemID)

returns true if the ID passed is in the cart, false if not

Parameters:
$itemID - ID for the Item to look for

php:
$eCart1->InCart(3);

arrow downIsEmpty

IsEmpty()

returns true if the cart is empty, false if there are items in the cart;

php:
$eCart1->IsEmpty();

Move($modifier)

Move the cart pointer the specified number in the list of line items

Parameters:
$modifier - number of line item to move the pointer

php:
$eCart1->Move(3);

arrow downMoveFirst

MoveFirst()

move the cart pointer to the first item.


php:
$eCart1->MoveFirst();

arrow downMoveLast

MoveLast()

move the cart pointer to the last item:

php:
$eCart1->MoveLast();

arrow downMoveNext

MoveNext()

move the cart pointer to the next item:

php:
$eCart1->MoveNext();

arrow downMovePrevious

MovePrevious()

move the cart pointer to the previous item

php:
$eCart1->MovePrevious()

arrow downRules_MoveNext

Rules_MoveNext($theSet)

move the cart pointer to the next rule in the specified set

Parameters:
$theSet - can be "Discounts, "Shipping", Tax", "Charges"

php:
$eCart1->Rules_MoveNext("Shipping")

arrow downRules_MoveFirst

Rules_MoveFirst($theSet)

move the cart pointer to the First rule in the specified set

Parameters:
$theSet - can be "Discounts, "Shipping", Tax", "Charges"


php:
$eCart1->Rules_MoveFirst("Discounts")

arrow downReIndexContent()

ReIndexContent()

Recreate the cart index


php:
$eCart->ReIndexContent();

arrow downTotalColumn

TotalColumn($ColumnName)

Returns the SubTotal of cart column for all items in the cart, used for total quantity as an example:

Parameters:
$ColumnName - the name of the column to calcualte subtotal for.

php:
$eCart1->TotalColumn("Quantity")

arrow downGetCharges

GetCharges()

Returns the Subtotal of all active Charges:

php:
$eCart1->GetCharges();

arrow downGetDiscounts

GetDiscounts()



php:
$eCart1->GetDiscounts();

arrow downGetTax

GetTax()


php:
$eCart1->GetTax();

arrow downGetShipping

GetShipping()


php:
$eCart1->GetShipping();

arrow downTotalRuleset

TotalRuleset($theSet)

Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"


php:
$eCart1->TotalRuleset("Discounts");

arrow downGetRuleValueByName

GetRuleValueByName($theSet, $theName)

Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"


php:
$eCart1->GetRuleValueByName($theSet, $theName);

arrow downRuleLooperName

RuleLooperName($theSet)

Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"


php:
$eCart1->RuleLooperName("Shipping");

arrow downRuleLooperValue

RuleLooperValue($theSet)

Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"


php:
$eCart1->RuleLooperValue("Charges");

arrow downConditionalTotal

ConditionalTotal($ColumnName, $ConditionalColumn, $ConditionalValue)


php:
$eCart1->ConditionalTotal("Quantity", "Name", "Widget A");

arrow downGetTaxableTotal

GetTaxableTotal()


php:
$eCart1->GetTaxableTotal();

arrow downGetTaxedSubtotal

GetTaxedSubtotal()


php:
$eCart1->GetTaxedSubtotal();

arrow downGrandTotal

GrandTotal()


php:
$eCart1->GrandTotal();

arrow downDeleteZeroQuantity

DeleteZeroQuantity()


php:
$eCart1->DeleteZeroQuantity();

arrow downSession_SaveCart

Session_SaveCart()


php:
$eCart1->Session_SaveCart();

arrow downSession_GetContent

Session_GetContent()


php:
$eCart1->Session_GetContent();

arrow downCookie_SaveCart

Cookie_SaveCart()


php:
$eCart1->Cookie_SaveCart();

arrow downCookie_GetContent

Cookie_GetContent()


php:
$eCart1->Cookie_GetContent();

arrow downWA_eCart_WeightConversion

WA_eCart_WeightConversion($theWeight, $startUnits, $endUnits)


php:
$eCart1->WA_eCart_WeightConversion($theWeight, $startUnits, $endUnits);

arrow downWA_eCart_GetWeightFromPounds

WA_eCart_GetWeightFromPounds($lbsWeight, $endUnits)


php:
$eCart1->WA_eCart_GetWeightFromPounds($lbsWeight, $endUnits);

arrow downWA_eCart_GetGroupDecimalChars

WA_eCart_GetGroupDecimalChars($numDisplay)


php:
$eCart1->WA_eCart_GetGroupDecimalChars($numDisplay);

arrow downWA_eCart_DisplayMoney

WA_eCart_DisplayMoney($theObject, $theAmount)


php:
WA_eCart_DisplayMoney(eCart1, "12.99")

arrow downWA_eCart_DisplayWeight

WA_eCart_DisplayWeight($theObject, $theWeight)


php:
$eCart1->IsEmpty();

arrow downWA_eCart_DisplayNumber

WA_eCart_DisplayNumber($theObject, $theNumber)


php:
$eCart1->IsEmpty();

arrow downWA_eCart_MaskOutput

WA_eCart_MaskOutput($tValue, $tMaskType, $tMaskArguments)


php:
$eCart1->IsEmpty();

arrow downWA_eCart_MaskNumber

WA_eCart_MaskNumber($theNumStr, $groupChar, $decimalChar, $forceDec, $numDec)


php:
$eCart1->IsEmpty();

arrow downWA_eCart_MaskWeightMoney

WA_eCart_MaskWeightMoney($theNumStr, $symbolStr, $leftOrRight, $groupChar, $decimalChar, $forceDec, $numDec)


php:
$eCart1->IsEmpty();

arrow downWA_eCart_MaskDate

WA_eCart_MaskDate($dateVar, $dateFormat, $timeFormat)


php:
$eCart1->IsEmpty();

arrow downWA_eCart_FormatNumber

WA_eCart_FormatNumber($theNumStr, $forceDec, $numDec)


php:
$eCart1->IsEmpty();

arrow downWA_RoundToDecimals

WA_RoundToDecimals($theNum, $theDecimals)


php:
$eCart1->IsEmpty();

arrow downWA_GetCountryName

WA_GetCountryName($countryCode)


php:
$eCart1->IsEmpty();

arrow downWAEC_findRecordMySQL

WAEC_findRecordMySQL($theRS, $theCol, $theVal)


php:
$eCart1->IsEmpty();

arrow downWA_isValidPayPal

WA_isValidPayPal()


php:
$eCart1->IsEmpty();

arrow downWAEC_getTimestamp

WAEC_getTimestamp()


php:
$eCart1->IsEmpty();

arrow downsiteToPageRel

siteToPageRel($theSite)


php:
$eCart1->IsEmpty();

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.