- Posts: 1
- Thank you received: 0
Simulate add to cart with code
14 years 3 months ago #54637
by dachsung
Simulate add to cart with code was created by dachsung
Hi guys, awesome extension.
I am running Hikashop v1.5.8 Business. I seem to have everything worked out but I'm lost on this issue.
I have a separate product order page because I need to collect more information from my customers (commercial invoice information as I ship internationally), what I am trying to accomplish is to in my order form there will be a field where the customer inputs a weight. On my product page of Hikashop I have a product with a weight variant each with different prices. I want to be able to have the customer fill out my initial order form and input the wait and upon submit I'd like to add to cart the product with the appropriate weight and go directly to checkout.
Can you point me to where I need to edit or any advice on how to handle this?
Thanks guys.
I am running Hikashop v1.5.8 Business. I seem to have everything worked out but I'm lost on this issue.
I have a separate product order page because I need to collect more information from my customers (commercial invoice information as I ship internationally), what I am trying to accomplish is to in my order form there will be a field where the customer inputs a weight. On my product page of Hikashop I have a product with a weight variant each with different prices. I want to be able to have the customer fill out my initial order form and input the wait and upon submit I'd like to add to cart the product with the appropriate weight and go directly to checkout.
Can you point me to where I need to edit or any advice on how to handle this?
Thanks guys.
Please Log in or Create an account to join the conversation.
14 years 3 months ago #54695
by nicolas
Replied by nicolas on topic Re: Simulate add to cart with code
Hi,
For each variant, when you edit it you will have a "add to cart html button" button that you can click on in order to get the HTML to use for a link which will add the variant to the cart and redirect to the checkout automatically.
As you can see, the only difference is the product id in it which is in fact the id of the variant.
So by redirecting from your form submit page to the add to cart URL with the corresponding variant id, you will be able to do what you want.
For each variant, when you edit it you will have a "add to cart html button" button that you can click on in order to get the HTML to use for a link which will add the variant to the cart and redirect to the checkout automatically.
As you can see, the only difference is the product id in it which is in fact the id of the variant.
So by redirecting from your form submit page to the add to cart URL with the corresponding variant id, you will be able to do what you want.
Please Log in or Create an account to join the conversation.
Time to create page: 0.165 seconds