2

Well depends exactly what you want to do, but something along these lines... {% set cart = craft.commerce.carts.cart %} {% for lineItem in cart.lineItems %} {% if lineItem.purchasable.product.type == "whatever" %} {# item of that type found...redirect the user #} {% redirect 'somewhere' %} {% endif %} {% endfor %} {# item of ...


2

I have the base rate set up as a standard flat rate charge but wanted to know how to allow this toggle switch to remove the cost of shipping for that item. Yeh that lightswitch isn't well named. Unless you're using Commerce Lite you need to think about the cart as a whole not just a single product. In general, only coupon codes and adjusters can remove ...


2

My money is on 3D Secure, a security protocol that requires card authentication before the card can be charged. https://stripe.com/docs/payments/3d-secure So those "Redirect" orders are probably customers that were redirected to the authentication page but did not complete it. Code seems to support this hypothesis: https://github.com/craftcms/...


1

Ended up going with Sprig, which seems to work pretty well. Open to ideas on how to improve this, especially if there's some better options for performance. {% set colour = colour ?? '' %} {% set addedToCart = success is defined %} {% set variants = craft.variants().productId(productId).relatedTo(colour).all() %} {% set colours = craft.categories().group('...


1

I fixed this in payment.twig by wrapping the payment form (id="paymentForm") in : {% if cart.shippingAddress and cart.shippingMethod %} //paypal and payment buttons <form id="paymentForm">...</form> {% else %} {% if not cart.shippingAddress %} <p>No shipping address selected.</p&...


Only top voted, non community-wiki answers of a minimum length are eligible