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.
2 parents 04fa524 + 805c498 commit c3059d6Copy full SHA for c3059d6
app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js
@@ -344,16 +344,14 @@ define([
344
_determineProductData: function () {
345
// Check if product is in a list of products.
346
var productId,
347
- product,
348
isInProductView = false;
349
350
productId = this.element.parents('.product-item-details')
351
.find('.price-box.price-final_price').attr('data-product-id');
352
353
if (!productId) {
354
// Check individual product.
355
- product = document.getElementsByName('product')[0];
356
- productId = product ? product.value : undefined;
+ productId = $('[name=product]').val();
357
isInProductView = productId > 0;
358
}
359
0 commit comments