function discount_meta_box($Promotion) { $types = ShoppAdminDiscounter::types(); ?> <p><span> <select name="type" id="discount-type"> <?php echo menuoptions($types, $Promotion->type, true); ?> </select></span> <span id="discount-row"> — <input type="text" name="discount" id="discount-amount" value="<?php echo $Promotion->discount; ?> " size="10" class="selectall" /> </span> <span id="bogof-row"> — <?php _e('Buy', 'Shopp'); ?> <input type="text" name="buyqty" id="buy-x" value="<?php echo $Promotion->buyqty; ?> " size="5" class="selectall" /> <?php _e('Get', 'Shopp'); ?> <input type="text" name="getqty" id="get-y" value="<?php echo $Promotion->getqty; ?> " size="5" class="selectall" /> </span></p> <p><?php _e('Select the discount type and amount.', 'Shopp'); ?> </p> <?php }
?> , TARGET_LANG = <?php ShoppAdminDiscounter::targets(); ?> , RULES_LANG = <?php ShoppAdminDiscounter::rules(); ?> , conditions = <?php ShoppAdminDiscounter::conditions(); ?> , logic = <?php ShoppAdminDiscounter::logic(); ?> , Conditional = function (type,settings,location) { var target = $('#promotion-target').val(), row = false, i = false; if (!type) type = 'condition'; if (type == "cartitem") { i = itemidx; if (!location) row = $('<tr />').appendTo('#cartitem'); else row = $('<tr></tr>').insertAfter(location); } else { i = ruleidx;