Tutorial Extension
1.0.0
SellerDeck Extensions - Tutorial Extension
|
Public Member Functions | |
__construct ($oCatalogDB, $oShippingDB) | |
GetCountry () | |
GetTaxDefinition () | |
GenerateOpaqueShipDataElements ($sCountryName) | |
GenerateOpaqueShipData ($sCountry, $nCost) | |
GetInternationalShipping ($sCountryName) | |
GenerateOpaqueShipDataForOrderDetail ($aProduct) | |
GenerateTaxModelOpaqueData ($sCountryName) | |
IsTaxing () | |
GetSimpleTaxes ($aTaxModel) | |
GetCountryTaxes ($sCountryName) | |
GetTaxModel () | |
GetCountryTax ($sCountryName, $nTaxNo=1) | |
GenerateTaxOpaqueData ($sCountryName, $nTaxIndex) | |
GetTaxBands () | |
GenerateTaxOpaqueDataForOrderDetail ($oTaxBand) | |
NormalizeTaxBand ($vTaxBand) | |
ParseProductTaxData ($sTaxOpaqueData, $aDefaultTaxBandAttributes=[]) | |
LoadTaxes ($sCountryName) | |
TransformOrderToXMLArray ($oOrder) | |
AddCustomTaxToDefinition ($sCountryName, $nTaxIndex) | |
SetCustomTax ($sCountryName, $nTaxIndex, $aOrderDetailTaxXML, $nCustomRate) | |
AddTaxBands ($sCountryName, $aOrderProducts, $aOrderDetailTaxXMLs) | |
GetFirstTaxBand ($sCountryName, $nTaxIndex) | |
GetTaxBandsFromDefinition ($sCountryName, $aOrderProduct) | |
GetTaxBandIDs ($aTaxBands) | |
GetShippingLine ($dShipping, $sCountryName) | |
CountCustom ($aTaxBandIDs) | |
ProcessTaxes ($sCountryName, $aOrderProducts, $aOrderDetailTaxXMLs, $dShipping=0) | |
Public Attributes | |
TAX_ROUND_SCIENTIFIC_DOWN | |
TAX_ROUND_PER_ITEM | |
__construct | ( | $oCatalogDB, | |
$oShippingDB | |||
) |
AddCustomTaxToDefinition | ( | $sCountryName, | |
$nTaxIndex | |||
) |
AddTaxBands | ( | $sCountryName, | |
$aOrderProducts, | |||
$aOrderDetailTaxXMLs | |||
) |
AddTaxBands - Adds Tax Bands
public
string | $sCountryName | Country Name |
array | $aOrderProducts | Order Products |
array | $aOrderDetailTaxXMLs | Order Detail Tax XML |
Definition at line 691 of file CTax.php.
CountCustom | ( | $aTaxBandIDs | ) |
GenerateOpaqueShipData | ( | $sCountry, | |
$nCost | |||
) |
GenerateOpaqueShipData - Generates Opaque Shipping Data
public
string | $sCountry | Country name |
int | $nCost | Shipping Cost |
Definition at line 147 of file CTax.php.
GenerateOpaqueShipDataElements | ( | $sCountryName | ) |
GenerateOpaqueShipDataElements - Generates Opaque Shipping Data Elements
public
string | $sCountryName | Country name |
GenerateOpaqueShipDataForOrderDetail | ( | $aProduct | ) |
GenerateTaxModelOpaqueData | ( | $sCountryName | ) |
GenerateTaxModelOpaqueData - Generates Tax Model Opaque Data
Tax model information
eTaxModel=eTaxBy=Shipping Tax 1 Opaque data=Shipping Tax 2 Opaque Data=Handling Tax 1 Opaque Data=Handling Tax 2 Opaque Data
eTaxModel 0 - simple 1 - advanced
eTaxBy 0 - always tax 1 - tax by invoice address 2 - tax by delivery address
example: 1=2=0=0=0=Zero-Rated=0=0=0=??=0=0=0=??=0=0=0=??=
public
string | $sCountryName | Country Name |
Definition at line 221 of file CTax.php.
GenerateTaxOpaqueData | ( | $sCountryName, | |
$nTaxIndex | |||
) |
GenerateTaxOpaqueData - Generates Tax Opaque Data
Tax 1 information TaxName=RoundRule=RoundGroup=TaxOtherTaxesFlag=LowTreshold=HighTreshold= AllowExemption=TaxID
TaxName - tax name RoundRule - tax rounding rule Reference to [TaxRules].[nTaxRulesID] RoundGroup- tax rounding group 0 = round tax per order line 1 = round tax per order item 2 = round tax per order TaxOtherTaxesFlag - whether tax is cumulative 0 = false 1 = true LowThreshold - low threshold (integer) HighThreshold- high threshold (integer) AllowExemption - whether the user exemption is allowed 0 = disallowed 1 = allowed TaxID - tax ID
public
string | $sCountryName | Country Name |
GenerateTaxOpaqueDataForOrderDetail | ( | $oTaxBand | ) |
GenerateTaxOpaqueDataForOrderDetail - Generates Tax Opaque Data
Shipping /Handling Tax opaque data Band ID=Band Rate=Custom Rate=Band Name=
Band ID string for the band ID Band Rate string for the band rate Custom Rate string for the custom rate Band Name string for the band name
public
object | $oTaxBand | Tax Band |
GetCountry | ( | ) |
GetCountry - Gets Country from DB
public
GetCountryTax | ( | $sCountryName, | |
$nTaxNo = 1 |
|||
) |
GetCountryTax - Get Country Tax
public
string | $sCountryName | Country Name |
GetCountryTaxes | ( | $sCountryName | ) |
GetFirstTaxBand | ( | $sCountryName, | |
$nTaxIndex | |||
) |
GetFirstTaxBand - Get First Tax Band
public
string | $sCountryName | Country Name |
int | $nTaxIndex | Tax Index |
GetInternationalShipping | ( | $sCountryName | ) |
GetInternationalShipping - Gets International Shipping
Find the matching value in sCountryCode in the Countries table of the SellerDeck database and lookup nCountryID for the record Cross reference nCountryID against RegionID in the ZoneMembers table of the shipping database to get the zone name (ZoneID) For each Zone containing the country, look up by name (ZoneID) against the ZoneName in the Zones table. If ANY zone containing the country has bInternational set to -1, set the international shipping flag for the order (see SD-2782).
public
string | $sCountryName | Country name |
Definition at line 166 of file CTax.php.
GetShippingLine | ( | $dShipping, | |
$sCountryName | |||
) |
GetShippingLine - Get Shipping Line
public
double | $dShipping | Shipping |
Definition at line 793 of file CTax.php.
GetSimpleTaxes | ( | $aTaxModel | ) |
GetTaxBandIDs | ( | $aTaxBands | ) |
GetTaxBands | ( | ) |
GetTaxBandsFromDefinition | ( | $sCountryName, | |
$aOrderProduct | |||
) |
GetTaxBandsFromDefinition - Get Tax Bands From Definition
public
string | $sCountryName | Country Name |
array | $aOrderProduct | Order Product data |
Definition at line 756 of file CTax.php.
GetTaxDefinition | ( | ) |
GetTaxModel | ( | ) |
GetTaxModel - Get Tax Model
public
IsTaxing | ( | ) |
LoadTaxes | ( | $sCountryName | ) |
NormalizeTaxBand | ( | $vTaxBand | ) |
ParseProductTaxData | ( | $sTaxOpaqueData, | |
$aDefaultTaxBandAttributes = [] |
|||
) |
ParseProductTaxData - Parses Product Tax Data
public
string | $sTaxOpaqueData | Tax Opaque Data |
arraz | $aDefaultTaxBandAttributes | Default Tax Band Attributes |
Definition at line 515 of file CTax.php.
ProcessTaxes | ( | $sCountryName, | |
$aOrderProducts, | |||
$aOrderDetailTaxXMLs, | |||
$dShipping = 0 |
|||
) |
ProcessTaxes - Processing Taxes (Class Entry Point)
public
string | $sCountryName | Country Name |
array | $aOrderProducts | Order Products |
array | $aOrderDetailTaxXMLs | Order Detail Tax XML |
double | $dShipping | Shipping |
Definition at line 860 of file CTax.php.
SetCustomTax | ( | $sCountryName, | |
$nTaxIndex, | |||
$aOrderDetailTaxXML, | |||
$nCustomRate | |||
) |
SetCustomTax - Sets Custom Tax
public
string | $sCountryName | Country Name |
int | $nTaxIndex | Tax Index |
Definition at line 658 of file CTax.php.
TransformOrderToXMLArray | ( | $oOrder | ) |
|
protected |
|
protected |
TAX_ROUND_PER_ITEM |
TAX_ROUND_SCIENTIFIC_DOWN |