Jump to content

candocandy

Members
  • Content count

    40
  • Joined

  • Last visited

Posts posted by candocandy


  1. Forgot to reference the lines in the Split page results file

     

    // check if number_of_pages > $max_page_links

    $cur_window_num = intval($this->current_page_number / $max_page_links); Line 86

    if ($this->current_page_number % $max_page_links) $cur_window_num++;

     

    $max_window_num = intval($this->number_of_pages / $max_page_links); Line 89

    if ($this->number_of_pages % $max_page_links) $max_window_num++;


  2. Hi,

    I have installed this into my MS2 version and although I get the Categories to display, as soon as I click on them I get a Split page error.

    Warning: Division by zero in /home/stev9321/public_html/includes/classes/split_page_results_new.php on line 86

     

    Warning: Division by zero in /home/stev9321/public_html/includes/classes/split_page_results_new.php on line 89

     

    I have carried out the changes recommended by VJ on page 4 of this topic :

     

    1. Copy /catalog/includes/spider.txt (if you haven't done so, earlier), and /catalog/includes/classes/split_page_results.php (rename it to split_page_results_new.php, before copying) from MS2.

     

    2. In split_page_results_new.php, rename all instances of "splitPageResults" to "splitPageResultsNew" (you should find 2).

     

    3. In /includes/modules/link_listing.php:

     

    replace,

     

    CODE

     

    $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'l.links_id');

     

     

     

     

    with,

     

    CODE

     

    // split-page-results

    require(DIR_WS_CLASSES . 'split_page_results_new.php');

     

    $listing_split = new splitPageResultsNew($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'l.links_id');

     

    But still get the error above

     

    Any help would be greatly appreciated.

     

    Thanks

     

    Steve


  3. Hi,

     

    I have been running Center Shop for a while now on my shop I have triedto add a background image to the site but, but instead of showing the image I get bright solid colours of either red or green.

     

    I assume that the contribution will look to the Header.php file rather than the css to pick up this image. I have modified the code to:

     ///////////////////
     ///////////////////
     // [0001] BOF: WebMakers.com Added: Center Shop
     // This goes before any other table of the shop
     //
     // Is center Shop ON/OFF ?
     ///////////////////
    
         if ( CENTER_SHOP_ON == 'on' ) {
    
     ///////////////////
     // [0001] Background Color ON/OFF and CellPadding for around the shop?
     ///////////////////
    
           if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {
     ?>
         <table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="/images/cream.jpg">
           <tr><td>
     <?php
           }
    
    
     ///////////////////
     // [0001] Shop Width Size and Shop Background Color
     ///////////////////
     ?>
     
         <table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="/images/cream.jpg" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >
           <tr><td BGColor="/images/cream.jpg">
     <?php
    
     ///////////////////
     // [0001] The rest of this <td> statement is located at the end of footer.php
     ///////////////////

     

    For the life of me I cannot figure out why the image is not displaying.

     

    Any input would be appreciated :huh:


  4. Hi,

     

    I fixed my earlier problem but now when returning customer, who previously used the PWA function, tries to use it agin it tells them that their e-mail is already assigned to an account. Should their original account not be automatically deleted when this happens.

     

    I think the following code in the create account php file relates to it. Can any one see any errors in it that might be causing the accounts not to be deleted.

    // DDB - 040616 - PWA
    //      if ($check_email['total'] > 0) {
    //        $error = true;
    //        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
    //      }
    if ($check_email['total'] > 0) 
    {  //PWA delete account
      	 $get_customer_info = tep_db_query("select customers_id, customers_email_address, purchased_without_account from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
     $customer_info = tep_db_fetch_array($get_customer_info); 
     $customer_id = $customer_info['customers_id']; 
     $customer_email_address = $customer_info['customers_email_address']; 
     $customer_pwa = $customer_info['purchased_without_account']; 
     if ($customer_pwa !='1') 
     {   
           $error = true;
           $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
     } else {   
    	 tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");   
    	 tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");   
    	 tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "'");   
    	 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'");   
    	 tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "'");   
    	 tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . $customer_id . "'"); 
     }  
         }
    // END

    Any help would be greatly appreciated

    Thanks


  5. Hi,

     

    I have just installed the PWA contribution, however when trying to view orders placed with it through the admin, I get this error:

     

    Parse error: parse error, unexpected T_CASE in /home/stev9321/public_html/sfdm/orders.php on line 76

     

    This is the code it refers to: Line 76 = case 'deleteconfirm':

     

    The surronding code is :

     

    // start pwa changes

    $pwa_check_query= tep_db_query("select purchased_without_account from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");$pwa_check= tep_db_fetch_array($pwa_check_query); if ($pwa_check['purchased_without_account'] != '1'){ $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]); }

    else { $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\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_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 ('" . (int)$oID . "', '" . tep_db_input($status) . "', now(), '" . tep_db_input($customer_notified) . "', '" . tep_db_input($comments) . "')");

     

    $order_updated = true;

    }

     

    if ($order_updated == true) {

    $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');

    } else {

    $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');

    }

     

    tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit'));

    break;

    case 'deleteconfirm':

    $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

     

    tep_remove_order($oID, $HTTP_POST_VARS['restock']);

     

    tep_redirect(tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action'))));

    break;

    }

    }

     

    if (($action == 'edit') && isset($HTTP_GET_VARS['oID'])) {

    $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

     

    $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

    $order_exists = true;

    if (!tep_db_num_rows($orders_query)) {

    $order_exists = false;

    $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');

    }

    }

     

    include(DIR_WS_CLASSES . 'order.php');

     

    Anybody have any idea why this would occur.

     

    Thanks

×