=== Quantity discount === Quantitiy discount is based on pricing tiers defined in discounts.xml file === Coupon discount === [[merkalt:coupons using description]] ==== Discount realization ==== When both quantity and coupon discounts are active only the highest discount is applied. The discount is showed on page as written in following screen shot. {{:merkalt:discount.jpg|}} In mail it is stated on a line just before "Totalt å betale". **There are two files was changed for merkalt.no: js\render.js and index.php. And two files for merkalt.no\bedrift: js\render.js and index2.php. ** \\ All code, used for displaying of discounts surrounded with comments: begins with a string "DISCOUNT BLOCK BEGIN" and ends with "DISCOUNT BLOCK END". \\ So, if you need to remove displaying of discount, you need to find such comments in files mentioned above and to comment out all strings between "DISCOUNT BLOCK BEGIN" and "DISCOUNT BLOCK END" the same way like this rows commented. For example: //PHP code:// If you find %%// DISCOUNT BLOCK BEGIN%% \\ %%$whole_total += (int)$_POST['price_whole'.$section];%% \\ %%// DISCOUNT BLOCK END%% comment it such way %%//DISCOUNT BLOCK BEGIN%% \\ %%//$whole_total += (int)$_POST['price_whole'.$section];%% \\ %%//DISCOUNT BLOCK END%% //HTML code:// If you find %%%% \\ %%%% \\ %%%% comment it such way %%%% \\ %%%% \\ %%%% //JavaScript code:// If you find %%// DISCOUNT BLOCK BEGIN%% \\ %%$('disc_amt').innerHTML = totalfullinnerHTML-totalinnerHTML;%% \\ %%// DISCOUNT BLOCK END%% comment it such way %%// DISCOUNT BLOCK BEGIN%% \\ %%// $('disc_amt').innerHTML = totalfullinnerHTML-totalinnerHTML;%% \\ %%// DISCOUNT BLOCK END%% ATTENTION: \\ In index.php for merkalt.no and index2.php in bedrift subdirectory when you find and comment code: %%// DISCOUNT BLOCK BEGIN%% \\ %%$disc_amt = $whole_total - $total;%% \\ %%array_push($table, array('Fraktkostnad', '', 'GRATIS', ''), array('Discount amount', '', 'Kr. '.$disc_amt, ''), array('Totalt е betale (ink. mva)', '', 'Kr. '.$total, ''));%% \\ %%array_push($table_customer, array('Fraktkostnad', '', 'GRATIS'), array('Discount amount', '', 'Kr. '.$disc_amt), array('Totalt е betale (ink. mva)', '', 'Kr. '.$total));%% \\ %%// DISCOUNT BLOCK END%% please uncomment (delete double "/" characters from the beginning of row) the following rows above it: %%//array_push($table, array('Fraktkostnad', '', 'GRATIS', ''), array('Totalt е betale (ink. mva)', '', 'Kr. '.$total, ''));%% \\ %%//array_push($table_customer, array('Fraktkostnad', '', 'GRATIS'), array('Totalt е betale (ink. mva)', '', 'Kr. '.$total));%%