Guest Posted March 10, 2016 Share Posted March 10, 2016 @@raiwa Hi Rainer Sorry, apologies had a "senior moment" and got mixed up. SHould have been this http://www.oscommerce.com/forums/topic/409155-continue-shopping/ Cheers Grandpa Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2016 Share Posted March 11, 2016 @@raiwa Hi Rainer Just tried this in Google Chrome and find that the Up/Down arrows only appear when you hover inside the quantities box, or at least mine does. Cheers Grandpa Link to comment Share on other sites More sharing options...
♥raiwa Posted March 11, 2016 Share Posted March 11, 2016 Hello John @@grandpaj, Yes, the same like the core version. It is how Google Chrome renders a standard html5 number input field. Nothing to do with my coding. Each Browser renders the input fields in a different way. regards Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted March 11, 2016 Share Posted March 11, 2016 @@grandpaj and others, Sorry, I'm a bloody javascript beginner. All that numbering is not needed. It's posible to apply the spinner to the last element before the script : $(this).parent().find( :) Here the much simlified version: $products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px;" min="1" max=""', 'number', true, 'class="form-control text-center"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' <span class="spinner_icon"><i class="fa fa-refresh fa-spin" style="color:transparent;"></i></span> ' . tep_draw_button('Remove', 'fa fa-trash', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-xs btn-remove') . '<script> function update() { $("form[name^=\'cart_quantity\']").submit(); $(this).parent().find(".spinner_icon i").css(\'color\', \'\'); }; $("input[name^=\'cart_quantity\']").change(update); $("form[name=\'cart_quantity\'] .btn-remove").click(update); </script> '; Maybe still to improve: Add input validation for " input is number" and "input > 0" Or this is not so important? There is no validation in core, but we could avoid unnecesary page update and spinner showing if they try to reduce qty to zero. regards Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2016 Share Posted March 11, 2016 @@raiwa Hi Rainer Many thanks Grandpa Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2016 Share Posted March 11, 2016 @@raiwa Hi Rainer Was just playing around with the code (which I know nothing about) and removed $(this).parent().find(".spinner_icon i").css(\'color\', \'\'); All still seemed to work. Look forward to any comments you may have. Cheers Link to comment Share on other sites More sharing options...
♥raiwa Posted March 12, 2016 Share Posted March 12, 2016 Hello John @@grandpaj, Then you may have duplicate code from an old version still present in your store. Or you just didn't reload/refresh the page at least once after erasing that line. Browsers cache shouldn't be the reason, but you could reset it for any case. regards Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.