Answer the question
In order to leave comments, you need to log in
Bitrix core.js does not process a programmatically created event?
Good afternoon, I can't figure out why Bitrix core.js does not process the select change event.
The idea was this - after selecting the size of the product in the filter and going to the product card, automatically substitute the desired value in the select, through which the size is selected (sales offer), so that the price is automatically recalculated.
All the necessary parameters are received, select selects the desired option, but the price is not recalculated.
Here is how I tried to implement it
$(document).ready(function(){
var dropdown = $(".select_sku");
$("option", dropdown).each(function(){
var data_val = $(this).attr("data-onevalue");
if(data_val == $(".filter_id").text() ) {
var f_val = $(this).val();
$(".select_sku").val(f_val).trigger("change");
}
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question