Actions26
- Product Actions
- Order Actions
- Customer Actions
- Category Actions
- Stock Actions
Overview
This node integrates with the PrestaShop API to create a new product category within a PrestaShop store. It is useful for automating the management of product categories, especially when organizing products into hierarchical structures or updating the catalog programmatically.
Typical use cases include:
- Automatically adding new categories during product import workflows.
- Structuring categories based on external data sources.
- Managing multi-shop environments by specifying shop contexts.
- Enhancing SEO by setting meta information for categories.
For example, you could use this node to create a "Summer Collection" category under the main "Home" category, including SEO metadata and activating it immediately.
Properties
| Name | Meaning |
|---|---|
| Name | The name of the new category to create. |
| Parent Category ID | The ID of the parent category under which the new category will be created. Default is 2, which corresponds to the Home category. Must be a positive integer. |
| Additional Category Fields | Optional fields to enrich the category: - Description: Text description of the category. - Link Rewrite: Friendly URL slug. - Meta Title: SEO title (max 70 characters). - Meta Description: SEO description (max 160 characters). - Meta Keywords: SEO keywords. - Active: Boolean to set if the category is active. |
| Advanced Options | Additional settings controlling output and context: - Output Format: Choose between JSON (recommended) or XML response format. - Language ID: Filter localized fields by language (default 1). - Display Fields: Select full or custom fields to return. - Custom Fields: Comma-separated list of fields to display if custom selected. - Shop Context: Define scope as 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 such as request URL, method, and parameters in the response. |
Output
The node outputs the newly created category data in the specified format (JSON by default). The json output contains the details of the created category, including its ID and any fields requested via the display options.
If debug mode is enabled, additional debug information about the API request is included in the output.
No binary data output is produced by this node.
Dependencies
- Requires an active connection to a PrestaShop instance via an API key credential.
- The node depends on the PrestaShop REST API being accessible and properly configured.
- For multi-shop setups, appropriate shop or shop group IDs must be provided if not working in the default context.
Troubleshooting
Common Issues:
- Invalid Parent Category ID: Ensure the parent category exists and the ID is correct.
- Permission errors: Verify that the API key has sufficient rights to create categories.
- Incorrect shop context: When using multi-shop features, confirm the shop or group IDs are valid.
- Exceeding field length limits: Meta title and description have recommended max lengths; exceeding them might cause API errors.
Error Messages:
- "Category creation failed" or similar: Check API credentials and network connectivity.
- "Invalid parameter" errors: Review input properties for missing required fields or invalid values.
- Debug mode can be enabled to get detailed request/response info to help diagnose issues.