Magento – magento 2 Error: cannot call methods on priceBox prior to initialization; attempted to call method ‘option’

debugjavascriptjquerymagento2PHP

I am having an issue on my website

the issue

Error: cannot call methods on priceBox prior to initialization;
attempted to call method 'option'

My website
https://www.cartaroo.com.cy/?SID=5fe6b01812786b8145c48eaa0fde65ad

When I click on homepage product icon a view popup and due to js issue
it won't allow me to select drop down. screenshot
http://prntscr.com/h33mg9

Please help

Best Answer

Solution: /app/design/frontend/Alpha/test/Magento_ConfigurableProduct/web/js/configurable.js:82

Old code:

        _initializeOptions: function () {
            var options = this.options,
                gallery = $(options.mediaGallerySelector),
                priceBoxOptions = $(this.options.priceHolderSelector).priceBox('option').priceConfig || null;

New code:

        _initializeOptions: function () {
            var options = this.options,
                gallery = $(options.mediaGallerySelector);
            var priceBoxOptions = null;

            try {
                var priceBoxOptions = $(this.options.priceHolderSelector).priceBox('option').priceConfig;
            }
            catch(err) {
                console.log('catch => '+err);
            }

This will not break others PDP js code. Thanks,