### Install Project Dependencies Source: https://github.com/akeneo/pim-helpcenter/wiki/Install-or-preview-the-help-center Installs the project's local dependencies using npm. This command should be run in the root directory of the cloned/downloaded Helpcenter sources. ```bash npm install ``` -------------------------------- ### Example: Single Product Link Rule Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/assets/about-product-link-rules.md A single rule example demonstrating how to select a product by its SKU and replace existing assets in the 'user_instructions' attribute. ```json [ { "product_selections": [ { "field": "sku", "operator": "=", "value": "{{product_ref}}", "locale": null, "channel": null } ], "assign_assets_to": [ { "mode": "replace", "attribute": "user_instructions", "locale": "{{locale}}", "channel": null } ] } ] ``` -------------------------------- ### Install Node.js and Gulp.js Source: https://github.com/akeneo/pim-helpcenter/wiki/Install-or-preview-the-help-center Installs Node.js, a specific version (7.2.0), and the Gulp CLI globally. Ensure you have sudo privileges for global installations. ```bash sudo npm install --global n sudo n 7.2.0 npm install sudo npm install --global gulp-cli ``` -------------------------------- ### Serve Helpcenter Locally Source: https://github.com/akeneo/pim-helpcenter/wiki/Install-or-preview-the-help-center Starts the local development server for the Helpcenter. Files in the content and src directories are watched for automatic reloads. ```bash gulp serve ``` -------------------------------- ### Example: Two Product Link Rules Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/assets/about-product-link-rules.md An example with two distinct rules. The first rule adds assets to 'ambient_image' for products in the 'men_clothes' category, and the second rule does the same for products in the 'women_clothes' category. ```json [ { "product_selections": [ { "field": "categories", "operator": "IN", "value": ["men_clothes"] } ], "assign_assets_to": [ { "mode": "add", "attribute": "ambient_image", "locale": null, "channel": null } ] }, { "product_selections": [ { "field": "categories", "operator": "IN", "value": ["women_clothes"] } ], "assign_assets_to": [ { "mode": "add", "attribute": "ambient_image", "locale": null, "channel": null } ] } ] ``` -------------------------------- ### Example Naming Convention JSON Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/assets/about-product-link-rules.md An example of a naming convention configuration. It specifies splitting the 'main_asset_image' property, using a regex pattern to extract 'product_ref' and 'attribute_ref', and aborting asset creation if an error occurs. ```json { "source": { "property": "main_asset_image", "channel": null, "locale": null }, "pattern": "/(?.*)\\_(?.*)\\.jpg/", "abort_asset_creation_on_error": true } ``` -------------------------------- ### Calculate and Round Price Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/productivity/get-started-with-the-rules-engine.md This example demonstrates calculating a price in EUR based on a USD price and a ratio, rounding the final result to the nearest integer. ```yaml actions: - type: calculate round_precision: 0 destination: field: price scope: ecommerce currency: EUR source: field: price scope: ecommerce currency: USD operation_list: - operator: multiply field: ratio ``` -------------------------------- ### Build Akeneo PIM Help Center with Docker Source: https://github.com/akeneo/pim-helpcenter/blob/master/README.md Use this command to build the documentation. It does not launch the HTTP server. ```bash make build ``` -------------------------------- ### Text Attribute Validation Rule Example Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/first-steps/manage-your-attributes.md Use a regular expression to validate the content of a text attribute. This example shows how to validate an EAN13 code format. ```regex /^[0-9]{13}$/ ``` -------------------------------- ### Build and Launch Akeneo PIM Help Center with Docker Source: https://github.com/akeneo/pim-helpcenter/blob/master/README.md This command builds the documentation and launches the HTTP server. The website will be available at http://localhost:8000/pim/serenity/. Files in content and src directories are watched for changes. ```bash make watch ``` -------------------------------- ### Boolean Attribute Rule Example Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/productivity/get-started-with-the-rules-engine.md Use for boolean attributes. Set 'value' to 'true' for 'Yes' or 'false' for 'No'. ```yml field: shippable_us operator: = value: false ``` -------------------------------- ### Number Attribute Rule Example Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/productivity/get-started-with-the-rules-engine.md Use for number attributes. Expects a number as 'value'. Ignored if operator is EMPTY or NOT EMPTY. ```yml field: min_age operator: = value: 12 ``` -------------------------------- ### Create API Connection for Migration Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/assets/family-by-family-pam-migration.md Run this command to create a new connection for the migration process. Store the generated credentials in a 'credentials' file. ```bash php bin/console akeneo-connectivity-connection:create migrations_pam ``` -------------------------------- ### Identifier Attribute Rule Example Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/productivity/get-started-with-the-rules-engine.md Use for identifier attributes like SKU. Supports operators like CONTAINS, IN, NOT IN. Value should be a string. ```yml field: sku operator: CONTAINS value: "AKNTS_PB" ``` -------------------------------- ### Text/Textarea Attribute Rule Example Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/productivity/get-started-with-the-rules-engine.md Use for text or textarea attributes. The 'value' can be a string with or without quotation marks. Ignored if operator is EMPTY or NOT EMPTY. ```yml field: description operator: CONTAINS value: "Awesome product" ``` -------------------------------- ### Launch PAM Assets Migration Command Source: https://github.com/akeneo/pim-helpcenter/blob/master/content/md/assets/full-automatic-pam-migration.md Use this command to migrate PAM assets to the new Asset Manager. Replace `` with your chosen asset family code and `` with the path to your Enterprise Edition installation (e.g., /srv/ee for Docker). ```bash ./bin/migrate.php ```