can not stay on the same page after add to cart

  • Posts: 51
  • Thank you received: 0
12 years 5 months ago #33078

Hi Nicolas

i just updated hikashop to 1.5.5. Then i played in checkout process. After changing some checkout workflow, i couldn't stay on the same page after adding product to cart.

I believe the option is in hikashop configuration - checkout tab - "After a product is added to the cart" - "always stay on the same page"

I have tried every option in "After a product is added to the cart", all of them give the same result, which always go to checkout.

I would like to have "always stay on the same page"

Thanks

!!edit!!: it turns out that if we add product to cart from product page it works fine. It goes to checkout process when in listing page

!!temporary solution!! : Replace display-view-product-listing_img_Desc code:
<!-- ADD TO CART BUTTON -->
<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->ajax='';
if(!$this->config->get('ajax_add_to_cart',1)){
$this->ajax = 'return hikashopModifyQuantity(\''.$this->row->product_id.'\',field,1,\'hikashop_product_form_'.$this->row->product_id.'_'.$this->params->get('main_div_name').'\');';
}
$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>
<!-- EO ADD TO CART BUTTON -->


back to old version of hikashop 1.4.9

?><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->ajax='';
$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


i'm not sure whether this is good thing to do, at least it works for now.

Last edit: 12 years 5 months ago by loling.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 5 months ago #33102

Thank you for the feedback.

You won't have any drawbacks by doing that modification.

We'll look on our end to fix that (the change is necessary in some other cases).

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

Time to create page: 0.054 seconds
Powered by Kunena Forum