PrestaShop icon

PrestaShop

Interact with PrestaShop API

Overview

This node integrates with the PrestaShop API to update supplier information for a specific product. It allows users to modify the list of suppliers associated with a product, set a default supplier, and specify detailed supplier-related data such as pricing and references.

Common scenarios where this node is beneficial include:

  • Synchronizing supplier data in PrestaShop after changes in external supplier databases.
  • Automating updates to product supplier lists during inventory or procurement workflows.
  • Managing multi-supplier setups for products in an e-commerce store.

Practical example:

  • A user wants to update the suppliers for a product with ID 123, setting supplier A as the default and adding multiple suppliers with their respective prices and references. This node can be used within an automation workflow to perform that update via the PrestaShop API.

Properties

Name Meaning
Product ID The unique identifier of the product whose suppliers are being updated.
Default Supplier ID The ID of the supplier to set as the default for this product.
Suppliers A list of suppliers to associate with the product. Each supplier entry includes: Supplier ID, Product Attribute ID (for combinations), Currency ID, Supplier Reference, and Supplier Price excluding tax.
Advanced Options Additional settings to control output format, language, displayed fields, shop context, and debugging:
- Output Format Choose between JSON (recommended) or XML response formats.
- Language ID Filter localized fields by language ID (default is 1).
- Display Fields Control which fields are returned: full (all fields) or custom (user specifies comma-separated fields).
- Custom Fields Comma-separated list of fields to display when "Custom Fields" option is selected.
- Shop Context Define the shop context in multishop environments: all shops, a specific shop, or a shop group.
- Shop ID ID of the specific shop to work with (shown if "Specific Shop" is selected).
- Shop Group ID ID of the shop group to work with (shown if "Shop Group" is selected).
- Enable Debug Mode When enabled, adds debug information (such as URL, method, parameters) to the response to assist troubleshooting.

Output

The node outputs the response from the PrestaShop API after attempting to update the product's suppliers. The main output is a JSON object containing the result of the update operation, which may include confirmation details or error messages.

If the output format is set to XML, the response will be in XML format instead.

No binary data output is produced by this node.

Dependencies

  • Requires connection to a PrestaShop instance via its API.
  • Needs an API key credential configured in n8n to authenticate requests to PrestaShop.
  • The node depends on the PrestaShop API endpoints related to product supplier management.

Troubleshooting

  • Common issues:

    • Invalid or missing Product ID or Supplier IDs can cause errors.
    • Incorrect API credentials or insufficient permissions will prevent successful updates.
    • Providing malformed supplier data (e.g., missing required fields) may lead to API rejections.
    • Multishop context misconfiguration might cause updates to apply to unintended shops.
  • Error messages:

    • Authentication failures: Check API key validity and permissions.
    • Validation errors: Verify that all required fields (Product ID, Supplier ID, etc.) are correctly provided.
    • Network or connectivity errors: Ensure the PrestaShop API endpoint is reachable from n8n.
  • Resolution tips:

    • Enable debug mode to get detailed request and response info for troubleshooting.
    • Double-check all input parameters for correctness.
    • Confirm that the API user has rights to update product suppliers.
    • Review PrestaShop API documentation for any version-specific requirements.

Links and References

Discussion