How can I modify a dynamic buy button to redirect to a new checkout page?

How can I modify a dynamic buy button to redirect to a new checkout page?

Pole
Visitor
1 0 0

hi I need to change 

{ form | payment_button }}

this dynamic buy button in my product.liquid to redirect to the checkout as usual but with this added to the link "/checkout?force_checkout=redesign", so the checkout is the new one-page checkout. I manage to change it in the cart using 

<form action="/checkout?force_checkout=redesign" method="post" novalidate class="cart">

but can't do it on the dynamic button in the product page

 

 

I could add a custom button:

 

<form action="/checkout?force_checkout=redesign" method="post" novalidate class="cart">
<input type="hidden" name="checkout">
<button type="submit" is="loader-button" class="cart__checkout-button checkout-button button button--primary button--full" name="checkout">
<span class="checkout-button__lock">{%- render 'icon' with 'lock' -%}
</span>

{{- 'cart.general.checkout' | t -}}
</button>

</form>

 

but this would not add the item to the cart so it is an empty checkout

Replies 0 (0)