PHPackages                             pixlee/magento2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pixlee/magento2

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

pixlee/magento2
===============

Social commerce platform to collect, curate, and display user-generated content to enhance your Magento store

3.0.1(1y ago)112.8k↓56.4%[1 issues](https://github.com/pixlee/magento2/issues)[1 PRs](https://github.com/pixlee/magento2/pulls)OSL-3.0PHPPHP ^7.1.3||~8.0.0||~8.1.0||~8.2.0||~8.3.0||~8.4.0CI passing

Since Jul 8Pushed 1w ago22 watchersCompare

[ Source](https://github.com/pixlee/magento2)[ Packagist](https://packagist.org/packages/pixlee/magento2)[ RSS](/packages/pixlee-magento2/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (11)Versions (17)Used By (0)

Emplifi UGC plugin for Magento 2 / Adobe Commerce
=================================================

[](#emplifi-ugc-plugin-for-magento-2--adobe-commerce)

Use this Magento 2 extension to connect to Emplifi's UGC service. Compatible with Magento Open Source and Adobe Commerce, versions 2.3–2.4.

[Documentation](https://developers.pixlee.com/docs/magento-2)

---

Installation Instructions
-------------------------

[](#installation-instructions)

### Install using Composer (recommended)

[](#install-using-composer-recommended)

Follow the Adobe documentation to [Install an extension](https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/extensions.html?lang=en)

Composer Package [pixlee/magento2](https://packagist.org/packages/pixlee/magento2)

1. Run these commands in your root Magento installation directory for composer install:

    ```
    composer require pixlee/magento2
    bin/magento module:enable Pixlee_Pixlee --clear-static-content
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento cache:clean
    ```
2. Configure the module to connect to your Emplifi UGC account. Please see the Setup section below.

### Install by copying files

[](#install-by-copying-files)

1. Create a `code/Pixlee/Pixlee` directory in the `app` directory of your Magento installation.
2. Download the latest "Source code" from this page:
3. Extract the file and copy the contents of the Pixlee\_Pixlee directory into the `app/code/Pixlee/Pixlee` directory.
4. Run the following commands from your root Magento installation directory:

    ```
    bin/magento module:enable Pixlee_Pixlee --clear-static-content
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento cache:clean
    ```
5. Configure the module to connect to your Emplifi UGC account. Please see the Setup section below.

---

Setup
-----

[](#setup)

### Configure the Emplifi UGC Magento 2 Module

[](#configure-the-emplifi-ugc-magento-2-module)

Select **Stores** &gt; **Configuration** on the main menu. Then select **Emplifi (Pixlee)** &gt; **UGC** in the left navigation menu.

The Emplifi UGC account settings can be configured at the Website, Store, or Store view depending on account setup. For each UGC account, select the desired cope in the scope (store view) dropdown menu and enter the account configurations.

1. Set **Enable** to *Yes*
2. Fill in **API Key**, **Private API Key**, and **Secret Key** with the API keys from your Emplifi Account. [Getting you API Keys](https://developers.pixlee.com/docs/getting-your-api-keys)
3. Click **Save Config** in the top right corner of the page to save your Account Settings.

### Exporting Products from Magento to Emplifi

[](#exporting-products-from-magento-to-emplifi)

#### Recurring Product Export Cron Job

[](#recurring-product-export-cron-job)

The extension sets up a cron job that exports products to Emplifi daily. This will keep product data up to date in Emplifi by exporting new product data and updated data for existing products to Emplifi.

#### Disable Product Export

[](#disable-product-export)

The extension can be configured to disable product export. To disable product export, set the **Enable Nightly Export**configuration option to *No*.

#### Change Product Export Run Time

[](#change-product-export-run-time)

By default, products will be exported daily at 3am UTC. If this time causes an issue, you can change the time that the product export runs by updating the cron schedule in Magento.

1. Create a copy of the extension's crontab.xml in your Magento 2 directory on the server in the app/code/Pixlee/Pixlee/etc directory.
2. Update the time to the time you want the export to run. To change the hour in the day at which the products are exported, change the `3` in the schedule tag to the hour you want the export to run. The example below will run the export at one minute after 5am UTC.

    ```

        1 5 * * *

    ```

#### Manually Run Product Export

[](#manually-run-product-export)

Products can be exported to Emplifi when required by using the Export Products button. In the extension configuration **Products** section, click the **Export Products to Emplifi** button to export all products for the currently selected configuration scope to your Emplifi account. This process can be repeated for each scope.

> ### 🚧 Note
>
> [](#-note)
>
> If the export times out, ensure the **max\_execution\_time** configuration for Magento is set to at least 3600 seconds (1 hour). Magento sets the value to 5 hours by default.

### Embedding PDP Widget on Product Pages

[](#embedding-pdp-widget-on-product-pages)

After creating a PDP Widget in Emplifi, adding the widget ID to the configuration will add the widget to the product details pages.

1. Log in to [your account](https://app.pixlee.com) and navigate to the [Publish Center](https://app.pixlee.com/app#publish).
2. Click the "Publish New PDP Display" button and configure the display per the [documentation](https://docs.emplifi.io/platform/latest/home/publish-a-product-description-page-display-pdp-).
3. After customizing, click the "Generate Embed Code" button and copy the value for **widgetId** from the snippet or get the ID from the Publish Center.
4. To enable the PDP widget, enter the **widgetId** from the previous step in the **PDP Widget ID** field under **Widget Settings**in the Magento store configuration and click **Save Config**.
5. To **customize the placement** of the PDP widget, modify *catalog\_product\_view.xml*. And use the move tag to move the widget block.

    For example, you can create a new `view/frontend/layout/catalog_product_view.xml` file in a custom module in the app/code directory and use the move tag to move the widget block.

    ```

    ```

### Embedding a CDP Widget on your Category Pages

[](#embedding-a-cdp-widget-on-your-category-pages)

The first three steps are exactly the same as embedding a PDP widget as they only involve getting a **widgetId** from the Control Panel.

1. Log in to [your account](https://app.pixlee.com) and navigate to the [Publish Center](https://app.pixlee.com/app#publish).
2. Click the "Publish New PDP Display" button and configure the display per the [documentation](https://docs.emplifi.io/platform/latest/home/publish-a-product-description-page-display-pdp-).

    > It is recommended that you leave the "Load Priority" setting to "Low priority" when customizing.
3. After customizing, click the "Generate Embed Code" button and copy the value for **widgetId** from the snippet or get the ID from the Publish Center.
4. To enable the CDP widget, enter the **widgetId** from the previous step in the **CDP Widget ID** field under **Widget Settings**in the Magento store configuration and click **Save Config**.
5. To **customize the placement** of the CDP widget, modify *catalog\_product\_view.xml*. And use the move tag to move the widget block.

    For example, you can create a new `view/frontend/layout/catalog_category_view.xml` file in a custom module in the app/code directory and use the move tag to move the widget block.

    ```

    ```

---

Testing
-------

[](#testing)

This module includes both unit and integration tests located in:

- `vendor/pixlee/magento2/Test/Unit`
- `vendor/pixlee/magento2/Test/Integration`

These tests can be executed using PHPUnit and the Magento 2 test framework.

---

### Unit Tests

[](#unit-tests)

Run unit tests with:

```
vendor/bin/phpunit -c phpunit.xml.dist vendor/pixlee/magento2/Test/Unit
```

---

### Integration Tests (Magento Test Framework)

[](#integration-tests-magento-test-framework)

Run integration tests with:

```
vendor/bin/phpunit -c dev/tests/integration/phpunit.xml.dist vendor/pixlee/magento2/Test/Integration
```

> Ensure your Magento integration test environment (database and configuration) is properly set up before running integration tests.

---

### Optional: Include module tests in your Magento test suite

[](#optional-include-module-tests-in-your-magento-test-suite)

To run Pixlee tests as part of your existing Magento integration test suite, add the following to your `dev/tests/integration/phpunit.xml.dist` (or a custom test suite configuration):

```

    ../../../vendor/pixlee/magento2/Test/Integration
    ../../../vendor/pixlee/magento2/Test/Unit

```

---

### Optional: Enable module for integration tests

[](#optional-enable-module-for-integration-tests)

Ensure the module is enabled in your integration test environment by adding it to:

`dev/tests/integration/etc/config-global.php`

```
