Pe https://www.autokomfort.ro/teste/pr...-bmw-seria-3-e46-cabrio-fabricatie-1998-2006/ cand selectez o gama si o culoare, cand vreau sa ma mut pe alta gama si selectez alta culoare, nu imi mai afiseaza pretul.
Acesta este codul. Sper sa nu am probleme pentru link-ul postat dar altfel nu m-as fi facut inteles
PHP:
if ( $.isEmptyObject(curr_objects) === false ) {
$.each(curr_objects , function(curr_stock_attr, curr_stock_item) {
curr_element.find('.ivpa_attribute[data-attribute="pa_game"] .ivpa_term').removeClass('ivpa_instock').removeClass('ivpa_outofstock');
if ( curr_stock_item.length == 1 && curr_stock_item[0] == '' ) {
curr_element.find('.ivpa_attribute[data-attribute="pa_game"] .ivpa_term').addClass('ivpa_instock');
}
else {
$.each( curr_stock_item, function(curr_stock_id, curr_stock_term) {
if ( curr_stock_term !== '' ) {
curr_element.find('.ivpa_attribute[data-attribute="pa_game"] .ivpa_term[data-term="'+curr_stock_term+'"]').addClass('ivpa_instock');
}
else {
curr_element.find('.ivpa_attribute[data-attribute="pa_game"] .ivpa_term:not(.ivpa_instock)').addClass('ivpa_instock');
}
});
curr_element.find('.ivpa_attribute[data-attribute="pa_game"] .ivpa_term:not(.ivpa_instock)').addClass('ivpa_instock');
}
});
}
else if ( $('.ivpa_attribute:not(.ivpa_activated)').length > 0 ) {
curr_element.find('.ivpa_attribute:not(.ivpa_activated)').each( function() {
$(this).find('.ivpa_term:not(.ivpa_outofstock)').addClass('ivpa_outofstock');
});
}
if ( $.isEmptyObject(curr_objects) === false ) {
$.each(curr_objects , function(curr_stock_attr, curr_stock_item) {
curr_element.find('.ivpa_attribute[data-attribute="pa_culori"] .ivpa_term').removeClass('ivpa_instock').removeClass('ivpa_outofstock');
if ( curr_stock_item.length == 1 && curr_stock_item[0] == '' ) {
curr_element.find('.ivpa_attribute[data-attribute="pa_culori"] .ivpa_term').addClass('ivpa_instock');
}
else {
$.each( curr_stock_item, function(curr_stock_id, curr_stock_term) {
if ( curr_stock_term !== '' ) {
curr_element.find('.ivpa_attribute[data-attribute="pa_culori"] .ivpa_term[data-term="'+curr_stock_term+'"]').addClass('ivpa_instock');
}
else {
curr_element.find('.ivpa_attribute[data-attribute="pa_culori"] .ivpa_term:not(.ivpa_instock)').addClass('ivpa_instock');
}
});
curr_element.find('.ivpa_attribute[data-attribute="pa_culori"] .ivpa_term:not(.ivpa_instock)').addClass('ivpa_outofstock');
}
});
}
else if ( $('.ivpa_attribute:not(.ivpa_activated)').length > 0 ) {
curr_element.find('.ivpa_attribute:not(.ivpa_activated)').each( function() {
$(this).find('.ivpa_term:not(.ivpa_outofstock)').addClass('ivpa_outofstock');
});
}
Acesta este codul. Sper sa nu am probleme pentru link-ul postat dar altfel nu m-as fi facut inteles