Installing the Pixlee Magento Extension

Get Your Pixlee API Keys

Before installing the Pixlee Magento extension, we need to get the Account API Key and Account Secret Key from http://pixlee.com.

1) First, log in to http://pixlee.com and click on the Settings button inside the top right hamburger menu.

(Alternatively, point your browser to https://app.pixlee.com/app#settings/account_settings while logged in).

Pixlee Dashboard


The settings page should look like this:

Pixlee Settings


2) Click on Pixlee API on the lefthand navigation bar.

From this page, record the value of Account API Key and Account Secret Key.

We’ll need these later.

Pixlee API


3) Now’s a good time to download the Pixlee_magento.tgz extension file if you don’t have it.

If you already have a copy of that file, use what you have instead.


Install the Pixlee Magento Extension in your Magento Admin Panel

4) Log in to your Magento Admin Panel.

Hover over the System tab, and in the dropdown that appears, hover over the Magento Connect item.

In the overlay that appears from that, click on Magento Connect Manager:

Magento Admin Panel


You’ll have to log in again, so do that. This is normal.

Magento Second Login


5) In the page that follows, look for the Direct package file upload section.

Click on the Choose File button.

Magento Connect Manager


6) In the dialog that appears, navigate to your Pixlee_Magento.tgz file from step 3.

On pressing OK in the dialog, the page should now look like this:

Magento Upload Plugin


7) Press the Upload button.

The page should now automatically scroll to the bottom.

In the black box you should see something like the following.

Magento Plugin Uploaded


Configure the Pixlee Extension

Before we can start using the plugin, we need to configure it.

1) Open up the Magento Admin Panel and hover over the System tab once again. This time click on the Configuration item.

Magento Configuration


2) On configuration page, select the website on which you want to install Pixlee like following.

Magento Website Selection

3) On the resulting page, click on the item named Pixlee Account Configuration on the lefthand navigation.

It should be under the Pixlee logo.

Magento Configuration Page


You should be redirected to the following Pixlee configuration page.

Pixlee Configuration Page

Note: In the case that on clicking the Pixlee Account Configuration you get redirected to a 404 Page, log out via the Log Out button on the top right corner and log back in. In some cases, the Pixlee Account Configuration page is not available upon first installing the extension.


4) Now it’s time to use the keys we saved from pixlee.com in step 2.

Fill in the Account ID, Account API Key and Account Secret Key with the value you recorded earlier.

Skip Widget ID for now.

In this example, the filled out form would look like the following.

API Credentials Filled


5) Conveniently, the Export Products to Pixlee button is right here!

Click it to complete the Pixlee Magento Extension installation.

Export Products

That’s it! You’re done!

Note: if you have ever changed the max_execution_time variable for Magento, please ensure that it is set to at least 3600 seconds (1 hour). The default should be 18000 seconds, which is fine to leave alone.




Exporting Products from Magento to Pixlee

You can export your Magento products to Pixlee at any time from the Export Products to Pixlee button on the Pixlee Account Configuration page.

1) Log in to your Magento Admin Panel

Hover over the System tab in the top navigation bar, and click on the Configuration item.

Magento Configuration


2) On the configuration page, select the website on which you want to install Pixlee like following.

Magento Website Selection

3) On the resulting page, click on the item named Pixlee Account Configuration on the lefthand navigation.

It should be under the Pixlee logo.

Since the Pixlee extension is already installed, the page that loads should look like the following.

Pixlee Configuration


4) Now simply click on the Export Products to Pixlee button, and you’re done!

Pixlee Exported




Mass Deploying Pixlee Widgets

The extension allows you to mass deploy Pixlee widgets on all of your product and category pages using a few simple steps.

Installing Product Description Page (PDP) Widgets

Assuming that you have now exported all of your products to Pixlee, you can embed a PDP Widget on your product page by doing the following.

1) Go to http://pixlee.com, log in, and navigate to the Products tab of the Albums section.

(Alternatively, point your browser to https://app.pixlee.com/app#products while logged in).

The Products tab looks like this:

Products


2) Click the “INSTALL PRODUCT DISPLAYS”, then PRODUCT PAGES, and follow the on-screen instructions to customize the widget as you wish.

PDP Wizard


3) At the end, you’ll be presented with an embed code.

Pixlee PDP Widget

Copy the value for widgetId in the resulting code snippet. Fill in this value in the PDP Widget ID field inside Admin > System > Configuration > Pixlee Account Configuration.

4) To implement the Pixlee gallery, simply make the following call anywhere on your view file:

<?php echo $this->getLayout()->createBlock('pixlee/gallery')->toHtml(); ?>

5) Where exactly you put this depends on your store’s layout, but in the Magento sample store (Madison Island) for example, it’d be in the following file:

$MAGENTO_ROOT/app/design/frontend/template/catalog/product/view.phtml

Where $MAGENTO_ROOT might be something like /var/www or /usr/share/nginx/html, depending on your installation.

6) The Pixlee extension will attempt to discern the current product’s SKU automatically in order to display the correct gallery, but if it is unable to do so you can explicitly set the product SKU with the “setProductSku” function like so:

<?php echo $this->getLayout()->createBlock('pixlee/gallery')->setProductSku($SKU)->toHtml(); ?>

7) Using the sample store Madison Island as an example, the it would look something like the following (at the bottom of the file).

Before:

   </div>

    <?php echo $this->getChildHtml('upsell_products') ?>
    <?php echo $this->getChildHtml('product_additional_data') ?>

</div>

After:

   </div>

    <?php echo $this->getChildHtml('upsell_products') ?>
    <?php echo $this->getChildHtml('product_additional_data') ?>
    <?php echo $this->getLayout()->createBlock('pixlee/gallery')->toHtml(); ?>

</div>

With this done, every product description page will have an embedded PDP widget, which will remain hidden until you start tagging photos with that product.

8) For example, here’s a product without tagged photos:

Magento PDP Without Widget


And here’s one with:

Magento PDP With Widget


Installing Category Description Page (CDP) Widgets

Assuming that you have now exported all of your products to Pixlee, you can embed a CDP Widget on your category page by doing the following. The process is almost the same as installing PDP widgets.

1) Go to http://pixlee.com, log in, and navigate to the Products tab of the Albums section.

(Alternatively, point your browser to https://app.pixlee.com/app#products while logged in).

The Products tab looks like this:

Products


2) Click the “INSTALL PRODUCT DISPLAYS”, then PRODUCT PAGES, and follow the on-screen instructions to customize the widget as you wish.

PDP Wizard


3) At the end, you’ll be presented with an embed code.

Pixlee PDP Widget

Copy the value for widgetId in the resulting code snippet. Fill in this value in the Category Widget ID field inside Admin > System > Configuration > Pixlee Account Configuration.

4) To implement the Pixlee gallery, simply make the following call anywhere on your view file:

<?php echo $this->getLayout()->createBlock('pixlee/categorygallery')->setData('category_id', $this->getCurrentCategory()->getId())->toHtml(); ?>

5) Where exactly you put this depends on your store’s layout, but in the Magento sample store (Madison Island) for example, it’d be in the following file:

$MAGENTO_ROOT/app/design/frontend/template/catalog/category/view.phtml

Where $MAGENTO_ROOT might be something like /var/www or /usr/share/nginx/html, depending on your installation.

6) In case you want to install the category widget on a page that is not a category page. You can still install the widget but you’ll have to specify the category_id of the category manually in the setData function like following

<?php echo $this->getLayout()->createBlock('pixlee/categorygallery')->setData('category_id', **Function call to get category id here**)->toHtml(); ?>

7) Using the sample store Madison Island as an example, the it would look something like the following (at the bottom of the file).

Before:

<?php else: ?>
    <?php echo $this->getProductListHtml() ?>
<?php endif; ?>

After:

<?php else: ?>
    <?php echo $this->getProductListHtml() ?>
<?php endif; ?>

<?php 
    echo $this->getLayout()->createBlock('pixlee/categorygallery')->setData('category_id', $this->getCurrentCategory()->getId())->toHtml();
?>

With this done, every category description page will have an embedded CDP widget, which will remain hidden until you start tagging photos with that product.




Testing and Troubleshooting

To test that everything was implemented correctly, we need to check two things -

  1. Were all the products exported?
  2. Are API calls being successfully made to the Pixlee API?

Were all the products exported?

Before testing, please make sure that the Pixlee Product Exports job has at least ran once. If you’ve already ran the exports once, skip to step 3.

1) In order to run it manually. Please follow the steps explained in the Exporting Products from Magento to Pixlee section of the document.

2) Login to Pixlee and navigate to Products under the Album tab. Alternatively, click this link..

3) You should see a list of products on this page.

Exported Products

5) Try searching for a few products on this page that you know exist in your catalog.

6) In case the list is empty or you were not able to search for a particular product, proceed to the next step. Otherwise proceed straight to the next section i.e. Are API calls being successfully made to the Pixlee API?

7) There can be several causes of failure to export products so first we need to find out the exact cause of the failure. The Pixlee Product Exports job logs the progress and all exceptions to the server logs. So the next step for us is to get the both Magento server logs and the PHP (Apache or equivalent) logs.

8) The Magento server logs are usually located at $Magento_Root$/var/log so navigate to that location and look for file named system.log.

9) For the PHP logs location it depends on your setup. For example, if you’re using Apache the logs should be in $Apache Root$/logs. We’re looking for the file named php_error.log in this directory.

10) One of the most common issues that we encounter is a lack of allocated memory to the Magento or PHP/Apache server. Open the php_error.log file using your favorite text editor and search for a log entry similar to the following line

Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php

11) If you found a similar looking error, please increase the allocated memory and run the product export job again.

12) Another common issue we encounter is a low setting for the max_execution_time. Look for a log entry similar to the following

Fatal error: Maximum execution time of XYZ seconds exceeded in ...

13) If you found a similar log entry please increase the max_execution_time setting inside your php.ini file to at least 3600. And then try exporting the products again.

14) If at this point you’re still not able to see any products exported to Pixlee, please contact us at support@pixleeteam.com and attach the both sytem.log and php_error.log with the email.

Are API calls being successfully made to the Pixlee API?

API calls are made to Pixlee API when a customer adds something to their cart and when they buy something on your store. We need to make sure that these calls are being made at the right time.

1) Open your favorite browser and open a product page of your store. And click Add to Cart.

Product Page

2) Open the system.log file located at $Magento_Root$/var/log using your favorite text editor and scroll down to the very end.

3) There should be an entry beginning with * In _sendPayload. Event: addToCart

ATC logs

4) If you found the * In _sendPayload. Event: addToCart calls then your analytics were integrated correctly. If not, contact us at support@pixleeteam.com and attach the system.log file with the email.

5) Switch back to the browser and proceed to checkout and buy the product that you added to cart previously. Use a test payment method for the checkout.

6) When you reach the order confirmation page switch open the sytem.log file again and ensure that you viewing the latest copy of the file.

7) This time look for log entries beginning with * In _sendPayload. Event: checkoutSuccess

Conversion logs

8) If you do not see the * In _sendPayload. Event: checkoutSuccess calls like in the screenshot, please contact us at support@pixleeteam.com and attach the sytem.log file with the email.


Change Log


November 13, 2017 (2bbaaffe40898b402a8756b00444909a001b193f)

September 22, 2017 (ba1302a90ba4b9ea6381deba7924bc3c4a940037)

August 27, 2017 (19a3239062b519955aaad9b4f9bf00eb10bace02)

August 3, 2017 (2eb0b4140e3adc7ca95774510fcb39358005b23b)

April 18, 2017 (61f4e8494c635d61734d59c865f066e67ef37a63)

March 21, 2017 (6e4ed081612fb6f90abc87ba07d985e535360e8c)

January 31, 2017 (1a212c023248bf87158a5ed80bbf167fa01fb1c7)