Actions26
- Product Actions
- Order Actions
- Customer Actions
- Category Actions
- Stock Actions
Overview
This node interacts with the PrestaShop API to update an existing category in a PrestaShop store. It allows users to modify various attributes of a category such as its name, description, SEO metadata, and activation status. This is useful for e-commerce managers or automation workflows that need to programmatically maintain or update product categories without manual intervention in the PrestaShop admin panel.
Practical examples include:
- Automatically updating category descriptions or SEO metadata based on marketing campaigns.
- Activating or deactivating categories during seasonal sales.
- Changing friendly URLs (link rewrites) for better SEO performance.
Properties
| Name | Meaning |
|---|---|
| Category ID | The unique identifier of the category to update. Must be a positive integer. |
| Update Fields | A collection of fields to update for the category: - Name: The new category name. - Description: Text describing the category. - Link Rewrite: Friendly URL slug. - Meta Title: SEO page title (max 70 chars). - Meta Description: SEO description (max 160 chars). - Meta Keywords: SEO keywords. - Active: Boolean to activate/deactivate the category. |
| Advanced Options | Additional optional settings: - Output Format: Choose between JSON (recommended) or XML response format. - Language ID: Filter localized fields by language (default 1). - Display Fields: Show all fields or specify custom fields. - Custom Fields: Comma-separated list of fields to return if "Custom Fields" is selected. - Shop Context: Define scope for multishop environments (all shops, specific shop, or shop group). - Shop ID: ID of the specific shop when using "Specific Shop" context. - Shop Group ID: ID of the shop group when using "Shop Group" context. - Enable Debug Mode: Include debug info (request URL, method, parameters) in the response for troubleshooting. |
Output
The node outputs the updated category data returned from the PrestaShop API. The output structure depends on the chosen output format:
- JSON (default): Returns the updated category details as a JSON object, including any fields requested via display options.
- XML: Returns the same data in XML format.
If debug mode is enabled, additional information about the HTTP request (URL, method, parameters) is included in the output to assist with troubleshooting.
No binary data is produced by this node.
Dependencies
- Requires connection to a PrestaShop instance with API access.
- Needs an API key credential configured in n8n to authenticate requests to the PrestaShop API.
- The node dynamically imports operation-specific code internally but does not require external libraries beyond what n8n provides.
Troubleshooting
Common issues:
- Invalid or missing Category ID will cause the update to fail.
- Providing invalid field values (e.g., too long meta titles or descriptions) may result in API errors.
- Incorrect shop context or IDs can lead to updates not applying as expected in multishop setups.
- Network or authentication failures due to incorrect API credentials.
Error messages:
- Errors returned from the PrestaShop API typically include descriptive messages indicating the problem (e.g., "Category not found", "Invalid parameter").
- Enabling debug mode helps reveal the exact request sent and response received, aiding diagnosis.
Resolution tips:
- Verify the Category ID exists in your PrestaShop store.
- Ensure all required fields are correctly formatted and within allowed limits.
- Double-check API credentials and permissions.
- Use debug mode to inspect request details if unexpected errors occur.