Testingshopping/prestashop/themes/default-bootstrap/js/product.js
/**
 * Update display of the discounts table.
 * @param combination Combination ID.
 */
Update display of the discounts table.
@param combination Combination ID.
Update display of the discounts table . @param combination Combination ID .
function displayDiscounts(combination)
{
	var quantityDiscountTable = $('#quantityDiscount');
	var combinationsSpecificQuantityDiscount = $('.quantityDiscount_'+combination, quantityDiscountTable);
	var allQuantityDiscount = $('.quantityDiscount_0', quantityDiscountTable);
	if (combinationsSpecificQuantityDiscount.length != 0) {
		$('tbody tr', quantityDiscountTable).hide();
		combinationsSpecificQuantityDiscount.show();
		quantityDiscountTable.show();
	} else if(allQuantityDiscount.length != 0) {
		allQuantityDiscount.show();
		$('tbody tr', quantityDiscountTable).not('.quantityDiscount_0').hide();
		quantityDiscountTable.show();
	} else {
		quantityDiscountTable.hide();
	}
}
function displayDiscounts ( combination ) { var quantityDiscountTable = $ ( '#quantityDiscount' ) ; var combinationsSpecificQuantityDiscount = $ ( '.quantityDiscount_' + combination , quantityDiscountTable ) ; var allQuantityDiscount = $ ( '.quantityDiscount_0' , quantityDiscountTable ) ; if ( combinationsSpecificQuantityDiscount . length != 0 ) { $ ( 'tbody tr' , quantityDiscountTable ) . hide ( ) ; combinationsSpecificQuantityDiscount . show ( ) ; quantityDiscountTable . show ( ) ; } else if ( allQuantityDiscount . length != 0 ) { allQuantityDiscount . show ( ) ; $ ( 'tbody tr' , quantityDiscountTable ) . not ( '.quantityDiscount_0' ) . hide ( ) ; quantityDiscountTable . show ( ) ; } else { quantityDiscountTable . hide ( ) ; } }
Update display of the discounts table.
Update display of the discounts table .
// Tables & rows selection // If there is some combinations specific quantity discount, show them, else, if there are some // products quantity discount: show them. In case of result, show the category.