ecommerce extends controller
Public SDK Controller.
Extend this class to implement HTTP controllers in your plugin while benefiting from the framework routing and middleware lifecycle.
Table of Contents
Constants
- ECOMMERCEINDEX = 'EcommerceIndex'
- ECOMMERCEORDERS = 'EcommerceOrders'
- ECOMMERCEPRODUCTS = 'EcommerceProducts'
Methods
- add() : Response
- This method handles adding a new store.
- checklist() : Response
- This method handles listing products for a specific store by ID.
- edit() : Response
- This method handles editing a specific store by ID.
- edit_product() : Response
- This method handles listing products for a specific store by ID.
- index() : Response
- This method handles both listing stores and showing a specific store by ID.
- list() : Response
- This method handles both listing stores and showing a specific store by ID.
- order() : Response
- This method handles listing orders for all stores or a specific store by ID.
- orders() : Response
- This method handles listing orders for all stores or a specific store by ID.
- process_order() : Response
- This method handles.
- products() : Response
- This method handles listing products for a specific store by ID.
- update_orders() : Response
- This method handles listing products for a specific store by ID.
- update_products() : Response
- This method handles listing products for a specific store by ID.
- webhook() : Response
- This method handles listing products for a specific store by ID.
Constants
ECOMMERCEINDEX
public
mixed
ECOMMERCEINDEX
= 'EcommerceIndex'
ECOMMERCEORDERS
public
mixed
ECOMMERCEORDERS
= 'EcommerceOrders'
ECOMMERCEPRODUCTS
public
mixed
ECOMMERCEPRODUCTS
= 'EcommerceProducts'
Methods
add()
This method handles adding a new store.
public
add() : Response
Tags
Attributes
- #[Route]
- $path: '/ecommerce/add'
- $name: 'ecommerce_site_add'
- $methods: ['GET', 'POST']
Return values
Responsechecklist()
This method handles listing products for a specific store by ID.
public
checklist(null|int $id) : Response
Parameters
- $id : null|int
-
Store ID
Attributes
- #[Route]
- $path: '/ecommerce/{id}/checklist'
- $name: 'ecommerce_site_checklist'
- $methods: ['GET', 'POST']
Return values
Responseedit()
This method handles editing a specific store by ID.
public
edit(int $id) : Response
Parameters
- $id : int
-
Store ID
Attributes
- #[Route]
- $path: '/ecommerce/{id}/edit'
- $name: 'ecommerce_site_edit'
- $methods: ['GET', 'POST']
Return values
Responseedit_product()
This method handles listing products for a specific store by ID.
public
edit_product(int $id) : Response
Parameters
- $id : int
-
Product ID
Attributes
- #[Route]
- $path: '/ecommerce/product/{id}'
- $name: 'ecommerce_product_edit'
- $methods: ['GET', 'POST']
Return values
Responseindex()
This method handles both listing stores and showing a specific store by ID.
public
index() : Response
Attributes
- #[Route]
- $path: '/ecommerce'
- $name: 'ecommerce_index'
- $methods: ['GET']
Return values
Responselist()
This method handles both listing stores and showing a specific store by ID.
public
list() : Response
Attributes
- #[Route]
- $path: '/ecommerce_sites'
- $name: 'ecommerce_sites'
- $methods: ['GET']
Return values
Responseorder()
This method handles listing orders for all stores or a specific store by ID.
public
order(null|int $id) : Response
Parameters
- $id : null|int
-
Orders ID
Attributes
- #[Route]
- $path: '/ecommerce/order/{id}'
- $name: 'ecommerce_order'
- $methods: ['GET']
Return values
Responseorders()
This method handles listing orders for all stores or a specific store by ID.
public
orders([null|int $id = null ]) : Response
Parameters
- $id : null|int = null
-
Optional store ID
Attributes
- #[Route]
- $path: '/ecommerce/orders'
- $name: 'ecommerce_orders'
- $methods: ['GET']
- #[Route]
- $path: '/ecommerce/{id}/orders'
- $name: 'ecommerce_orders_by_site'
- $methods: ['GET']
Return values
Responseprocess_order()
This method handles.
public
process_order(null|int $id) : Response
Parameters
- $id : null|int
-
Orders ID
Attributes
- #[Route]
- $path: '/ecommerce/order/{id}/process'
- $name: 'ecommerce_order_process'
- $methods: ['POST']
Return values
Responseproducts()
This method handles listing products for a specific store by ID.
public
products(null|int $id) : Response
Parameters
- $id : null|int
-
Store ID
Attributes
- #[Route]
- $path: '/ecommerce/{id}/products'
- $name: 'ecommerce_products'
- $methods: ['GET']
Return values
Responseupdate_orders()
This method handles listing products for a specific store by ID.
public
update_orders([int $id = 0 ]) : Response
Parameters
- $id : int = 0
-
Store ID
Attributes
- #[Route]
- $path: '/ecommerce/{id}/update_orders'
- $name: 'ecommerce_update_orders_by_siteid'
- $methods: ['POST']
- #[Route]
- $path: '/ecommerce/update_orders'
- $name: 'ecommerce_update_orders'
- $methods: ['POST']
Return values
Responseupdate_products()
This method handles listing products for a specific store by ID.
public
update_products(int $id) : Response
Parameters
- $id : int
-
Store ID
Attributes
- #[Route]
- $path: '/ecommerce/{id}/update_products'
- $name: 'ecommerce_update_products_post'
- $methods: ['POST']
Return values
Responsewebhook()
This method handles listing products for a specific store by ID.
public
webhook(mixed $type) : Response
Parameters
- $type : mixed
Attributes
- #[Route]
- $path: '/ecommerce/webhook/{type}'
- $name: 'ecommerce_webhook'
- $methods: ['POST']