Wednesday, December 18, 2024
2 changes · saas-17.4
Resolved issues and error corrections
Fixed an issue where a live chat chatbot could fail to appear when multiple chatbot rules used the same page URL. The system now correctly tries the fallback rule when the first matching option is unavailable, helping visitors receive automated assistance as intended.
Original PR description
Before this PR, chatbot rules with the same target URL could be ignored, leading to missing chat bot in some cases. Steps to reproduce: - Setup chatbot A on url "/". - Setup chatbot B on url "/". Only enable it if there aren't any available operators. - Ensure no operator is connected. - Go to the "/" URL as a visitor. - No chat bot is present. This occurs because the first rule is returned then discarded since there aren't any operators. We should instead ensure that the second one is used a fallback. This PR corrects the `match_rule` method to do so. opw-4352046
Customers can now recover from choosing an unavailable rental period by selecting a valid date range. This prevents the Add to Cart button from staying disabled, reducing checkout friction for rental products.
Original PR description
Versions ----- SaaS 17.4+ Steps ----- 1. Create a new rental product and add at least one pricing in the "Rental prices" tab. 2. Go to the product page on the website and try to pick a date that is…
Versions ----- SaaS 17.4+ Steps ----- 1. Create a new rental product and add at least one pricing in the "Rental prices" tab. 2. Go to the product page on the website and try to pick a date that is not valid (e.g., a range in the past). This should grey out the "Add to Cart" button and display an error message in red. 3. Change the date range to one that is valid. Issue: The "Add to Cart" button stays greyed out. Issue ----- When a customer picks a date range for a rental product that is not valid, the "Add to Cart" button is greyed out and stays greyed out regardless of what the customer does next, even if they change the rental period to one that is available. Cause ----- In `_verifyValidRentingPeriod` and `_verifyValidPeriod`, when a rental period is not valid, the product form is disabled, and the `css_not_available` class is added to the form. However, this form is never re-enabled, meaning the `css_not_available` class is never removed, and the "Add to Cart" button stays greyed out. Solution ----- Call the `_toggleDisable` method every time the rental period is checked to ensure the form is always in the correct state. opw-4197234