No video

Hide Payment Method X When Discount Allocations Greater Than Y

Shopify app store link (Shopify Plus required):
apps.shopify.c...
Instructions:
1. Create a hide payment method customization
2. Set it to hide your desired payment method
3. Add a display rule such that the customization applies only when cart/checkout attributes "discount-triggered" and "applied" are present. The key and value used here are just for example but they can be anything.
4. Create an "Apply Checkout Attribute" customization.
5. Set the attribute key to "discount-triggered" and "applied" (as long as they match the ones set prior)
6. Set it to clear attribute when hidden
7. Add a display rule such that it applies only when the total cart discount allocations is above a certain amount.
8. Add the Apply Checkout Attribute customization to checkout
9. Specify within the app block's settings in the checkout editor the Fixed Block ID setting, and make sure to check the option to include in Shop Pay too (in the Checkout Behaviour section).

Пікірлер: 4

  • @user-lm3cu2og8n
    @user-lm3cu2og8nАй бұрын

    Hey, How to adjust Total Savings? Since it's not item.variant.compare_at_price Also, is it possible to make something like: {{ line.variant.metafields | json}} ?

  • @checkoutbuddy

    @checkoutbuddy

    Ай бұрын

    compareAt price should be accessible within line item text blocks like {{ compareAtPrice }}. I've got a video on that here: kzread.info/dash/bejne/gWStu9iOeJiYgMo.html For variant metafields, there's no | json operator available but they can be accessed like this: {{ line.variant.metafields.namespace_one.key_one }} More details here: checkoutbuddy.notion.site/How-to-use-the-Line-Item-Text-block-a12a7fbce23549d8a2933e4291c3d32a?pvs=4

  • @user-lm3cu2og8n

    @user-lm3cu2og8n

    Ай бұрын

    @@checkoutbuddy How can I add "TOTAL SAVINGS" under "Total"? Additionally, is there a way to see the contents of the {{ line.variant.metafields }} object?

  • @checkoutbuddy

    @checkoutbuddy

    Ай бұрын

    ​@@user-lm3cu2og8n The shape of line.variant metafields is somewhat vague but there's some documentation here: www.notion.so/checkoutbuddy/How-to-use-the-Line-Item-Text-block-a12a7fbce23549d8a2933e4291c3d32a under the "Line variables" section. To show total savings under "Total" you can move the app block to the area you'd like using the checkout editor, there should be a slot that's right under Total, or close to it. Though I'm not sure what you're trying to do is possible with the app right now. The app can show the difference between compareAtPrice and price within a line item like so: You've saved {{ `€${(compareAtPrice - price).toFixed(2)}` }} But to move this block to under the "Total" section it loses the context of those variables so it won't quite work that way.