Cart and checkout validation app

Cart and checkout validation app

newuser13
Shopify Partner
31 0 2

I have been using a custom app with cart and checkout extension, where i have written rules for my cart based on product items weight.

Now, while clicking on checkout all the rules are getting applied. In addition to that i need to show a custom message based on the validation rules while redirecting before checkout.

Can someone help me on this.

For Eg; if the item weight is X, i need to show a message like "You can still add y quantities to the cart"

If the item weight is greater than X, i need to show a message like "Your cart is full"

These messages have to be displayed in the cart before redirecting. How should i do that?

 

Replies 4 (4)
newuser13
Shopify Partner
31 0 2

I have created a custom app with cart and checkout extension. I need to display certain messages from the app to the cart page. Can you please let me know how do we display messages to the cart page from the custom app.

newuser13
Shopify Partner
31 0 2

Thank you for your response. I am currently working on the option 4, by using server side validation using the cart and checkout extension module.

From there, I can able to send back the error messages. But this message is something, that i just want to display to the user and not block the checkout whereas if i display it as error message it will block the checkout. So, do we have any solution to just display the message based on the rules from server-side.

newuser13
Shopify Partner
31 0 2

Thank you for your response. I am currently working on the option 4, by using server side validation using the cart and checkout extension module.

I have to add a message as a cart attribute in cart and checkout validation app and display the same message from the cart attribute using checkout UI extension in the checkout page.

newuser13
Shopify Partner
31 0 2

Can someone help me with adding cart attributes in run.js of cart and checkout validation function by adding cart messages inside the attribute values.