magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Uncaught TypeError: utils.formatPriceLocale is not a function #35905

Closed jorgb90 closed 2 years ago

jorgb90 commented 2 years ago

Preconditions and environment

Steps to reproduce

  1. Navigate to a product, doesnt matter if its a simple, configurable or anything else.

Expected result

No JS error

Actual result

price-box.js:153 Uncaught TypeError: utils.formatPriceLocale is not a function at $... (price-box.js:153:41) at underscore.js:723:29 at Function.each (underscore.js:1335:17) at $...reDrawPrices (price-box.js:148:15) at $...reloadPrice (widget.js:132:25) at HTMLDivElement.dispatch (jquery.js:5430:49) at elemData.handle (jquery.js:5234:47) at Object.trigger (jquery.js:8719:28) at HTMLDivElement. (jquery.js:8797:30) at Function.each (jquery.js:385:35)

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 2 years ago

Hi @jorgb90. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

jorgb90 commented 2 years ago

This seems to also affect the cart and checkout..

[ERROR] Failed to load the "Magento_Tax/checkout/summary/subtotal" template requested by "block-totals.subtotal".

jquery.js:4050 jQuery.Deferred exception: Unable to process binding "if: function(){return !isTaxDisplayedInGrandTotal && isDisplayed() }" Message: Unable to process binding "text: function(){return getValue() }" Message: priceUtils.formatPriceLocale is not a function TypeError: Unable to process binding "if: function(){return !isTaxDisplayedInGrandTotal && isDisplayed() }" Message: Unable to process binding "text: function(){return getValue() }" Message: priceUtils.formatPriceLocale is not a function

jorgb90 commented 2 years ago

Mm solved it. Was not a core issue.

ssx commented 2 years ago

@jorgb90: what was the issue? I've got the same on a project.

verhaeghep commented 2 years ago

@jorgb90: what was the issue? I've got the same on a project.

Module magento2-price-demical from lillik is the source of the problem. See: https://github.com/lillik/magento2-price-decimal/issues/78

ssx commented 2 years ago

thanks @verhaeghep - it'll be the same for this project too.