Where you see dark pattern is in fact a limitation of most ecommerce platforms. Shopify, which powers millions of retailers website, doesn't offer this out of the box. You need the advanced plan ($$) and on top of that you need a special app/theme that would allow you to do it before checkout.