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]
GetContent()
Initialize the cart contents. should be used on nay page that includes the eCart object after the require_once line
<?php
//WA eCart Include
require_once("WA_eCart/eCart1_PHP.php");
?>
<?php
$eCart1->GetContent();
?>
SaveCart()
Save the cart contents
$eCart1->SaveCart();
BOF()
Returns true if the pointer is on the first line item, else returns false
$eCart1->BOF();
ClearCart()
Remove all items from the cart
$eCart1->ClearCart();
ResetAll()
Reset the Cart
$eCart1->ResetAll();
DeleteFromCart($index, $reIndex)
$index - array index of the item to remove
$reIndex - true or false to reindex the cart.
$eCart1->DeleteFromCart(1, true);
DisplayInfo($ItemProperty)
Used to display a cart column value on the page:
echo($eCart1->DisplayInfo("Name"));
EOF()
$eCart1->EOF()
RulesInformation($theSet)
Returns an array of the rules defined for theSet parameter.
Parameters:
$theSet - can be "Charges", "Discounts", "tax", "Shipping"
$eCart1->RulesInformation("Discounts")
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"
$eCart1->Rules_EOF("Tax");
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
$eCart1->GetInfo(3, "Quantity");
GetItem($ItemID)
returns an array of the properties for the specified item
Parameters:
$ItemID - The ID of the Item in the cart
$eCart1->GetItem(5);
InCart($itemID)
returns true if the ID passed is in the cart, false if not
Parameters:
$itemID - ID for the Item to look for
$eCart1->InCart(3);
IsEmpty()
returns true if the cart is empty, false if there are items in the cart;
$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
$eCart1->Move(3);
MoveFirst()
move the cart pointer to the first item.
$eCart1->MoveFirst();
MoveLast()
move the cart pointer to the last item:
$eCart1->MoveLast();
MoveNext()
move the cart pointer to the next item:
$eCart1->MoveNext();
MovePrevious()
move the cart pointer to the previous item
$eCart1->MovePrevious()
Rules_MoveNext($theSet)
move the cart pointer to the next rule in the specified set
Parameters:
$theSet - can be "Discounts, "Shipping", Tax", "Charges"
$eCart1->Rules_MoveNext("Shipping")
Rules_MoveFirst($theSet)
move the cart pointer to the First rule in the specified set
Parameters:
$theSet - can be "Discounts, "Shipping", Tax", "Charges"
$eCart1->Rules_MoveFirst("Discounts")
ReIndexContent()
Recreate the cart index
$eCart->ReIndexContent();
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.
$eCart1->TotalColumn("Quantity")
GetCharges()
Returns the Subtotal of all active Charges:
$eCart1->GetCharges();
GetDiscounts()
$eCart1->GetDiscounts();
GetTax()
$eCart1->GetTax();
GetShipping()
$eCart1->GetShipping();
TotalRuleset($theSet)
Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"
$eCart1->TotalRuleset("Discounts");
GetRuleValueByName($theSet, $theName)
Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"
$eCart1->GetRuleValueByName($theSet, $theName);
RuleLooperName($theSet)
Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"
$eCart1->RuleLooperName("Shipping");
RuleLooperValue($theSet)
Parameters:
$theSet - can be "Discounts", "Shipping", Tax", "Charges"
$eCart1->RuleLooperValue("Charges");
ConditionalTotal($ColumnName, $ConditionalColumn, $ConditionalValue)
$eCart1->ConditionalTotal("Quantity", "Name", "Widget A");
GetTaxableTotal()
$eCart1->GetTaxableTotal();
GetTaxedSubtotal()
$eCart1->GetTaxedSubtotal();
GrandTotal()
$eCart1->GrandTotal();
DeleteZeroQuantity()
$eCart1->DeleteZeroQuantity();
Session_SaveCart()
$eCart1->Session_SaveCart();
Session_GetContent()
$eCart1->Session_GetContent();
Cookie_SaveCart()
$eCart1->Cookie_SaveCart();
Cookie_GetContent()
$eCart1->Cookie_GetContent();
WA_eCart_WeightConversion($theWeight, $startUnits, $endUnits)
$eCart1->WA_eCart_WeightConversion($theWeight, $startUnits, $endUnits);
WA_eCart_GetWeightFromPounds($lbsWeight, $endUnits)
$eCart1->WA_eCart_GetWeightFromPounds($lbsWeight, $endUnits);
WA_eCart_GetGroupDecimalChars($numDisplay)
$eCart1->WA_eCart_GetGroupDecimalChars($numDisplay);
WA_eCart_DisplayMoney($theObject, $theAmount)
WA_eCart_DisplayMoney(eCart1, "12.99")
WA_eCart_DisplayWeight($theObject, $theWeight)
$eCart1->IsEmpty();
WA_eCart_DisplayNumber($theObject, $theNumber)
$eCart1->IsEmpty();
WA_eCart_MaskOutput($tValue, $tMaskType, $tMaskArguments)
$eCart1->IsEmpty();
WA_eCart_MaskNumber($theNumStr, $groupChar, $decimalChar, $forceDec, $numDec)
$eCart1->IsEmpty();
WA_eCart_MaskWeightMoney($theNumStr, $symbolStr, $leftOrRight, $groupChar, $decimalChar, $forceDec, $numDec)
$eCart1->IsEmpty();
WA_eCart_MaskDate($dateVar, $dateFormat, $timeFormat)
$eCart1->IsEmpty();
WA_eCart_FormatNumber($theNumStr, $forceDec, $numDec)
$eCart1->IsEmpty();
WA_RoundToDecimals($theNum, $theDecimals)
$eCart1->IsEmpty();
WA_GetCountryName($countryCode)
$eCart1->IsEmpty();
WAEC_findRecordMySQL($theRS, $theCol, $theVal)
$eCart1->IsEmpty();
WA_isValidPayPal()
$eCart1->IsEmpty();
WAEC_getTimestamp()
$eCart1->IsEmpty();
siteToPageRel($theSite)
$eCart1->IsEmpty();
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 commentsYour friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.