Friday 29 December 2023

How to Show Items in group on cart page in Shopify

{% for item in cart.items %}
{% if item.fulfillment_service == 'manual' %}
  {% if item.product.tags contains 'DGA' %}
{% unless groupnames contains 'partner1' %}
  {% assign groupcount = groupcount | plus:1 %}
  {% assign groupnames = groupnames | append: 'partner1' | append: ',' %}
{% endunless %}
  {% else %}
{% unless groupnames contains 'bevilles' %}
  {% assign groupcount = groupcount | plus:1 %}
  {% assign groupnames = groupnames | append: 'bevilles' | append: ',' %}
{% endunless %}
  {% endif %}
{% else %}
  {% unless groupnames contains item.fulfillment_service %}
{% assign groupcount = groupcount | plus:1 %}
{% assign groupnames = groupnames | append: item.fulfillment_service | append: ',' %}
  {% endunless %}
{% endif %}
{% endfor %}

{% assign groupnames = groupnames | split:',' %}
{% for groupname in groupnames %}
<h3 style="color: #d1619c;">DELIVERY {{ forloop.index }} OF {{ groupcount }}</h3>
<div style="color: #ccc;">{% if groupname == 'bevilles' %}Delivered by Bevilles{% else %}Delivered separately by our partner{% endif %}</div>
{% for item in cart.items %}
{% assign group = '' %}
{% if item.fulfillment_service == 'manual' %}
  {% if item.product.tags contains 'DGA' %}
{% assign group = 'partner1' %}
  {% else %}
{% assign group = 'bevilles' %}
  {% endif %}
{% else %}
   {% assign group = item.fulfillment_service %}
{% endif %}
{% if group == groupname %}
// Items showing here
{% endif %}
{% endfor %}
{% endfor %}


Monday 18 December 2023

How to create Shopify Checkout extensions good articles

The following links are good for how to create Shopify extension and for Send and get information from your APP databases
  • https://www.shopify.com/in/partners/blog/checkout-ui-extensions
  • https://community.shopify.com/c/extensions/issue-calling-shopify-app-api-from-checkout-ui-extension/td-p/2267439
  • https://www.youtube.com/watch?v=wNdvxLzWUQg
  • https://community.shopify.com/c/extensions/ui-checkout-send-options-extensions-request-to-server-network/m-p/2226100
  • https://community.shopify.com/c/extensions/how-do-i-fetch-product-details-from-a-checkout-ui-extension/td-p/1671855
  • https://www.youtube.com/watch?v=FDLoz__VKVk
  • https://community.shopify.com/c/extensions/cors-issue-with-checkout-ui-extension-fetch-api-app-proxy/m-p/2025206