AntonyThorpe\SilvershopUnleashed\Extension\Order
Synopsis
class Order
extends DataExtension
{
- // members
- private static array $db = ;
- // methods
- public void onBeforeWrite()
- public string getAddressName()
- public boolean matchCustomerAddress()
- public array setBodyAddress()
- public array setBodyCurrencyCode()
- public array setBodyCustomerCodeAndName()
- public array setBodyDeliveryMethodAndDeliveryName()
- public array setBodySalesOrderLines()
- public array setBodyTaxCode()
- public array setBodySubTotalAndTax()
- public void onAfterWrite()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
-
$db
Record when an order is sent to Unleashed
Methods
public
- getAddressName() — Return the Address Name
- matchCustomerAddress() — Match the order's shipping address to items returned from Unleashed
- onAfterWrite() — Send a sales order to Unleashed upon paid status May need to create the Customer first
- onBeforeWrite() — Apply Guid if absent
- setBodyAddress() — add the address components to the body array
- setBodyCurrencyCode() — add the currency code to the body array
- setBodyCustomerCodeAndName() — Add the Customer Code/Name (use Company field of BillingAddress to allow for B2B eCommerce sites)
- setBodyDeliveryMethodAndDeliveryName() — Set Delivery Method and Delivery Name Allow for the SilverShop Shipping module
- setBodySalesOrderLines() — Set Sales Order Lines
- setBodySubTotalAndTax() — Calculate the SubTotal and TaxTotal
- setBodyTaxCode() — Set the Tax Codes