utilities19 functions
Learn how to use the helpers module to access system paths and constants in EverShop.
Since 2.1.0
Read configuration values from the application configuration files.
Since 2.1.0
Read environment variable values with optional default values.
Since 2.1.0
Wrap a function to make it hookable, allowing hooks to run before or after execution.
Since 2.1.0
Get values from the registry asynchronously with optional processing and validation.
Since 2.1.0
Register a callback to run before a hookable function executes.
Since 2.1.0
Get values from the registry synchronously with optional processing and validation.
Since 2.1.0
Register a callback to run after a hookable function executes.
Since 2.1.0
Register processors to transform registry values.
Since 2.1.0
Get the base URL of the shop.
Since 2.1.0
Server-side translation function with CSV file support.
Since 2.1.0
Build a URL from a route ID and parameters.
Since 2.1.0
Build an absolute URL from a route ID (server-side only).
Since 2.1.0
Format and round price values.
Since 2.1.0
Get a value from GraphQL context by key.
Since 2.1.0
Set a value in GraphQL context at request or application level.
Since 2.1.0
Get all context values merged from application and request levels.
Since 2.1.0
Check if a context key exists at request or application level.
Since 2.1.0
Get a setting value from the database.
Since 2.1.0
hooks1 functions
Wrap a function to make it hookable, allowing hooks to run before or after execution.
Since 2.1.0
events1 functions
Learn how to use the Event Emitter to emit and subscribe to events asynchronously in EverShop.
Since 2.1.0
core4 functions
Register a new widget in the widget manager.
Since 2.1.0
Update properties of an existing widget.
Since 2.1.0
Remove a widget from the widget manager.
Since 2.1.0
Emit an event to trigger registered subscribers.
Since 2.1.0
database9 functions
PostgreSQL connection pool instance.
Since 1.0.0
Get a dedicated PostgreSQL database connection from the pool.
Since 1.0.0
Create a SELECT query using the query builder.
Since 1.0.0
Insert a new record into the database.
Since 1.0.0
Update existing records in the database.
Since 1.0.0
Start a database transaction.
Since 2.1.0
Commit a database transaction.
Since 1.0.0
Rollback a database transaction.
Since 1.0.0
Delete records from the database.
Since 1.0.0
cronjob3 functions
Register a scheduled job (cronjob) in the job manager.
Since 2.1.0
Update the schedule of an existing cronjob.
Since 2.1.0
Remove a scheduled job from the job manager.
Since 2.1.0
logging5 functions
Log debug messages.
Since 2.1.0
Log error messages.
Since 2.1.0
Log warning messages.
Since 2.1.0
Log informational messages.
Since 2.1.0
Log success messages.
Since 2.1.0
authentication8 functions
Login an admin user with email and password.
Since 2.1.0
Logout the currently logged-in admin user.
Since 2.1.0
Check if an admin user is currently logged in.
Since 2.1.0
Get the currently logged-in admin user data.
Since 2.1.0
Login a customer with email and password.
Since 2.1.0
Logout the currently logged-in customer.
Since 2.1.0
Check if a customer is currently logged in.
Since 2.1.0
Get the currently logged-in customer data.
Since 2.1.0
catalog17 functions
Get base query for categories with description joined.
Since 2.1.0
Get base query for collections.
Since 2.1.0
Get base query for products with descriptions, inventory, and images joined.
Since 2.1.0
Get base query for products filtered by category with optional subcategories.
Since 2.1.0
Get base query for products filtered by collection.
Since 2.1.0
Create a new product with inventory, attributes, and images.
Since 2.1.0
Update an existing product.
Since 2.1.0
Delete a product.
Since 2.1.0
Create a new category.
Since 2.1.0
Update an existing category.
Since 2.1.0
Delete a category.
Since 2.1.0
Create a new collection.
Since 2.1.0
Update an existing collection.
Since 2.1.0
Delete a collection.
Since 2.1.0
Create a new product attribute.
Since 2.1.0
Update an existing product attribute.
Since 2.1.0
Delete a product attribute.
Since 2.1.0
checkout10 functions
Get cart by session ID or customer ID.
Since 2.1.0
Create a new shopping cart.
Since 2.1.0
Get cart by UUID.
Since 2.1.0
Get available payment methods for checkout.
Since 2.1.0
Save cart to database.
Since 2.1.0
Format and round price values.
Since 2.1.0
Create an order from a cart.
Since 2.1.0
Add shipping address to cart.
Since 2.1.0
files4 functions
Browse files and folders in media directory.
Since 2.1.0
Create a folder in media directory.
Since 2.1.0
Delete a file from media directory.
Since 2.1.0
Upload files to media directory.
Since 2.1.0
customer10 functions
Get base query for customers table.
Since 2.1.0
Create a new customer with validation and password hashing.
Since 2.1.0
Update customer profile information.
Since 2.1.0
Delete a customer account.
Since 2.1.0
Update customer password with validation and hashing.
Since 2.1.0
Create a new customer address with validation.
Since 2.1.0
Update an existing customer address with validation.
Since 2.1.0
Delete a customer address.
Since 2.1.0
Validate customer address data.
Since 2.1.0
Add custom validation rule for customer addresses.
Since 2.1.0
oms3 functions
Cancel an order and restock inventory.
Since 2.1.0
Update order payment status.
Since 2.1.0
Update order shipment status.
Since 2.1.0