Skip to content

Services ​

Type
Trait
Namespace
craft\commerce\plugin
Implemented by
craft\commerce\Plugin
Since
2.0

Trait Services

View source

Public Properties ​

PropertyDescription
cartcraft\commerce\services\Carts – the cart service
catalogPricingcraft\commerce\services\CatalogPricing – the catalog pricing rules service
catalogPricingRulescraft\commerce\services\CatalogPricingRules – the catalog pricing rules service
currenciescraft\commerce\services\Currencies – the currencies service
customerscraft\commerce\services\Customers – the customers service
discountscraft\commerce\services\Discounts – the discounts service
emailscraft\commerce\services\Emails – the emails service
gatewayscraft\commerce\services\Gateways – the gateways service
lineItemscraft\commerce\services\LineItems – the line items service
orderAdjustmentscraft\commerce\services\OrderAdjustments – the order adjustments service
orderHistoriescraft\commerce\services\OrderHistories – the order histories service
orderNoticescraft\commerce\services\OrderStatuses – the order notices service
orderStatusescraft\commerce\services\OrderStatuses – the orderStatuses service
orderscraft\commerce\services\Orders – the orders service
paymentCurrenciescraft\commerce\services\PaymentCurrencies – the paymentCurrencies service
paymentSourcescraft\commerce\services\PaymentSources – the payment sources service
paymentscraft\commerce\services\Payments – the payments service
pdfcraft\commerce\services\Pdfs – the pdf service
planscraft\commerce\services\Plans – the plans service
productTypescraft\commerce\services\ProductTypes – the product types service
productscraft\commerce\services\Products – the products service
purchasablescraft\commerce\services\Purchasables – the purchasables service
salescraft\commerce\services\Sales – the sales service
shippingCategoriescraft\commerce\services\ShippingCategories – the shipping categories service
shippingMethodscraft\commerce\services\ShippingMethods – the shipping methods service
shippingRuleCategoriescraft\commerce\services\ShippingRuleCategories – the shipping rule categories service
shippingRulescraft\commerce\services\ShippingRules – the shipping rules service
shippingZonescraft\commerce\services\ShippingZones – the shipping zones service
subscriptionscraft\commerce\services\Subscriptions – the subscriptions service
taxCategoriescraft\commerce\services\TaxCategories – the taxCategories service
taxRatescraft\commerce\services\TaxRates – the taxRates service
taxZonescraft\commerce\services\TaxZones – the taxZones service
transactionscraft\commerce\services\Transactions – the transactions service
variantscraft\commerce\services\Variants – the variants service

cart ​

Type
craft\commerce\services\Carts
Default value
null

the cart service

View source

catalogPricing ​

Type
craft\commerce\services\CatalogPricing
Default value
null

the catalog pricing rules service

View source

catalogPricingRules ​

Type
craft\commerce\services\CatalogPricingRules
Default value
null

the catalog pricing rules service

View source

currencies ​

Type
craft\commerce\services\Currencies
Default value
null

the currencies service

View source

customers ​

Type
craft\commerce\services\Customers
Default value
null

the customers service

View source

discounts ​

Type
craft\commerce\services\Discounts
Default value
null

the discounts service

View source

emails ​

Type
craft\commerce\services\Emails
Default value
null

the emails service

View source

gateways ​

Type
craft\commerce\services\Gateways
Default value
null

the gateways service

View source

lineItems ​

Type
craft\commerce\services\LineItems
Default value
null

the line items service

View source

orderAdjustments ​

Type
craft\commerce\services\OrderAdjustments
Default value
null

the order adjustments service

View source

orderHistories ​

Type
craft\commerce\services\OrderHistories
Default value
null

the order histories service

View source

orderNotices ​

Type
craft\commerce\services\OrderStatuses
Default value
null

the order notices service

View source

orderStatuses ​

Type
craft\commerce\services\OrderStatuses
Default value
null

the orderStatuses service

View source

orders ​

Type
craft\commerce\services\Orders
Default value
null

the orders service

View source

paymentCurrencies ​

Type
craft\commerce\services\PaymentCurrencies
Default value
null

the paymentCurrencies service

View source

paymentSources ​

Type
craft\commerce\services\PaymentSources
Default value
null

the payment sources service

View source

payments ​

Type
craft\commerce\services\Payments
Default value
null

the payments service

View source

pdf ​

Type
craft\commerce\services\Pdfs
Default value
null

the pdf service

View source

plans ​

Type
craft\commerce\services\Plans
Default value
null

the plans service

View source

productTypes ​

Type
craft\commerce\services\ProductTypes
Default value
null

the product types service

View source

products ​

Type
craft\commerce\services\Products
Default value
null

the products service

View source

purchasables ​

Type
craft\commerce\services\Purchasables
Default value
null

the purchasables service

View source

sales ​

Type
craft\commerce\services\Sales
Default value
null

the sales service

View source

shippingCategories ​

Type
craft\commerce\services\ShippingCategories
Default value
null

the shipping categories service

View source

shippingMethods ​

Type
craft\commerce\services\ShippingMethods
Default value
null

the shipping methods service

View source

shippingRuleCategories ​

Type
craft\commerce\services\ShippingRuleCategories
Default value
null

the shipping rule categories service

View source

shippingRules ​

Type
craft\commerce\services\ShippingRules
Default value
null

the shipping rules service

View source

shippingZones ​

Type
craft\commerce\services\ShippingZones
Default value
null

the shipping zones service

View source

subscriptions ​

Type
craft\commerce\services\Subscriptions
Default value
null

the subscriptions service

View source

taxCategories ​

Type
craft\commerce\services\TaxCategories
Default value
null

the taxCategories service

View source

taxRates ​

Type
craft\commerce\services\TaxRates
Default value
null

the taxRates service

View source

taxZones ​

Type
craft\commerce\services\TaxZones
Default value
null

the taxZones service

View source

transactions ​

Type
craft\commerce\services\Transactions
Default value
null

the transactions service

View source

variants ​

Type
craft\commerce\services\Variants
Default value
null

the variants service

View source

Public Methods ​

MethodDescription
getCarts()Returns the cart service
getCatalogPricing()Returns the catalog pricing service
getCatalogPricingRules()Returns the catalog pricing rules service
getCoupons()Returns the coupons service
getCurrencies()Returns the currencies service
getCustomers()Returns the customers service
getDiscounts()Returns the discounts service
getEmails()Returns the emails service
getFormulas()Returns the formulas service
getGateways()Returns the gateways service
getInventory()Returns the inventory service
getInventoryLocations()Returns the inventory locations service
getLineItemStatuses()Returns the lineItems statuses service
getLineItems()Returns the lineItems service
getOrderAdjustments()Returns the orderAdjustments service
getOrderHistories()Returns the orderHistories service
getOrderNotices()Returns the OrderNotices service
getOrderStatuses()Returns the OrderStatuses service
getOrders()Returns the orders service
getPaymentCurrencies()Returns the paymentCurrencies service
getPaymentSources()Returns the payment sources service
getPayments()Returns the payments service
getPdfs()Returns the PDFs service
getPlans()Returns the payment sources service
getProductTypes()Returns the productTypes service
getProducts()Returns the products service
getPurchasables()Returns the purchasables service
getSales()Returns the sales service
getShippingCategories()Returns the shippingCategories service
getShippingMethods()Returns the shippingMethods service
getShippingRuleCategories()Returns the shippingRules service
getShippingRules()Returns the shippingRules service
getShippingZones()Returns the shippingZones service
getStore()Returns the stores service
getStoreSettings()Returns the store service
getStores()Returns the stores service
getSubscriptions()Returns the subscriptions service
getTaxCategories()Returns the taxCategories service
getTaxRates()Returns the taxRates service
getTaxZones()Returns the taxZones service
getTaxes()Returns the taxes service
getTransactions()Returns the transactions service
getTransfers()Returns the transfers service
getVariants()Returns the variants service
getVat()Returns the VAT service
getWebhooks()Returns the webhooks service

getCarts() ​

Returns the cart service

View source

Returns ​

craft\commerce\services\Carts – The cart service

Throws ​

getCatalogPricing() ​

Returns the catalog pricing service

View source

Returns ​

craft\commerce\services\CatalogPricing

Throws ​

getCatalogPricingRules() ​

Returns the catalog pricing rules service

View source

Returns ​

craft\commerce\services\CatalogPricingRules

Throws ​

getCoupons() ​

Returns the coupons service

View source

Returns ​

craft\commerce\services\Coupons – The countries service

Throws ​

getCurrencies() ​

Returns the currencies service

View source

Returns ​

craft\commerce\services\Currencies – The currencies service

Throws ​

getCustomers() ​

Returns the customers service

View source

Returns ​

craft\commerce\services\Customers – The customers service

Throws ​

getDiscounts() ​

Returns the discounts service

View source

Returns ​

craft\commerce\services\Discounts – The discounts service

Throws ​

getEmails() ​

Returns the emails service

View source

Returns ​

craft\commerce\services\Emails – The emails service

Throws ​

getFormulas() ​

Since
2.2

Returns the formulas service

View source

Returns ​

craft\commerce\services\Formulas – The formulas service

Throws ​

getGateways() ​

Returns the gateways service

View source

Returns ​

craft\commerce\services\Gateways – The gateways service

Throws ​

getInventory() ​

Returns the inventory service

View source

Returns ​

craft\commerce\services\Inventory – The inventory service

Throws ​

getInventoryLocations() ​

Returns the inventory locations service

View source

Returns ​

craft\commerce\services\InventoryLocations – The inventory locations service

Throws ​

getLineItemStatuses() ​

Returns the lineItems statuses service

View source

Returns ​

craft\commerce\services\LineItemStatuses – The lineItems service

Throws ​

getLineItems() ​

Returns the lineItems service

View source

Returns ​

craft\commerce\services\LineItems – The lineItems service

Throws ​

getOrderAdjustments() ​

Returns the orderAdjustments service

View source

Returns ​

craft\commerce\services\OrderAdjustments – The orderAdjustments service

Throws ​

getOrderHistories() ​

Returns the orderHistories service

View source

Returns ​

craft\commerce\services\OrderHistories – The orderHistories service

Throws ​

getOrderNotices() ​

Returns the OrderNotices service

View source

Returns ​

craft\commerce\services\OrderNotices – The OrderNotices service

Throws ​

getOrderStatuses() ​

Returns the OrderStatuses service

View source

Returns ​

craft\commerce\services\OrderStatuses – The OrderStatuses service

Throws ​

getOrders() ​

Returns the orders service

View source

Returns ​

craft\commerce\services\Orders – The orders service

Throws ​

getPaymentCurrencies() ​

Returns the paymentCurrencies service

View source

Returns ​

craft\commerce\services\PaymentCurrencies – The paymentCurrencies service

Throws ​

getPaymentSources() ​

Returns the payment sources service

View source

Returns ​

craft\commerce\services\PaymentSources – The payment sources service

Throws ​

getPayments() ​

Returns the payments service

View source

Returns ​

craft\commerce\services\Payments – The payments service

Throws ​

getPdfs() ​

Returns the PDFs service

View source

Returns ​

craft\commerce\services\Pdfs – The PDFs service

Throws ​

getPlans() ​

Returns the payment sources service

View source

Returns ​

craft\commerce\services\Plans – The subscription plans service

Throws ​

getProductTypes() ​

Returns the productTypes service

View source

Returns ​

craft\commerce\services\ProductTypes – The productTypes service

Throws ​

getProducts() ​

Returns the products service

View source

Returns ​

craft\commerce\services\Products – The products service

Throws ​

getPurchasables() ​

Returns the purchasables service

View source

Returns ​

craft\commerce\services\Purchasables – The purchasables service

Throws ​

getSales() ​

Returns the sales service

View source

Returns ​

craft\commerce\services\Sales – The sales service

Throws ​

getShippingCategories() ​

Returns the shippingCategories service

View source

Returns ​

craft\commerce\services\ShippingCategories – The shippingCategories service

Throws ​

getShippingMethods() ​

Returns the shippingMethods service

View source

Returns ​

craft\commerce\services\ShippingMethods – The shippingMethods service

Throws ​

getShippingRuleCategories() ​

Returns the shippingRules service

View source

Returns ​

craft\commerce\services\ShippingRuleCategories – The shippingRuleCategories service

Throws ​

getShippingRules() ​

Returns the shippingRules service

View source

Returns ​

craft\commerce\services\ShippingRules – The shippingRules service

Throws ​

getShippingZones() ​

Returns the shippingZones service

View source

Returns ​

craft\commerce\services\ShippingZones – The shippingZones service

Throws ​

getStore() ​

Returns the stores service

View source

Returns ​

craft\commerce\services\Store – The store service

Throws ​

getStoreSettings() ​

Returns the store service

View source

Returns ​

craft\commerce\services\StoreSettings – The store service

Throws ​

getStores() ​

Returns the stores service

View source

Returns ​

craft\commerce\services\Stores – The stores service

Throws ​

getSubscriptions() ​

Returns the subscriptions service

View source

Returns ​

craft\commerce\services\Subscriptions – The subscriptions service

Throws ​

getTaxCategories() ​

Returns the taxCategories service

View source

Returns ​

craft\commerce\services\TaxCategories – The taxCategories service

Throws ​

getTaxRates() ​

Returns the taxRates service

View source

Returns ​

craft\commerce\services\TaxRates – The taxRates service

Throws ​

getTaxZones() ​

Returns the taxZones service

View source

Returns ​

craft\commerce\services\TaxZones – The taxZones service

Throws ​

getTaxes() ​

Returns the taxes service

View source

Returns ​

craft\commerce\services\Taxes – The taxes service

Throws ​

getTransactions() ​

Returns the transactions service

View source

Returns ​

craft\commerce\services\Transactions – The transactions service

Throws ​

getTransfers() ​

Returns the transfers service

View source

Returns ​

craft\commerce\services\Transfers – The transfers service

Throws ​

getVariants() ​

Returns the variants service

View source

Returns ​

craft\commerce\services\Variants – The variants service

Throws ​

getVat() ​

Returns the VAT service

View source

Returns ​

craft\commerce\services\Vat – The VAT service

Throws ​

getWebhooks() ​

Since
3.1.9

Returns the webhooks service

View source

Returns ​

craft\commerce\services\Webhooks – The variants service

Throws ​