Post by Shineslo » Thu Jun 06, 2019 7:01 pm

In OC with Journal 2 theme and Quick Checkout, I want to achieve, that the quantity updates without clicking on update button.

I managed to do that in CART. According to the code I found here and put it in catalog/view/theme/YOURTHEME/template/checkout/cart.tpl:
<script type="text/javascript">
$("input[name^='quantity']").change(function() {

I want to do the same in Quick Checkout from Journal 2 theme, which is even more important than cart. I managed to make it work, but it works only on a computer, but not on touch devices.

On the line 521: $(document).delegate('.checkout-product .input-group .btn-update', 'click', function () {
I changed 'click' to 'keyup click' and this works on a computer.

For touch devices I've been trying with touchend, touchmove combinations, but I cannot get it to work. Can someone please help what I need to write that auto quantity will be updating when there is a input, instead of hitting update button everytime.

Here is the original code from checkout.tpl:
$(document).delegate('.checkout-product .input-group .btn-update', 'click', function () {
var key = $(this).attr('data-product-key');
var qty = $('input[name="quantity[' + key + ']"]').val();
cache: false,
url: 'index.php?route=journal2/checkout/cart_update',
type: 'post',
data: {
key: key,
quantity: qty
dataType: 'json',
beforeSend: function() {
$('#cart > button > a > span').button('loading');
complete: function() {
$('#cart > button > a > span').button('reset');
success: function(json) {
setTimeout(function () {
}, 100);

if (json['redirect']) {
location = json['redirect'];
} else {
$('#cart ul').load('index.php?route=common/cart/info ul li');




Tue Sep 10, 2013 5:07 pm

Post by D3MO » Sat Jun 08, 2019 4:48 am

I doubt that yoiu will get a free help for such a request as it will take time to make it work (testing and so on) but you walking right path to use ajax calls to update the page on change event

Opencart Expert |
Skype - programanija | Gtalk -
Extensions for Opencart @ / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT

User avatar
Active Member


Mon Apr 04, 2011 6:57 am

Post by cedcommerceteam » Tue Jun 11, 2019 6:37 pm

Hello Shinesio,

As in touch screen phones 'keyup click' won't work, try to make it on 'onclick' function, don't have idea about touchend & touchmove as I have used click function for mobile phones as well.

Thanks & Regards :

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email:
CedCommerece : Officail Opencart Partners
CedCommerce Official :
Opencart Services : www.cedcommerce/
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development :
Webinar : Holiday Season Webinar

User avatar
Active Member


Wed Aug 09, 2017 9:02 pm
Who is online

Users browsing this forum: No registered users and 42 guests