Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product Page: Custom Liquid Block #42

Closed
2 tasks
nicklepine opened this issue Jun 25, 2021 · 2 comments · Fixed by #269
Closed
2 tasks

Product Page: Custom Liquid Block #42

nicklepine opened this issue Jun 25, 2021 · 2 comments · Fixed by #269
Assignees
Labels
Category: Enhancement New feature or request Severity: 1 Urgent Severity

Comments

@nicklepine
Copy link

nicklepine commented Jun 25, 2021

This ticket proposes the addition of a custom liquid block to :

  • 1. the main section of the product page.
  • 2. featured product section

What this solves
Similarly to the Custom Liquid Section, this can let merchants (and theme specialists) make slightly more advanced theme customizations without going off the upgrade path.


From @andrewetchen

Add a Custom Liquid page block to main-product.liquid

Custom Liquid - Page Block

image

  • Add the following: I added it before {%- when 'description' -%}
{%- when 'liquid' -%}
  {{ block.settings.custom_liquid }}
  • Add the following schema block setting:
{
  "type":"liquid",
  "name":"Custom Liquid",
  "settings": [
    {
      "type": "liquid",
      "id": "custom_liquid",
      "label": "Custom Liquid"
    }
  ]
},
@nicklepine nicklepine added the Category: Enhancement New feature or request label Jun 25, 2021
@nicklepine nicklepine added the Severity: 2 High Severity label Jun 28, 2021
@nicklepine
Copy link
Author

I polled our slack channel to brainstorm other ideas for what this custom liquid block could be useful for. The consensus is this would definitely be helpful for merchants and support to perform more advanced customizations that require Liquid. The true beauty of this custom liquid block is that any customizations are contained within the block and so the theme remains on the upgrade path. Plus, it reduces the need to adventure in the code editor.

Here's what we got as ideas, in more detail:

  1. You could install apps that haven't yet been ported to using app blocks, which initially will be most of them. This would keep the theme on the upgrade path.

  2. Could be used for adding information/custom button for products that aren't available or for merchants who take only custom orders. So the button has a different behaviour than the add to cart.

  3. To simplify copy and pasting a block of code you might have found in a forum into a liquid block (rather than adventuring in the code editor)

  4. Custom formatting of different info like price, title, etc. Showing product tags that link to related products
    Loading a menu of links.

From @drewrothrock :

I think when we talk about what can be done with using custom liquid on the product the possibilities are endless, but for a lot of them it’ll be important that it ‘fits’ within the rest of the product page blocks such as under the title, above the description, etc.
Agreed this could excite merchants, and could potentially bring other areas of the platform like forums or help docs. We’ve seen how difficult it is for merchants to locate files like product-template so having a block on the theme for simple customizations might be a big win - even for straightforward liquid drops like an array of product.tags or product.collections

@bredowmax
Copy link
Contributor

I'd love a Custom Liquid Block for Products. In my situation, I want to install the review stars of TrustPilot - an app that hasn't been properly ported to Shopify 2.0 yet. By using a Custom Liquid Block, the theme could remain intact, without any code changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Enhancement New feature or request Severity: 1 Urgent Severity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants