Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

neilvincent76

Archived
  • Posts

    13
  • Joined

  • Last visited

Posts posted by neilvincent76

  1. I have managed to get it to work but am now getting a Hacking Attempt, any ideas

     

    i have just installed this module and put all my info into the module under admin but am having a problem getting it to work.

    I purchase a product, login, this then takes me to the delivery info screen where you can change your delivery address etc, as soon as i press continue which should take you to the payment selection screen i am just getting a white screen but as soon as i turn the hsbc module off it then lets me pick a payment option. please help

  2. i have just installed this module and put all my info into the module under admin but am having a problem getting it to work.

    I purchase a product, login, this then takes me to the delivery info screen where you can change your delivery address etc, as soon as i press continue which should take you to the payment selection screen i am just getting a white screen but as soon as i turn the hsbc module off it then lets me pick a payment option. please help

  3. It looks OK. Try removing one of those statements, like require(DIR_WS_FUNCTIONS . 'header_tags.php');, and see if it still fails. If it doesn't, try putting it back in and remove the other.

     

    Jack

     

    i tried removing one but it still does the same thing. i try removing the other one but thats the same also. does it make a difference that i am using an oscommerce template i got from the internet. my site is www.aiop.co.uk so you can see what i mean

  4. Please post the last half of your application_top file with that code installed.

     

    Jack

    here is part of my application_top file:

    // navigation history

    if (tep_session_is_registered('navigation')) {

    if (PHP_VERSION < 4) {

    $broken_navigation = $navigation;

    $navigation = new navigationHistory;

    $navigation->unserialize($broken_navigation);

    }

    } else {

    tep_session_register('navigation');

    $navigation = new navigationHistory;

    }

    $navigation->add_current_page();

     

    // Shopping cart actions

    if (isset($HTTP_GET_VARS['action'])) {

    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled

    if ($session_started == false) {

    tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

    }

     

    if (DISPLAY_CART == 'true') {

    $goto = FILENAME_SHOPPING_CART;

    $parameters = array('action', 'cPath', 'products_id', 'pid');

    } else {

    $goto = basename($PHP_SELF);

    if ($HTTP_GET_VARS['action'] == 'buy_now') {

    $parameters = array('action', 'pid', 'products_id');

    } else {

    $parameters = array('action', 'pid');

    }

    }

    switch ($HTTP_GET_VARS['action']) {

    // customer wants to update the product quantity in their shopping cart

    case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {

    if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {

    $cart->remove($HTTP_POST_VARS['products_id'][$i]);

    } else {

    if (PHP_VERSION < 4) {

    // if PHP3, make correction for lack of multidimensional array.

    reset($HTTP_POST_VARS);

    while (list($key, $value) = each($HTTP_POST_VARS)) {

    if (is_array($value)) {

    while (list($key2, $value2) = each($value)) {

    if (ereg ("(.*)\]\[(.*)", $key2, $var)) {

    $id2[$var[1]][$var[2]] = $value2;

    }

    }

    }

    }

    $attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';

    } else {

    $attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';

    }

    $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    // customer adds a product from the products page

    case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

    $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    // performed by the 'buy now' button in product listings and review page

    case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

    if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

    tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

    } else {

    $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    case 'notify' : if (tep_session_is_registered('customer_id')) {

    if (isset($HTTP_GET_VARS['products_id'])) {

    $notify = $HTTP_GET_VARS['products_id'];

    } elseif (isset($HTTP_GET_VARS['notify'])) {

    $notify = $HTTP_GET_VARS['notify'];

    } elseif (isset($HTTP_POST_VARS['notify'])) {

    $notify = $HTTP_POST_VARS['notify'];

    } else {

    tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

    }

    if (!is_array($notify)) $notify = array($notify);

    for ($i=0, $n=sizeof($notify); $i<$n; $i++) {

    $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");

    $check = tep_db_fetch_array($check_query);

    if ($check['count'] < 1) {

    tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");

    }

    }

    tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

    } else {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

    break;

    case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {

    $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

    $check = tep_db_fetch_array($check_query);

    if ($check['count'] > 0) {

    tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

    }

    tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));

    } else {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

    }

    break;

    case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {

    if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {

    tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));

    } else {

    $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

    }

    }

    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

    break;

    }

    }

     

    // include the who's online functions

    require(DIR_WS_FUNCTIONS . 'whos_online.php');

    tep_update_whos_online();

     

    // include the password crypto functions

    require(DIR_WS_FUNCTIONS . 'password_funcs.php');

     

    // include validation functions (right now only email address)

    require(DIR_WS_FUNCTIONS . 'validations.php');

     

    // split-page-results

    require(DIR_WS_CLASSES . 'split_page_results.php');

     

    // infobox

    require(DIR_WS_CLASSES . 'boxes.php');

     

    // auto activate and expire banners

    require(DIR_WS_FUNCTIONS . 'banner.php');

    tep_activate_banners();

    tep_expire_banners();

     

    // auto expire special products

    require(DIR_WS_FUNCTIONS . 'specials.php');

    tep_expire_specials();

     

    // calculate category path

    if (isset($HTTP_GET_VARS['cPath'])) {

    $cPath = $HTTP_GET_VARS['cPath'];

    } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {

    $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);

    } else {

    $cPath = '';

    }

     

    if (tep_not_null($cPath)) {

    $cPath_array = tep_parse_category_path($cPath);

    $cPath = implode('_', $cPath_array);

    $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];

    } else {

    $current_category_id = 0;

    }

     

    // include the breadcrumb class and start the breadcrumb trail

    require(DIR_WS_CLASSES . 'breadcrumb.php');

    $breadcrumb = new breadcrumb;

     

    $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

    $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

     

    // add category names or the manufacturer name to the breadcrumb trail

    if (isset($cPath_array)) {

    for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {

    $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");

    if (tep_db_num_rows($categories_query) > 0) {

    $categories = tep_db_fetch_array($categories_query);

    $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));

    } else {

    break;

    }

    }

    } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {

    $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

    if (tep_db_num_rows($manufacturers_query)) {

    $manufacturers = tep_db_fetch_array($manufacturers_query);

    $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

    }

    }

     

    // add the products model to the breadcrumb trail

    if (isset($HTTP_GET_VARS['products_id'])) {

    $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

    if (tep_db_num_rows($model_query)) {

    $model = tep_db_fetch_array($model_query);

    $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));

    }

    }

     

    // initialize the message stack for output messages

    require(DIR_WS_CLASSES . 'message_stack.php');

    $messageStack = new messageStack;

     

    // set which precautions should be checked

    define('WARN_INSTALL_EXISTENCE', 'true');

    define('WARN_CONFIG_WRITEABLE', 'true');

    define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');

    define('WARN_SESSION_AUTO_START', 'true');

    define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

     

    // BOF: WebMakers.com Added: Header Tags Controller v2.5.7

    require(DIR_WS_FUNCTIONS . 'header_tags.php');

    // Clean out HTML comments from ALT tags etc.

    require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

    // EOF: WebMakers.com Added: Header Tags Controller v2.5.7

    ?>

  5. i am trying to install this contribution but having a problem. I have uploaded and ran the database_setup.php file and it comes up it is installed successfully. I then start the next bit of the installation which is the catalog side. The first part says add the following before the last ?> of the /catalog/includes/application_top.php file. when i add this line and go to my website all i get is a blank white screen but as soon as i undo the change my site works again, please help.

    it tells you to add the following to the application_top.php file:-

     

    // BOF: WebMakers.com Added: Header Tags Controller v2.5.7

    require(DIR_WS_FUNCTIONS . 'header_tags.php');

    // Clean out HTML comments from ALT tags etc.

    require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

    // EOF: WebMakers.com Added: Header Tags Controller v2.5.7

  6. i am trying to install this contribution but having a problem. I have uploaded and ran the database_setup.php file and it comes up it is installed successfully. I then start the next bit of the installation which is the catalog side. The first part says add the following before the last ?> of the /catalog/includes/application_top.php file. when i add this line and go to my website all i get is a blank white screen but as soon as i undo the change my site works again, please help.

    it tells you to add the following to the application_top.php file:-

     

    // BOF: WebMakers.com Added: Header Tags Controller v2.5.7

    require(DIR_WS_FUNCTIONS . 'header_tags.php');

    // Clean out HTML comments from ALT tags etc.

    require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

    // EOF: WebMakers.com Added: Header Tags Controller v2.5.7

×
×
  • Create New...