quantity button on order review one page checkout
-
Hi!
I have modify the plugin so i can add them to the One Page Checkout plugin, but is not quite working.
i modified the function….
function wqb_assets() { echo " <style> div.product-quantity div{display:inline;white-space:nowrap} .product-quantity button.qty{padding:.3em 1em;user-select:none} button.qty{display:inline-block!important;font-weight:bold;outline:none;-webkit-transition:all .3s;transition:all .3s} button.qty:hover{box-shadow:-1px 0px #ccc;-webkit-filter:brightness(95%);filter:brightness(95%);transform:scale(1.05)} button.qty:active{transform:scale(1.15)} button.qty.minus{border-right:1px solid #ccc;-webkit-filter:brightness(95%);filter:brightness(95%)} button.button.update_cart{background:#080!important;color:#fff!important} button[name=add-to-cart],.single_add_to_cart_button{margin-top:.8em} @media (min-width:769px) {.product-quantity button.qty{max-width:1.85em!important}} </style> <script type='text/javascript'> function wqb_action(iteration,q) { var qty=[].slice.call(document.querySelectorAll('div.quantity')); if(!qty) return; for(i=0; i<qty.length; i++) if(i==iteration) { v=qty[i].childNodes[3]; if(!v) return; if(v.value<=1 && q<1) return; v.value=parseInt(v.value)+parseInt(q); } (jQuery( 'body' ).trigger( 'update_checkout' ); } </script>"; }
I remove this part, since i dont have a update_cart button
if(document.getElementsByName('update_cart').length>0) { update_cart=document.getElementsByName('update_cart')[0]; update_cart.disabled=false; update_cart.classList.add('update_cart'); }
The buttons appear and the change the quantity, but it does update the order, and it update it with:
(jQuery( 'body' ).trigger( 'update_checkout' );
This will refresh the previous value, without the increments on the quantity.
Please help me out to fix it.
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘quantity button on order review one page checkout’ is closed to new replies.