cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Magento 2.3.3

 

Installation of Clearpay payment plugin.

 

On completion of checkout, user is returned to an empty shopping cart rather than order confirmation page.  Order is recored in backend and order confirmation emails are sent.

 

Nothing in logs but following error in Console:

 

Uncaught TypeError: Cannot read property 'quoteData' of undefined
at quote.min.js:2
at Object.execCb (10b3c252f72fe3679fe8c8942cf02279.min.js:112)
at Module.check (10b3c252f72fe3679fe8c8942cf02279.min.js:56)
at Module.<anonymous> (10b3c252f72fe3679fe8c8942cf02279.min.js:72)
at 10b3c252f72fe3679fe8c8942cf02279.min.js:11
at 10b3c252f72fe3679fe8c8942cf02279.min.js:74
at each (10b3c252f72fe3679fe8c8942cf02279.min.js:3)
at Module.emit (10b3c252f72fe3679fe8c8942cf02279.min.js:74)
at Module.check (10b3c252f72fe3679fe8c8942cf02279.min.js:61)
at Module.enable (10b3c252f72fe3679fe8c8942cf02279.min.js:73)

 

Other payment options work fine.

 

Plugin has been uninstalled and reinstalled.

 

Can't figure this one out, would appreciate some thoughts.

 

Kind regards,

7 REPLIES 7

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Hi @col_b2 ,

 

First, can you please try to reproduce this issue after removing minification/merging from the JS.

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Ah, I really thought that was going to be the solution!


But problem still exists.  Tried it on a dev server and live server.

 

I have everything here set to 'no'

Js Optimization
Enable Advanced Bundling No  
Merge JavaScript Files - Magento Core No 

This is default Magento Core Option from Stores > Configuration > Advanced > Developer

 
Enable JavaScript Bundling - Magento Core No 

This is default Magento Core Option from Stores > Configuration > Advanced > Developer

 
Minify JavaScript Files - Magento Core No 

This is default Magento Core Option from Stores > Configuration > Advanced > Developer

 
Move Javascript to the bottom of the page No 

 

 

But customer still directed to empty shopping cart each time.

 

Any way to narrow down what the error is specifically in this quote.min.js file?

 

 

 

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Unbundling the js shows what line the problem is on, so next step is to check that.

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

var proceedTotalsData = function (data) {
            if (_.isObject(data) && _.isObject(data['extension_attributes'])) {
                _.each(data['extension_attributes'], function (element, index) {
                    data[index] = element;
                });
            }

            return data;
        },
        billingAddress = ko.observable(null),
        shippingAddress = ko.observable(null),
        shippingMethod = ko.observable(null),
        paymentMethod = ko.observable(null),
        quoteData = window.checkoutConfig.quoteData,        
basePriceFormat = window.checkoutConfig.basePriceFormat, priceFormat = window.checkoutConfig.priceFormat, storeCode = window.checkoutConfig.storeCode, totalsData = proceedTotalsData(window.checkoutConfig.totalsData), totals = ko.observable(totalsData), collectedTotals = ko.observable({});

The line in bold is the problem line. 

 

        quoteData = window.checkoutConfig.quoteData,        

 

If anyone has any thoughts I'd appreciate it.

 

 

 

 

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Any Solution on this

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

What is the solution of this . I am getting the same error

Re: Uncaught TypeError: Cannot read property 'quoteData' of undefined at quote.min.js:2

Same issue I was also facing but there is some issue in my code I have checked the log file and solve the issue and it's working fine for me.