Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1668545
Product quantity update using +/- buttons
Closed

Comments

  • mistique76 started the conversation

    When trying to update product quantity using the +/- buttons, the price does not update. Tried it on Firefox, Chrome and Edge browsers.

    Steps to repeat (view the screen recording video below):
    - use any product with booking date available
    - choose the date from calendar picker
    - wait for the availability update
    - try pressing the + button to add quantity
    - price does not update
    - click on the quantity volume input field
    - the price updates

    Quantity update action screen recording

    I have contacted the booking module support and they provided some hints to help you understand the background of the issue.
    QUOTE:
    "Regarding the quantity selector buttons, we have observed that the price is not updating on increasing the product quantity as there is no any Ajax action is performing when clicking on those buttons. If you simply check by increasing/decreasing the quantity using Up and Down arrows on the keyboard then the price will get update correctly.

    You can tell your Theme author to implement the quantity selector based on the WordPress standard because while we further debugging for this issue, we found that the property of the quantity is also not being set correctly. We are using 'jQuery( "input[class='input-text qty text']" ).prop( "value" );' code to fetch the value of the quantity but it always return 1 less than the selected quantity. Also, as I mentioned earlier that 'change' action is also not being triggered when the value is changed in the field.

    We have added custom code on your site for performing the action on Plus and Minus button which you can find on 181 to 215 line numbers of "booking-process.js" file of the Booking plugin. Kindly share all these things with your theme author so that he will get an idea about this. The price is still showing wrong because we are not getting the correct quantity."


    I will create an admin and a ftp user if you need to access the website itself. Just provide your email address.
    Let me know if you require additional information.

  • [deleted] replied

    Hi,

    Please share ftp access. I need to inspect code of plugin.

  •   mistique76 replied privately
  • [deleted] replied

    We tested this page and saw next.

    After date select some script in woocommerce-booking disables quantity field, buttons +/- andadd to cart button. Then script executes 4 ajax requests and after receiving the response enables field and buttons. In my firefox browser ajax requests are executed 10-15 seconds. You can check this in browser console.

  • mistique76 replied

    Thank you Max.
    I've sent your feedback to the booking module developers. Please leave this ticket open until I get some feedback from them.

  •   mistique76 replied privately
  • [deleted] replied

    We already fixed problem with 'change' action in scalia theme update (you have old version of theme on your site). I added fix to theme on your site. Please check it.

    But as I understand main problem is in ajax request loading time.

  • mistique76 replied

    Max, thank you. Consider this issue closed.

    I will be solving the ajax request loading time with the booking developer as it is also a problem with returning the number of bookings available which is also handled by the booking module.

    I'd like to thank you all for the great support. Keep up the good work.

  •   mistique76 replied privately
  • [deleted] replied

    Hi,

    I changed js/woocommerce.js file on your site. But couldn't clear cache on your site. Please clear and check. I added next code to line 67:

            $qty.trigger('change');
    

    But don't see this code in minified files in html code.

  • mistique76 replied

    Hi Max,

    You actually made the change on the development site (from previous tickets). I have migrated the site to the production domain few days ago.
    I transfered the .js file to the production site after testing your fix. 

    The issue is now resolved. Thank you.