- Posts: 49
- Thank you received: 0
Update cart button
15 years 10 months ago #2090
by thewedge
Update cart button was created by thewedge
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.
15 years 10 months ago #2092
by thewedge
Replied by thewedge on topic Re: Update cart button
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.
<?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.
15 years 10 months ago #2094
by nicolas
Replied by nicolas on topic Re: Update cart button
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.
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.
15 years 10 months ago #2162
by thewedge
Replied by thewedge on topic Re: Update cart button
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.
15 years 10 months ago #2165
by thewedge
Replied by thewedge on topic Re: Update cart button
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.
15 years 10 months ago #2172
by nicolas
Replied by nicolas on topic Re: Update cart button
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.
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.233 seconds