Actions26
- Product Actions
- Order Actions
- Customer Actions
- Category Actions
- Stock Actions
Overview
This node integrates with the PrestaShop API to retrieve multiple product records based on specified criteria. It is designed for scenarios where users need to fetch a list of products from their PrestaShop store, optionally applying filters, sorting, and pagination. This can be useful for synchronizing product data with other systems, generating reports, or automating inventory management.
For example, a user might want to:
- Retrieve all active products in a specific category.
- Fetch a limited number of products sorted by price descending.
- Get products updated after a certain date using filter rules.
- Export product data in JSON or XML format for further processing.
Properties
| Name | Meaning |
|---|---|
| Return All | Whether to return all matching products or limit the results using pagination. |
| Limit | Maximum number of products to return when not returning all. Value range: 1 to 1000. |
| Offset | Number of products to skip before starting to collect the result set (used for pagination). |
| Filters | Advanced filtering options allowing to specify multiple filter rules based on PrestaShop API capabilities. Each rule includes: - Field: The product field to filter by (e.g., name, price, id_category, active). - Filter Type: Comparison operator such as Equals, Not Equals, Greater Than, Less Than, Contains, Starts With, Ends With, In List, Range. - Value: The value to compare against. For ranges use "min,max", for lists use "val1 |
| Sort Options | Sorting configuration including: - Sort Field: Product field to sort by (e.g., id, name, price, date_add). - Sort Direction: Ascending or Descending. |
| Advanced Options | Additional settings: - Output Format: Choose between JSON (recommended) or XML response format. - Language ID: Filter localized fields by language ID (default is 1). - Display Fields: Choose to show all fields or specify custom fields. - Custom Fields: Comma-separated list of fields to display if "Custom Fields" is selected. - Shop Context: Define context for multishop environments (all shops, specific shop, or shop group). - Shop ID: ID of the specific shop (if applicable). - Shop Group ID: ID of the shop group (if applicable). - Enable Debug Mode: Include debug info (request URL, method, parameters) in the response for troubleshooting. |
Output
The node outputs an array of product objects in the json output field. Each object represents a product record retrieved from PrestaShop according to the applied filters, sorting, and pagination.
- The structure of each product object depends on the selected display fields and language localization.
- If the output format is JSON, the data is returned as parsed JSON objects.
- If XML is selected, the raw XML string is returned instead.
- When debug mode is enabled, additional metadata about the API request is included in the output.
- The node does not output binary data.
Dependencies
- Requires connection to a PrestaShop instance via its REST API.
- Needs an API authentication token or key configured in n8n credentials to authorize requests.
- No other external services are required.
- Proper network access to the PrestaShop API endpoint must be ensured.
Troubleshooting
Common Issues:
- Authentication failures due to invalid or missing API credentials.
- Network connectivity problems preventing access to the PrestaShop API.
- Incorrect filter syntax or unsupported filter fields causing API errors.
- Pagination misconfiguration leading to incomplete or empty results.
- Selecting XML output but downstream nodes expecting JSON may cause parsing errors.
Error Messages:
- Errors related to authorization typically indicate issues with the API key/token; verify credential setup.
- API response errors mentioning invalid filters suggest checking the filter field names and values.
- Timeout or connection errors imply network or endpoint availability problems.
- If debug mode is enabled, inspect the included request details to diagnose issues.
Resolutions:
- Double-check API credentials and permissions.
- Validate filter rules and ensure they conform to PrestaShop API specifications.
- Adjust pagination parameters (
limit,offset) appropriately. - Use debug mode to get detailed request information for troubleshooting.