Can i use Gempages and Zakeke together?

Alandsandro
Tourist
10 0 2

I just created a personalized clothing store and i'm using Gempages. I was thinking to add Zakeke as the product editor.

Are there any problems about using Gempages and Zakeke together? 

Thanks for the help

0 Likes
Anonymous
Not applicable
1719 0 0

Hello

There is no compatibility issue as long as the installation is done inside Gempages itself for smooth results.

Let me know if you have any questions

Thanks

0 Likes

Hi @Alandsandro,

yes, we can integrate this app with GemPages. Please use this code below:

{% unless product.content contains 'zakeke-design-tag' %}
 {% if product.tags contains 'zakeke-product' or product.content contains 'zakeke-product-tag' %}
 <button id="zakeke-product-button" class="btn product-form__cart-submit">
 <span>Customize</span>
 </button>
 <input name="zakeke-product-id" type="hidden" value="{{ product.id }}">
 <script>
  (function () {
    function findAncestor (el, sel) {
      while ((el = el.parentElement) && !((el.matches || el.matchesSelector).call(el,sel)));
      return el;
    }

    var btn = document.querySelector('#zakeke-product-button');
    btn.addEventListener('click', function (event) {
      event.preventDefault();
      event.stopPropagation();
      var form = findAncestor(btn, 'form');
      if (!form || !form.reportValidity()) {
        return;
      }
      var pid = form.querySelector('input[name="zakeke-product-id"]').value;
      
      var originalAction = form.action;
      form.action = (window.zakekeUrl || '/apps/zakeke') + '?pid=' + pid;

      window.onpageshow = function(event) {
          if (event.persisted) {
              form.action = originalAction;
          }
      };
      form.submit();
    });
  })();
  </script>
 {% endif %}
{% endunless %}

 

1. Please drag & drop the Liquid Element into the GemPages' Product module

2. Right-click on the Liquid element > select Edit code

3. Place the code above into the 'Template' tab of Liquid Element

4. Save & Publish > View template in Live store

 

Please try it and let us know if it works.

For further assistance, please don't hesitate to let us know via email (support@gempages.help) or live chat.

All the best,

If you find my reply helpful, please hit Like and Mark as Solution
Build high-converting stores with GemPages Page Builder
Get connected: Website | Youtube | Community | Partners | Help Center
Alandsandro
Tourist
10 0 2

Many thanks for the help. I'm still building other parts of the shop for now. However I'm using Ecomsolid as the product page main template, hoping it won't create problems with the Zakeke button. In that case i'll contact you again to use that coding or something else. Best regards

0 Likes

Thanks for getting back to us @Alandsandro 

Don't worry, I believe that it will not have any problem. Please do let us know if you need any further assistance or concerns. We will be happy to help.

If you find my reply helpful, please hit Like and Mark as Solution
Build high-converting stores with GemPages Page Builder
Get connected: Website | Youtube | Community | Partners | Help Center
Alandsandro
Tourist
10 0 2

I tried with the solution above but it gives this error

Liquid error: Cannot read property 'match' of null

I'll contact you at email you gave me to solve the problem.