Public Access
feat(bf): auto-apply HOST27 on the On the Rise CTA (one-click discounted checkout)
The Hosting form on /odoo-black-friday/ posts product 4 ("basket") + clear=1
to the shop's custom /shop/post_basket route. Adding a third hidden field,
redirect=/coupon/HOST27?r=/shop/checkout, chains that route's redirect into
the core website_sale_loyalty GET /coupon/<code> handler, so a single click
lands the visitor on /shop/address with the -$100 first-year discount already
itemised (Total $295) - no typing, works with JavaScript off, and it survives
the cross-host POST because the target is baked into the form.
Mechanism designed, probed and proven signed-out end to end by odoo-dev
(wiki/concepts/odoo-shop-promo-autoapply.md). No module, no price change.
Rollback: delete the one <input type="hidden" name="redirect"> line.
This commit is contained in:
1 parent
3e2a7a71a6
commit
283983012f
1 file changed
+1
@@ -614,6 +614,7 @@
|
||||
<form method="post" action="https://20.odoo4projects.com/shop/post_basket" target="_blank" class="bf-cta-form plausible-event-name=Buy">
|
||||
<input type="hidden" name="basket" value='[{"product_id":4,"qty":1}]' />
|
||||
<input type="hidden" name="clear" value="1" />
|
||||
<input type="hidden" name="redirect" value="/coupon/HOST27?r=/shop/checkout" />
|
||||
<button type="submit" class="btn btn-brass btn-lg">Buy On the Rise — $295 first year</button>
|
||||
</form>
|
||||
<p class="bf-cta-secondary"><a href="/odoo-hosting-offers/">See everything a year of hosting includes</a></p>
|
||||
|
||||
Reference in new issue
Block a user