Skip to content

Commit

Permalink
#9 - Requiring that all the required options from a configurable/grou…
Browse files Browse the repository at this point in the history
…ped/bundled product are selected before requesting the quote to Frenet API gateway.
  • Loading branch information
tiagosampaio committed Nov 26, 2021
1 parent 13502d5 commit c26c198
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion view/frontend/web/js/catalog/product/view/quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ define([
'jquery/ui',
'mage/translate',
'loader',
'domReady'
'domReady',
'mage/validation'
], function ($, ko, uiElement, priceUtils) {
'use strict';

Expand All @@ -42,6 +43,12 @@ define([
return;
}

/** Check if all options are selected before making the quote request. */
if (!$(this.form).valid()) {
this.reset();
return;
}

if (this.postcode()) {
this.loaderStart();

Expand Down

0 comments on commit c26c198

Please sign in to comment.