Add to cart not working from product show view

  • Posts: 86
  • Thank you received: 0
13 years 9 months ago #9142

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.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #9151

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.

  • Posts: 86
  • Thank you received: 0
13 years 9 months ago #9153

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #9155

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.

  • Posts: 86
  • Thank you received: 0
13 years 9 months ago #9164

Hi Nicolas,

Just send the details to you through your contact us form.

Gert.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #9166

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.

  • Posts: 86
  • Thank you received: 0
13 years 9 months ago #9167

Wonderful!

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #9168

Thailand is on my list of countries to visit in the future :)

Please Log in or Create an account to join the conversation.

  • Posts: 86
  • Thank you received: 0
13 years 8 months ago #9174

Do let me know. You won't regret it :cheer:

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum