We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c1c653 commit d4dd2e6Copy full SHA for d4dd2e6
app/code/Magento/Bundle/view/base/web/js/price-bundle.js
@@ -376,12 +376,16 @@ define([
376
magicKey = _.keys(oneItemPrice)[0],
377
lowest = false;
378
379
- //sorting based on "price_qty"
380
- if(tiers){
381
- tiers.sort(function (a, b) {
382
- return a.price_qty - b.price_qty;
383
- });
384
- }
+ //tiers is undefined when options has only one option
+ if (undefined == tiers) {
+ var firstKey = Object.keys(optionConfig)[0];
+ tiers = optionConfig[firstKey].tierPrice;
+ }
+
385
+ //sorting based on "price_qty"
386
+ tiers.sort( function (a, b) {
387
+ return a['price_qty'] - b['price_qty'];
388
+ });
389
390
_.each(tiers, function (tier, index) {
391
if (tier['price_qty'] > qty) {
0 commit comments