- Posts: 86
- Thank you received: 0
Add to cart not working from product show view
15 years 7 months ago #9142
by YakNarak
Add to cart not working from product show view was created by YakNarak
Hi Nicolas,
I'm using the following code in my product show view:
<!-- BUY NOW-->
<span id="hikashop_product_quantity_main" class="hikashop_product_quantity_main" >
<form action="<?php echo hikashop::completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form_<?php echo $this->row->product_id.'_'.$this->params->get('main_div_name'); ?>"><?php
$this->setLayout('quantity');
echo $this->loadTemplate();
?>
<input type="hidden" name="product_id" value="<?php echo $this->row->product_id; ?>" />
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="updatecart"/>
</form><?php
?>
When I press the button the quantity is updated in the cart but the program doesn't go to the checkout page. Am I doing something wrong?
Gert.
I'm using the following code in my product show view:
<!-- BUY NOW-->
<span id="hikashop_product_quantity_main" class="hikashop_product_quantity_main" >
<form action="<?php echo hikashop::completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form_<?php echo $this->row->product_id.'_'.$this->params->get('main_div_name'); ?>"><?php
$this->setLayout('quantity');
echo $this->loadTemplate();
?>
<input type="hidden" name="product_id" value="<?php echo $this->row->product_id; ?>" />
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="updatecart"/>
</form><?php
?>
When I press the button the quantity is updated in the cart but the program doesn't go to the checkout page. Am I doing something wrong?
Gert.
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9151
by nicolas
Replied by nicolas on topic Re: Add to cart not working from product show view
In the config, under the tab checkout (or display if you don't have the latest version), you have the option "After a product is added to the cart" where you can select what hikashop should do when you press "add to cart". Please make sure that this option is set to "always go to the checkout".
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9153
by YakNarak
Replied by YakNarak on topic Re: Add to cart not working from product show view
It is set like that already. But it's not working, not even when I change back to the unmodified view.
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9155
by nicolas
Replied by nicolas on topic Re: Add to cart not working from product show view
Could you give a back end access to your website so that we can check the problem ?
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9164
by YakNarak
Replied by YakNarak on topic Re: Add to cart not working from product show view
Hi Nicolas,
Just send the details to you through your contact us form.
Gert.
Just send the details to you through your contact us form.
Gert.
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9166
by nicolas
Replied by nicolas on topic Re: Add to cart not working from product show view
We changed the whole add to cart system in the last few releases so that it works with the custom item fields and other features we added. Since you bases your modifications on the 1.4.0 code, the redirection didn't work. I've changed a bit your code so that it still works.
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9167
by YakNarak
Replied by YakNarak on topic Re: Add to cart not working from product show view
Wonderful!
When you come to Thailand, let me know. Will buy you a few beers.
Gert.
When you come to Thailand, let me know. Will buy you a few beers.
Gert.
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9168
by nicolas
Replied by nicolas on topic Re: Add to cart not working from product show view
Thailand is on my list of countries to visit in the future
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9174
by YakNarak
Replied by YakNarak on topic Re: Add to cart not working from product show view
Do let me know. You won't regret it
Please Log in or Create an account to join the conversation.
Time to create page: 0.236 seconds