Hi
We are switching our store to Venture.
I want to add an attribute to the Cart, so that I can get it on the order/create webhook.
From the cart page, I did it like that:
function Cart() {
...
theme.cartObject.attributes = {my_attribute: value};
But now, we added a “Buy it now” button, on the Product page, which directly add the product and go to the Checkout, without displaying the Cart.
I tried adding an hidden field:
<input id="my_attribute" type="hidden" name="attributes[my_attribute]" value="">
But it doesn’t get submitted when clicking on the button.
I get that I need to handle the button’s click event to send the attribute, but I can’t get it working.
Any idea? Thanks
Hi @jerome-sj ,
You can refer to the video: https://www.youtube.com/watch?v=5b_5tFOzYuU, it gives very detailed instructions on what you want.
Hope it helps!
Thanks, but that’s not what we want.
We don’t want to add attributes to the product, but to the Cart.
Using a Product property could be an alternative solution, but it would be better to use the Cart to have the same flow than we add the product to the Cart.
Thanks
After more reading, it seems that the Dynamic Checkout buttons won’t allow to add Order Notes.
So, for us, the solution may be to disable them for the users we need to have more information.
Hi @jerome-sj ,
I understand the problem, you want the customer to go to the cart page. Now when executing “Buy it now” button, it will go directly to checkout page, this is natural because button is buy now.
Therefore, it is the right solution that you need to disable or remove all buy now buttons.
Hope it clear to you.