Build a Cart Validation - Shopify Functions

Поділитися
Вставка
  • Опубліковано 22 гру 2024

КОМЕНТАРІ • 16

  • @matiasvaldez370
    @matiasvaldez370 5 місяців тому +1

    Amazing video! I hope to see more content about shopify functions in the future since there isn't much content out there regarding this way of developing extensions 👌

  • @arifix
    @arifix 6 місяців тому

    Finally, a Shopify video after a long wait. Thank you!

  • @r1x609
    @r1x609 3 місяці тому

    Amazing tutorial 🎉 Is it possible to get customer order history? so I want to say "per day user can only but this product 2 quantity only"

  • @matiasvaldez370
    @matiasvaldez370 5 місяців тому

    I have a question though, if you would want to create the metafield definition right when the user installs your app, how would you do it? I was thinking with a webhook from the admin embed but that would require us to have an admin dashboard only for this feature to work. Can you think of other way to achieving it without the need of creating a dashboard?

  • @kypac99
    @kypac99 5 місяців тому

    Great video, probably next video could be about checkout ?

  • @bonzsuarez5644
    @bonzsuarez5644 3 місяці тому

    mah men! Thanks you!!!

  • @SunilPatel-c8x6b
    @SunilPatel-c8x6b Місяць тому

    Hello,
    how to get payment details? I want to prevent an order from being placed if Kount identifies fraud. Is there a way to achieve this?

  • @WebEcoTan
    @WebEcoTan Місяць тому

    Thank you Alex! That was great an super easy to follow.
    I did test it perfectly in my developer store and I shared the link with another production store that I own. I installed it correctly, but I can't add it as a rule in the Checkout. Am I missing something? I would really appreciate an answer. Thank you!!!

    • @WebEcoTan
      @WebEcoTan Місяць тому

      Now what I've noticed is that the messages are not rendered on the side cart in the production store, as they do in the development store. I wonder if there is another target I should choose to make the error message available on the side cart

    • @devwithalex
      @devwithalex  Місяць тому

      Hey! Did you deploy using `npm run deploy`?

    • @WebEcoTan
      @WebEcoTan Місяць тому

      @@devwithalex Hi Alex, I wrote a message answering myself but I don't see it here :/
      I realised later that I had to update the shopify.app.toml file to set the access scopes for the app, then I deployed it wit npm run deploy, and finally I installed it in the production site. The function works wonderful! I even modified it a bit to work with product and customer tags, but the localizedMessage is not shown in the side cart :/
      I checked the docs and the target is right and there is no target for the side cart specifically... so maybe is a configuration from my store (?) I don't know

  • @samueljeffz
    @samueljeffz 6 місяців тому

    Tried creating a Product metafield but how does that target the cart and merchandise? There's no such mutation and not related field in query... Please help with it... or you can share your app link if that works! TIA

    • @devwithalex
      @devwithalex  6 місяців тому

      The metafield namespace & key need to match what you put in your run.graphql file. In the video, I set up the metafield with the namespace of "quantity_limits" and key of "limit". Then in my run.graphql file where I'm grabbing the metafield, I specified that same namespace and key. There's nothing else you need to do with the API or anywhere else in the app to get those values, they are just linked through the namespace & key. I have a gist up here where you can see how I set up my run.graphql to grab the correct metafield: gist.github.com/RAAbbott/47070a0a47cf8c97b713dbdea3ebe11d

    • @samueljeffz
      @samueljeffz 6 місяців тому

      @@devwithalex Thanks mate. It worked!

  • @EdEstes
    @EdEstes 6 місяців тому

    Great tutorial - thanks for sharing! I would love to see a tutorial with a Discount function based on Customer Tags. (if a customer is tagged "VIP" they get a product at $XXX) Cheers!

    • @EdEstes
      @EdEstes 6 місяців тому +1

      A never mind. Just read that the Cart Transform API is only available to Shopify Plus stores. I get they want businesses to upgrade to Plus, but it's frustrating to get limited capabilities if you're not on the Plus plan. I wish they enabled everything and set pricing tiers based on yearly revenues. Then smaller stores could grow quickly and become bigger stores. A win-win for both the store and Shopify.