Manage Global Discount Rates
$falloff_percent){nn if(is_numeric($falloff_percent) ){n $update_bool = mysql_query(“UPDATE global_profit_margin_quantity_falloffn SET percent_change = ”$falloff_percent”n WHERE productid = ”0”n AND membershipid = ”$membershipid” “);n }n }n update_all_prices_to_match_target_margins();n}nif(isset($_POST[”update_minimum_margins”])){n foreach($_POST[”minimum_markup”] as $membershipid=>$minimum_markup){n if(is_numeric($minimum_markup) ){n $minimum_markup = $minimum_markup / 100;n $update_bool = mysql_query(“UPDATE global_profit_margin_min_targetsn SET minimum_margin = ”$minimum_markup”n WHERE membershipid = ”$membershipid” “);n }n }n update_all_prices_to_match_target_margins();n}nif(isset($_POST[”delete_quantity_tier”])){n print_r($_POST);n echo “This feature not yet implemented. Use the DB directly.The table is: ”global_price_quantity_tiers”
“;n}nif(isset($_POST[”add_new_quantity_tier”])){n print_r($_POST);n echo “This feature not yet implemented. Use the DB directly! The table is: ”global_price_quantity_tiers”
“;n}nif(isset($_POST[”update_processing”])){n if(is_numeric($_POST[”global_processing_cost_percent”]) ){n mysql_query(“UPDATE general_configuration_optionsn SET global_processing_cost_percent = ””.n mysql_real_escape_string($_POST[”global_processing_cost_percent”]).”” “);n update_all_prices_to_match_target_margins();// Danger will robinson!n }nn}nif(isset($_POST[”update_inbound_shipping”])){n if(is_numeric($_POST[”global_inbound_shipping_cost”]) ){n mysql_query(“UPDATE general_configuration_optionsn SET global_inbound_shipping_cost = ””.n mysql_real_escape_string($_POST[”global_inbound_shipping_cost”]).”” “);n update_all_prices_to_match_target_margins();// Danger will robinson!n }n}nnecho “
Manage Global Product Discount Rates
\n”;n “
From this page, you can edit the global parameters used to control the process which updates product sale prices.
\n”.n “How the Automatic process works
\n”.n “
\n”.n “Important Note: Changing any of these parameters can and will have drastic effects on the pricing for all products!\n”.n “If you are uncertain about using this page, please leave now, and ask for help. Updating these values will cause ALL prices”.n ” set to be automatically updated to be recalculated!
\n”.n n// Retrieve current membership groupsn$current_memberships = retrieve_current_membershipids();nn// Retrieve current defaults for processing and inbound shippingn$default_processing_cost = mysql_result(mysql_query(“SELECT global_processing_cost_percentn FROM general_configuration_options”),0);n$default_inbound_shipping = mysql_result(mysql_query(“SELECT global_inbound_shipping_costn FROM general_configuration_options”),0);nnecho “
\n”;nnecho “
- \n”.n “
\n”;nn////////////////////////////////////////////////////////////////////ninclude $SITE[”path_to_webroot”].”/admin/template/bottom.php”;n?>$falloff_percent){nn if(is_numeric($falloff_percent) ){n $update_bool = mysql_query(“UPDATE global_profit_margin_quantity_falloffn SET percent_change = ”$falloff_percent”n WHERE productid = ”0”n AND membershipid = ”$membershipid” “);n }n }n update_all_prices_to_match_target_margins();n}nif(isset($_POST[”update_minimum_margins”])){n foreach($_POST[”minimum_markup”] as $membershipid=>$minimum_markup){n if(is_numeric($minimum_markup) ){n $minimum_markup = $minimum_markup / 100;n $update_bool = mysql_query(“UPDATE global_profit_margin_min_targetsn SET minimum_margin = ”$minimum_markup”n WHERE membershipid = ”$membershipid” “);n }n }n update_all_prices_to_match_target_margins();n}nif(isset($_POST[”delete_quantity_tier”])){n print_r($_POST);n echo “This feature not yet implemented. Use the DB directly.The table is: ”global_price_quantity_tiers”
“;n}nif(isset($_POST[”add_new_quantity_tier”])){n print_r($_POST);n echo “This feature not yet implemented. Use the DB directly! The table is: ”global_price_quantity_tiers”
“;n}nif(isset($_POST[”update_processing”])){n if(is_numeric($_POST[”global_processing_cost_percent”]) ){n mysql_query(“UPDATE general_configuration_optionsn SET global_processing_cost_percent = ””.n mysql_real_escape_string($_POST[”global_processing_cost_percent”]).”” “);n update_all_prices_to_match_target_margins();// Danger will robinson!n }nn}nif(isset($_POST[”update_inbound_shipping”])){n if(is_numeric($_POST[”global_inbound_shipping_cost”]) ){n mysql_query(“UPDATE general_configuration_optionsn SET global_inbound_shipping_cost = ””.n mysql_real_escape_string($_POST[”global_inbound_shipping_cost”]).”” “);n update_all_prices_to_match_target_margins();// Danger will robinson!n }n}nnecho “
Manage Global Product Discount Rates
\n”;n “
From this page, you can edit the global parameters used to control the process which updates product sale prices.
\n”.n “How the Automatic process works
\n”.n “
\n”.n “Important Note: Changing any of these parameters can and will have drastic effects on the pricing for all products!\n”.n “If you are uncertain about using this page, please leave now, and ask for help. Updating these values will cause ALL prices”.n ” set to be automatically updated to be recalculated!
\n”.n n// Retrieve current membership groupsn$current_memberships = retrieve_current_membershipids();nn// Retrieve current defaults for processing and inbound shippingn$default_processing_cost = mysql_result(mysql_query(“SELECT global_processing_cost_percentn FROM general_configuration_options”),0);n$default_inbound_shipping = mysql_result(mysql_query(“SELECT global_inbound_shipping_costn FROM general_configuration_options”),0);nnecho “
\n”;nnecho “
- \n”.n “
\n”;nn////////////////////////////////////////////////////////////////////ninclude $SITE[”path_to_webroot”].”/admin/template/bottom.php”;n?>