3. Changing your shop settings (Admin)
(in case of upgrade please delete all the changes you've made during previous installations)
3.1. Edit your admin/includes/configure.php file
Add the following to your admin/includes/configure.php file: // H4H AFFILIATE PROGRAM define('FILENAME_REFERRAL','referrals.php'); define('DIR_WS_REFERRAL', 'referral/'); // H4H AFFILIATE PROGRAM
3.2. Edit your admin/includes/application_top.php file
In admin/includes/application_top.php around the line 130 right after } else { $lng->get_browser_language(); } $language = $lng->language['directory']; $languages_id = $lng->language['id']; }
add
// H4H AFFILIATE PROGRAM include('includes/h4h_affiliate_config.php'); // H4H AFFILIATE PROGRAM
3.3. Edit your admin/includes/column_left.php file
To admin/includes/column_left.php add // H4H AFFILIATE PROGRAM require(DIR_WS_BOXES . 'h4h_affiliate.php'); // H4H AFFILIATE PROGRAM
3.4. Edit your admin/orders_status.php file
Add to admin/orders_status.php right after
} elseif ($action == 'save') { tep_db_perform(TABLE_ORDERS_STATUS, $sql_data_array, 'update', "orders_status_id = '" . (int)$orders_status_id . "' and language_id = '" . (int)$language_id . "'"); } } if (isset($HTTP_POST_VARS['default']) && ($HTTP_POST_VARS['default'] == 'on')) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($orders_status_id) . "' where configuration_key = 'DEFAULT_ORDERS_STATUS_ID'"); }
(around the line 50):
// H4H AFFILIATE PROGRAM include(DIR_WS_INCLUDES . 'h4h_affiliate_orders_status_add.php'); // H4H AFFILIATE PROGRAM
(add this right before
tep_redirect(tep_href_link(FILENAME_ORDERS_STATUS, 'page=' . $HTTP_GET_VARS['page'] . '&oID=' . $orders_status_id));
)
3.5. Edit your admin/orders_status.php file
Add to admin/orders_status.php right after
case 'deleteconfirm': $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_status_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_ORDERS_STATUS_ID'"); $orders_status = tep_db_fetch_array($orders_status_query); if ($orders_status['configuration_value'] == $oID) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '' where configuration_key = 'DEFAULT_ORDERS_STATUS_ID'"); } tep_db_query("delete from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . tep_db_input($oID) . "'");
(around the line 67):
// H4H AFFILIATE PROGRAM include(DIR_WS_INCLUDES . 'h4h_affiliate_orders_status_remove.php'); // H4H AFFILIATE PROGRAM
(add this right before
tep_redirect(tep_href_link(FILENAME_ORDERS_STATUS, 'page=' . $HTTP_GET_VARS['page']));
)
3.6. Edit your admin/orders.php file
To admin/orders.php right after
if ( ($check_status['orders_status'] != $status) || tep_not_null($comments)) { tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); $customer_notified = '0'; if (isset($HTTP_POST_VARS['notify']) && ($HTTP_POST_VARS['notify'] == 'on')) { $notify_comments = ''; if (isset($HTTP_POST_VARS['notify_comments']) && ($HTTP_POST_VARS['notify_comments'] == 'on')) { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) VALUES (1'" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");
around the line 57 add
// H4H AFFILIATE PROGRAM include (DIR_WS_INCLUDES . 'h4h_affiliate_orders_status_change.php'); // H4H AFFILIATE PROGRAM
3.7. Edit your admin/includes/classes/order.php file
In admin/includes/classes/order.php change
$index = 0; $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']);
to
$index = 0; $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); while ($orders_products = tep_db_fetch_array($orders_products_query)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price'], 'products_id' => $orders_products['products_id'] ); |