> For the complete documentation index, see [llms.txt](https://help.pixfizz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pixfizz.com/ecommerce/shopify-+-pixfizz/add-my-projects-page.md).

# Add My Projects Page

This works with both Classic and New Customer Accounts.

This guide sets up a standalone "My Projects" page that displays a customer's saved Pixfizz projects as a visual card grid with thumbnail previews. Customers can click any card to re-open their project in the Pixfizz editor.

> **Note:** There is also an older version that adds saved projects as a table within the Shopify account page. This card grid version is a standalone page with a more modern layout. You can use either approach, or both.

***

#### Prerequisites

Before starting, make sure you have:

* The Pixfizz Shopify integration installed and working on your store
* The `pixfizz-setup.liquid` snippet rendering on all pages (this is part of the standard Pixfizz integration)

***

#### Step 1: Create the Pixfizz Products API page

The My Projects page looks up each project's Shopify product through a small data page at `/pages/pixfizz-product-api`. Without it, projects still appear in the grid, but **clicking a card does nothing** and the product title is missing. If your store already has this page (for example from the older saved projects setup), skip to Step 2.

**1a. Create the template.** In your Shopify admin, go to **Online Store → Themes**, click the three-dot menu on your active theme, and select **Edit code**. In the **Templates** folder, click **Add a new template**, choose **page** as the type, select **Liquid** (not JSON), and name it `pixfizz-product-api`. This creates `page.pixfizz-product-api.liquid`.

Replace any default content with the following and save:

```liquid
{% layout none %}
{
{%- comment %}
  On sites with many non-pixfizz products, it makes sense from a performance perspective
  to use a dedicated collections for pixfizz products, to be able to iterate only through them
  instead of through all live products with `collections.all`.
{%- endcomment %}
{% paginate collections.all.products by 250 %}
  {% for product in collections.all.products %}
    "{{ product.id }}": {
      "handle": {{ product.handle | json }},
      "title": {{ product.title | json }},
      "integration_type": {{ product.metafields.pixfizz.integration_type | json }},
      "pixfizz_sku_map": {
        {%- for variant in product.variants -%}
          "{{ variant.id }}": {{ variant.metafields.pixfizz.product_sku | default: product.metafields.pixfizz.product_sku | json }}
        {% unless forloop.last %},{% endunless %}{%- endfor -%}
      },
      "pixfizz_addons_map": {
        {%- for variant in product.variants -%}
          "{{ variant.id }}": {
            "page_addon": {{ variant.metafields.pixfizz.page_addon_product.value.id | default: product.metafields.pixfizz.page_addon_product.value.id | json }},
            "option_addons": {
              {%- for addon in product.metafields.pixfizz.option_addon_products.value -%}
                {{ addon.metafields.pixfizz.option_type_code | json }}: {
                  {%- for addon_variant in addon.variants -%}
                    {{ addon_variant.metafields.pixfizz.option_value_code | json }}: {{ addon_variant.id | json }}
                  {% capture variant_addons %}
                  {%- for addon in variant.metafields.pixfizz.option_addon_products.value -%}
                    {%- for addon_variant in addon.variants -%}
                      {{ addon_variant.metafields.pixfizz.option_value_code | json }}: {{ addon_variant.id | json }}
                    {% unless forloop.last %},{% endunless %}{%- endfor -%}
                  {%- endfor -%}
                  {% endcapture %}
                  {% assign variant_addons_stripped = variant_addons | strip %}
                  {% unless forloop.last and variant_addons_stripped == blank %},{% endunless %}{%- endfor -%}
                  {{ variant_addons }}
                }{% unless forloop.last %},{% endunless %}
              {%- endfor -%}
            }
          }{% unless forloop.last %},{% endunless %}
        {%- endfor -%}
      }
    }{% unless forloop.last %},{% endunless %}
  {% endfor %}
{% endpaginate %}
}
```

**1b. Create the Shopify page.** Go to **Online Store → Pages** and click **Add page**. Set the title to `pixfizz-product-api`, leave the content blank, set **Visibility** to **Visible** and **Template** to **pixfizz-product-api**, and click **Save**.

The page handle must be exactly `pixfizz-product-api`. To check it, open `https://yourstore.com/pages/pixfizz-product-api` in a browser. You should see plain text starting with `{ "` followed by product data, not your store's page layout or a "Page not found" message.

***

#### Step 2: Create the snippet

In the theme code editor, open the **Snippets** folder and click **Add a new snippet**. Name it `pixfizz-projects.liquid`.

Paste the following code into the file:

```liquid
<style>
  #pxp-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* ---- Header ---- */

  #pxp-wrap .pxp-list-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 1.25rem;
  }

  #pxp-wrap .pxp-list-header h1 {
    font-size: 2rem;
    margin: 0;
    letter-spacing: -0.02em;
  }

  /* ---- Project card grid ---- */

  #pxp-wrap .pxp-project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  @media screen and (min-width: 750px) {
    #pxp-wrap .pxp-project-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media screen and (min-width: 990px) {
    #pxp-wrap .pxp-project-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  #pxp-wrap .pxp-card {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f6f6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
  }

  #pxp-wrap .pxp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  }

  #pxp-wrap .pxp-card__thumb-wrap {
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
    background: #ebebeb;
  }

  #pxp-wrap .pxp-card__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  #pxp-wrap .pxp-card:hover .pxp-card__thumb {
    transform: scale(1.04);
  }

  #pxp-wrap .pxp-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  #pxp-wrap .pxp-card__info {
    padding: 0.75rem 0.9rem 0.9rem;
  }

  #pxp-wrap .pxp-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #pxp-wrap .pxp-card__meta {
    font-size: 0.8rem;
    color: #717171;
    margin: 0.15rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---- States ---- */

  #pxp-wrap .pxp-loading {
    text-align: center;
    padding: 4rem 0;
    color: #999;
    font-size: 0.9rem;
  }

  #pxp-wrap .pxp-loading progress {
    display: block;
    margin: 0 auto 0.75rem;
  }

  #pxp-wrap .pxp-empty {
    padding: 4rem 0;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
  }

  #pxp-wrap .pxp-load-more {
    text-align: center;
    padding: 2.5rem 0 0;
  }

  #pxp-wrap .pxp-load-more a {
    font-size: 0.9rem;
    color: #666;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
  }

  #pxp-wrap .pxp-load-more a:hover {
    color: #000;
  }
</style>

<div id="pxp-wrap">

  <div class="pxp-list-header">
    <h1>My Projects</h1>
  </div>

  <div id="pxp-loading" class="pxp-loading">
    <progress></progress>
    <span>Loading projects&hellip;</span>
  </div>

  <div id="pxp-empty" class="pxp-empty" hidden>
    <p>No saved projects yet.</p>
  </div>

  <div id="pxp-project-grid" class="pxp-project-grid"></div>

  <div id="pxp-load-more" class="pxp-load-more" hidden>
    <a href="#">Load more&hellip;</a>
  </div>

</div>

<script>
  (function () {
    const PROJECTS_PER_PAGE = 20;

    const projectGrid = document.getElementById('pxp-project-grid');
    const loadingDiv  = document.getElementById('pxp-loading');
    const emptyDiv    = document.getElementById('pxp-empty');
    const loadMoreDiv = document.getElementById('pxp-load-more');

    const dateFormatter = new Intl.DateTimeFormat('en-us', {
      year: 'numeric',
      month: 'long',
      day: 'numeric'
    });

    Pixfizz.Shopify.product_data_loader.load();

    function formatDate(dateStr) {
      var parts = dateFormatter.formatToParts(new Date(dateStr));
      var month = parts.find(function (p) { return p.type === 'month'; }).value;
      var day   = parts.find(function (p) { return p.type === 'day'; }).value;
      var year  = parts.find(function (p) { return p.type === 'year'; }).value;
      return month + ' ' + day + ', ' + year;
    }

    function loadProjects(page) {
      loadingDiv.hidden = false;
      loadMoreDiv.hidden = true;

      Pixfizz.Shopify.getSavedProjects(function (books) {
        loadingDiv.hidden = true;

        if (page === 1 && !books.length) {
          emptyDiv.hidden = false;
          return;
        }

        emptyDiv.hidden = true;

        books.forEach(function (book) {
          var productId = book.options.shopify_product_id;
          var variantId = book.options.shopify_variant_id;

          var card = document.createElement('a');
          card.href = '#';
          card.className = 'pxp-card';
          card.setAttribute('data-project-id', book.id);
          card.setAttribute('data-product-id', productId);
          card.setAttribute('data-variant-id', variantId);

          card.innerHTML = '<div class="pxp-card__thumb-wrap">'
            + '<div class="pxp-card__placeholder">Loading&hellip;</div>'
            + '<img class="pxp-card__thumb" src="" alt="" loading="lazy" style="opacity:0;" />'
            + '</div>'
            + '<div class="pxp-card__info">'
            + '<p class="pxp-card__name"></p>'
            + '<p class="pxp-card__meta"></p>'
            + '</div>';

          card.querySelector('.pxp-card__name').textContent = book.name;
          card.querySelector('.pxp-card__meta').textContent = formatDate(book.updated_at);

          projectGrid.appendChild(card);

          Pixfizz.Shopify.product_data_loader.get(productId).then(function (data) {
            if (data) {
              var meta = card.querySelector('.pxp-card__meta');
              meta.textContent = data.title + ' · ' + meta.textContent;
            }
          });

          var img = card.querySelector('.pxp-card__thumb');
          Pixfizz.Shopify.replaceImageWithProjectPreview(img, book.id, { width: 600 });
          img.addEventListener('load', function () {
            img.style.opacity = '1';
            var placeholder = card.querySelector('.pxp-card__placeholder');
            if (placeholder) placeholder.remove();
          });

          card.addEventListener('click', function (evt) {
            evt.preventDefault();
            Pixfizz.Shopify.launchSavedProject(
              card.getAttribute('data-project-id'),
              card.getAttribute('data-product-id'),
              card.getAttribute('data-variant-id')
            );
          });
        });

        if (books.length >= PROJECTS_PER_PAGE) {
          loadMoreDiv.hidden = false;
        }
      }, { page: page });
    }

    loadProjects(1);

    loadMoreDiv.addEventListener('click', function (evt) {
      evt.preventDefault();
      var loaded = document.querySelectorAll('.pxp-card').length;
      loadProjects(1 + Math.floor(loaded / PROJECTS_PER_PAGE));
    });
  })();
</script>
```

Save the file.

***

#### Step 3: Create the page template

In the **Templates** folder, click **Add a new template**. Choose **page** as the type, select **Liquid** (not JSON), and name it `pixfizz-projects`. This creates a file called `page.pixfizz-projects.liquid`.

Replace any default content with the following:

```liquid
{% render 'pixfizz-projects' %}
```

Save the file.

> **Tip:** If you are also setting up the Account Navigation feature, add the nav snippet above the projects snippet:
>
> ```liquid
> {% render 'pixfizz-account-nav' %}
> {% render 'pixfizz-projects' %}
> ```

***

#### Step 4: Create the My Projects page

Go to **Online Store → Pages** and click **Add page**.

Give the page a title, for example **My Projects**. Leave the content area blank.

In the **Template** dropdown on the right, select **pixfizz-projects**.

Click **Save**.

The page will be available at `/pages/my-projects` (or whatever handle Shopify generates from your page title).

***

#### Step 5: Enable the save button in the editor

Go to your Pixfizz account and select **Settings → Design Tool**.

Go to editor configuration and set the **Account Page Name** setting to `../pages/my-projects`. This makes the save button in the Pixfizz editor direct the customer to the My Projects page.

Alternatively, if you are using the older table-based saved projects embedded in the Shopify account page, you may prefer to keep the setting as `../account`.

***

#### What the page does

Once installed, the page provides the following functionality for logged-in customers:

* **Project grid**: displays all saved projects as a responsive card grid (2 columns on mobile, 3 on tablet, 4 on desktop). Each card shows a thumbnail preview, the project name, the product title, and the date it was last updated.
* **Click to edit**: clicking any card re-opens the project in the Pixfizz editor, where the customer can continue editing or add it to their cart.
* **Load more**: projects load 20 at a time. If there are more, a "Load more" link appears at the bottom.

***

#### Troubleshooting

* **Clicking a project card does nothing, and cards show only a date with no product name.** The Products API page from Step 1 is missing or not set up correctly. Open `/pages/pixfizz-product-api` on your store. If you get "Page not found", create the Shopify page in Step 1b. If you see your normal store layout, the page is not using the `pixfizz-product-api` template, or the template is missing `{% layout none %}`.
* **"No saved projects yet" while logged in.** Check that the customer has actually saved a project. Products that go straight to the cart (integration type `options-to-cart`, for example wall art where the customer uploads a photo and picks options) do not create saved projects. Only products that open the Pixfizz editor have a Save button.
* **Guests** always see the empty state. Projects are tied to the customer's account.

***

#### Notes

* The template is styled to work with the **Dawn theme** out of the box. On other themes, you may need to adjust the CSS.
* Projects are stored in Pixfizz, not Shopify. The page communicates with the Pixfizz API using the customer's existing Pixfizz session.
* The page requires the customer to be logged in to their Shopify account. Guests will see an empty state.
* All CSS selectors use the `#pxp-wrap` ID prefix for specificity, which prevents Dawn's section styles from overriding the grid layout.
* This page pairs well with the My Galleries page and the Account Navigation feature.
