Update your Product Page to Shopify 2.0 - Just like Dawn
WOW Shopify com IA
files/Channels_-_Growth_Social_Static_Affiliates_Affiliates-Merchants__320x480_7724dbcb-6bd4-46ed-8a59-93eb2012e8b0.png

Update your Product Page to Shopify 2.0 - Just like Dawn

See Other Products

Did you try to update your theme to Shopify 2.0 but your product page does not look like what Theme Dawn has?

Updating Product Page into Dynamic blocks Like Dawn Theme Shopify 2.0

 

1. Go to Shopify Online store> Themes > Actions > Edit code
2. Go to section folder and locate product-template.liquid
3. Add a for statement after the class=”grid_item”, like code below

 {% for blocks in section.blocks %}

 

4. Add a case statement after the for statement, like code below

     {% case blocks.type %}

     

    5. In product-template.liquid, locate and add the when statement before each of the following

    1. Product title
    2. Product price
    3. Product form
    4. Product description
    5. Product social

    6. Add a when statement before the following

  1. Product title = product-single__title 
     {% when product_title %}
  2. Product price = product__price
     {% when product_price %}
  3. Product form = form 'product'
  4.  {% when product_form %}
  5. Product description = product-single__description
     {% when product_description %}
  6. Product social = include 'social-sharing
     {% when product_social %}
  7.  

    7. Add a blocks in schema with the name and type of each blocks

    "blocks": [
    {
    "name": "product title",
    "type": "product_title",
    "limit": 1
    },
    {
    "name": "product price",
    "type": "product_price",
    "limit": 1
    },
    {
    "name": "product form",
    "type": "product_form",
    "limit": 1
    },
    {
    "name": "product description",
    "type": "product_description",
    "limit": 1
    },
    {
    "name": "product social",
    "type": "product_social",
    "limit": 1
    }
    ]

    8. Open template folder and locate product.lquid
    9. Copy the bottom code from product.liquid, except the {% section %} and comments
    10. Go to product-template.liquid and paste the code before the {% schema %}
    11. Delete the product.liquid file in template folder
    12. Go to templates folder and add a new template
    13. Create a new template for product with a template type JSON
    14. Since, we deleted the product.liquid, we can just click the “Create Template” and keep the name product as is
    15. Create the section type and add the product-recommendation in the section. Also the block
      {
      "sections": {
      "product_page" : {
      "type" : "product-template",
      "blocks" : {
      "title": {
      "type": "product_title"
      },
      "price": {
      "type": "product_price"
      },
      "form": {
      "type": "product_form"
      },
      "description": {
      "type": "product_description"
      },
      "social": {
      "type": "product_social"
      }
      },
      "block_order" : ["title", "price", "form", "description", " social"]
      },
      "product_recommendations": {
      "type": "product-recommendations"
      }
      },
      "order": ["product_page", "product_recommendations"]
      }

       

       (",) If you have questions, please free to contact us at "Chat with us"

      Copied!

      Struggling with instructions?

      Don't worry, we've got you covered for a reasonable price.

      Contact us through "Chat with us" for a quote.

      Relax as we handle it for you!

      Voltar para o blogue

      Deixe um comentário