Update cart button

  • Posts: 49
  • Thank you received: 0
13 years 5 months ago #2090

I am not sure why there is no update cart button for either the cart nugget, or the cart. But, how would one go about adding a update cart button. I suspect I would have to go through views to do it. Can you tell me what code I need to put in what view to do this? You should really add this to your product. It is in almost all shopping cart software.

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

  • Posts: 49
  • Thank you received: 0
13 years 5 months ago #2092

Well, I found the button, but for some reason the code you have around it doesn't work:

<?php
if($this->params->get('show_quantity')){ ?>
<noscript>
<input id="hikashop_checkout_cart_quantity_button" class="button" type="submit" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
</noscript>
<?php }
} ?>


I had to do this:


<input id="hikashop_checkout_cart_quantity_button" class="button" type="submit" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>

<?php } ?>


and then it works right

For anyone who wants to know where I found it, go under Views, then select cart under front end - checkout.

I think you need to look at this code again and correct in next release.

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

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 5 months ago #2094

Hi,

When you change the value of the quantity you don't need to click on any button. Just press enter or click somewhere else and the cart will be refreshed. That's why there is no button. That code will display the button to refresh the cart only when javascript is disabled on the browser of the user because without javascript, when you change the quantity field value, the change won't be submitted automatically.

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

  • Posts: 49
  • Thank you received: 0
13 years 5 months ago #2162

Unfortunately people won't get that. They don't get basic click enter on keyboard or click somewhere else. I understand it, but I can tell you from experience that no one else will. A coder will. Because almost all other carts have a button, that is what they want to see. Even I looked for a button. Then I experimented with click enter like a search box and it worked, but knew instantly that other people won't do this. A whole lot of people.

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

  • Posts: 49
  • Thank you received: 0
13 years 5 months ago #2165

I tried out what you coded. I agree it does work, and work well. Could you take a look at my other concern, the coupon thing not working?

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

  • Posts: 81633
  • Thank you received: 13085
  • MODERATOR
13 years 5 months ago #2172

Note that you can easily add a fake update button to your cart...
You can edit the file cart of the views product and checkout, and add an image near the input of the quantity. Since the cart will be submitted when the user click somewhere else, the new value will be submitted automatically when the user tries to click on the fake button.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum