Jump to content

mcmannehan

Members
  • Content count

    390
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by mcmannehan

  1. mcmannehan

    osCommerce 2.2 hacked

    osC is out off date you should change tp Phoenix.
  2. mcmannehan

    Redundant Code ???

    In all osC versions included the oscom2ce-phoenix-v1.0.1.0 is redundant code?!? in catalog/admin/includes/functions/html_output.php check function tep_href_link() and tep_hide_session_id() In the admin SID (tep_hide_session_id()) is never defined and always NULL function tep_hide_session_id() { $string = ''; if (defined('SID') && tep_not_null(SID)) { $string = tep_draw_hidden_field(tep_session_name(), tep_session_id()); } return $string; } In the admin $SID function tep_href_link() is alway NULL, coz $SID didn't exist and is missing in the Global. On some server this occur an redirection error function tep_href_link($page = '', $parameters = '', $connection = 'SSL', $add_session_id = true) { global $request_type; $page = tep_output_string($page); if ($page == '') { die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine the page link!<br /><br />Function used:<br /><br />tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</strong>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_ADMIN; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_ADMIN; } else { $link = HTTP_SERVER . DIR_WS_ADMIN; } } else { die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL<br /><br />Function used:<br /><br />tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</strong>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ((substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if (($add_session_id == true) && (SESSION_FORCE_COOKIE_USE == 'False')) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if (isset($_sid)) { $link .= $separator . tep_output_string($_sid); } while (strpos($link, '&&') !== false) $link = str_replace('&&', '&', $link); return $link; } Any ideas how to change???
  3. mcmannehan

    Duplicate order mail

    an it's still what the people said to you: Same email in shop and additional so thats why you get order email twice. Shopemail is: info@shopmail.com Customer Mail is: kunde@bestellung.com Additional order mail is :info@shopmail.com Than everthing should work well and you get Shopemail is: info@shopmail.com <--- 2 order mails to this email Customer Mail is: kunde@bestellung.com <--- 1 order mails to this email Check the sender in your email client!!! Now no further info... have a nice day!!!
  4. mcmannehan

    Duplicate order mail

    Shopemail is: info@shopmail.com Customer Mail is: kunde@bestellung.com so you will get normaly: Shopemail is: info@shopmail.com <--- 2 order mails to this email Customer Mail is: kunde@bestellung.com <--- 1 order mails to this email if you get: Shopemail is: info@shopmail.com <--- 1 order mails to this email Customer Mail is: kunde@bestellung.com <--- 2 order mails to this email Than your code have a issue elsewhere!!! In my opinion: Check your email client and check the sender.
  5. mcmannehan

    Duplicate order mail

    and additional order mail is ???
  6. mcmannehan

    Duplicate order mail

    SEND_EXTRA_ORDER_EMAILS_TO is filled with the customer email address. So check all the code and the files with that variable. May be elsewhere varibale is filled with the customer address. @raiwa i agree with you 1000000%, no logic!!!!!!!!!!!!
  7. mcmannehan

    Duplicate order mail

    You don't get it or??? so do the follow: Change the customer email address this shoudn't be the same like the shop email Change the additional email address to the shop email than you shoud get 2 Admin emails and 1 customer email. after your explanation: additional order mail is the same like the customer email address so @raiwa is abolut right with: Other explanation: Some issue elsewhere...
  8. mcmannehan

    Duplicate order mail

    If no issue in the code, than this is the only logical answer. If this fix the problem, so i ask again: why the SEND_EXTRA_ORDER_EMAILS_TO is filled with the customer e-mail address??? 
  9. mcmannehan

    Duplicate order mail

    so you get 4 order emails??? If this the proplem, so why the SEND_EXTRA_ORDER_EMAILS_TO is filled with the customer e-mail address??? May be some issue elsewhere...
  10. mcmannehan

    Duplicate order mail

    i think that too... 🤣🤣 some people are very clever! 🤣🤣 see my signature: 99.9% of the bugs sit in front of the computer! 🤣🤣
  11. mcmannehan

    Duplicate order mail

    If the customer get the order e-mail twice than why the SEND_EXTRA_ORDER_EMAILS_TO is filled with the customer e-mail address???
  12. mcmannehan

    Duplicate order mail

    @Omar_oneThis can configure in the admin area. The SEND_EXTRA_ORDER_EMAILS_TO variable dosen't contain the customer email, so this can't be the issue!
  13. mcmannehan

    Duplicate order mail

    // PWA guest checkout echo $OSCOM_Hooks->call('pwa', 'PwaCheckoutMailMod'); commend this out for to check!
  14. mcmannehan

    Duplicate order mail

    ............................... //------insert customer choosen option eof ---- $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n"; } // <--------------------------- this is an end of a for loop // make shure the following code is is not inside // lets start with the email confirmation $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link('account_history_info.php', 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $order->info['payment_method'] . "\n\n"; if (isset($payment_class->email_footer)) { $email_order .= $payment_class->email_footer . "\n\n"; } } tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } // load the after_process function from the payment modules $payment_modules->after_process(); $cart->reset(true); ............................... in catalog/checkout_process.php Check also the class file of the email. Check all files for the checkout!
  15. mcmannehan

    Friendship customers discount

    //Friendship customers discount if (FRIENDSHIP_ENABLE == 'True'){ $friendship = get_friendship_discount(FRIENDSHIP_ORDER_STATUS); $friendship_discount = FRIENDSHIP_DISCOUNT; $this_order = $insert_id; // <---------- It's $this_order used on other place??? if (($friendship!=false) and ($friendship['friendship_newcustomer']==1)){ $update_friendship_info_query = tep_db_query("update " . TABLE_CUSTOMERS_FRIENDSHIP . " set friendship_applied = 1, friendship_order_id = " . $insert_id . ", date_discount_applied = now() where friendship_id = '" . $friendship['friendship_id'] . "'"); $customer_friendship = tep_db_fetch_array($update_friendship_info_query); // <---------- without a select??? That's nonsens!!! // This array is filled from your function get_friendship_discount $sql_data_array = array('friendship_customer_id' => $friendship['friendship_friend_id'], 'friendship_friend_id' => $friendship['friendship_customer_id'], 'friendship_date' => 'now()', 'friendship_applied' => '0', 'friendship_discount' => $friendship_discount, 'friendship_newcustomer' => '0', 'friendship_order_id' => (int)$insert_id); tep_db_perform(TABLE_CUSTOMERS_FRIENDSHIP, $sql_data_array); }elseif($friendship!=false){ $update_friendship_info_query = tep_db_query("update " . TABLE_CUSTOMERS_FRIENDSHIP . " set friendship_applied = 1, date_discount_applied = now() where friendship_id = '" . $friendship['friendship_id'] . "'"); $customer_friendship = tep_db_fetch_array($update_friendship_info_query); // <---------- without a select??? That's nonsens!!! } } //End Friendship customers discount function get_friendship_discount($status) { global $customer_id; $customer_friendship_query = tep_db_query("select * from " .TABLE_CUSTOMERS_FRIENDSHIP. " where friendship_customer_id = '".(int)$customer_id."' and friendship_applied = 0"); //if (tep_db_num_rows($customer_friendship_query) > 0){ if (tep_db_num_rows($customer_friendship_query)){ // <----------- it's the same like ---> if (tep_db_num_rows($customer_friendship_query) > 0){ $customer_friendship = tep_db_fetch_array($customer_friendship_query); if ($customer_friendship['friendship_newcustomer'] == 1){ //Controlar que el cliente que ha recomendado la tienda ya haya realizado algun pedido anteriormente $friendship_orders_query = tep_db_query("select count(*) as 'orders' from " .TABLE_ORDERS. " where customers_id = '".$customer_friendship['friendship_friend_id']."' and orders_status = '".$status."' "); $friendship_orders = tep_db_fetch_array($friendship_orders_query); $num_orders = $friendship_orders['orders']; if ($num_orders < 1){ return false; } else{ return $customer_friendship ; } } else { $order_status_query = tep_db_query("select orders_status from " .TABLE_ORDERS. " where orders_id = '".(int)$customer_friendship['friendship_order_id']."' "); $order_status = tep_db_fetch_array($order_status_query); /* if ($order_status['orders_status'] == $status) return $customer_friendship ; else return false; */ //short and faster ($order_status['orders_status'] == $status ? return $customer_friendship : return false); } }else return false; } 🤣🤣🤣 clever!!!
  16. mcmannehan

    Duplicate order mail

    May you should get more familiar with the osC logic. 🤠 check catalog/checkout_process.php may be the function tep_mail is in a loop or change the settings in admin/email options configuration
  17. mcmannehan

    Redundant Code ???

    Thanks for the answer. First: My server provider did configure some stuff wrong, now SID as constant is working. Secound: The variable $SID isn't set as global variable in the function (tep_href_link), so $SID will be always NULL or did i miss something? .................. if (($add_session_id == true) && (SESSION_FORCE_COOKIE_USE == 'False')) { if (tep_not_null($SID)) { // <--- $SID is always NULL $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } .................. I change to: .................. if (($add_session_id == true) && (SESSION_FORCE_COOKIE_USE == 'False')) { if ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } .................. until now no issues with the changes.
  18. Looks like both variable is undefined. Check your languages files
  19. May you should not use the outdated osC 2.2. it's the same you would still use Windows 98. Change your system to Phoenix.
  20. mcmannehan

    What's the sence?

    In the last version osC BS 3 and BS 4 i find in /catalog/admin/includes/classes/upload.php if (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } elseif (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } i really ask by myself, what is that? Makes no sence!!! An if and an else with the same!!!! So i changed to: if (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } every works fine. Any suggestion why this is since the beginning of osC in the upload file?
  21. mcmannehan

    Paypal App - customers mail

    What version of osC and what version of PayPal you use? Normally you should check the languages file, it deppends what version of PayPal you use. Check /includes/languages/english/checkout_process.php or /includes/languages/english/modules/payment/paypal_standard.php If you can't fix, than send a PM to me.
  22. mcmannehan

    Paypal nimmt andere Versandkosten

    So wie das aussieht, ist die komplette PayPal- und Shopversion fehlerhaft installiert.
  23. mcmannehan

    Where is The Orders

    I use https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip I did coded a complett new ccbill add-on. This add-on will be verified by ccbill, soon. If this happen, can PM me for to get the add-on.
  24. mcmannehan

    Upload Class File

    I wondering, why the check for illegal character dosen't exist!!! In the frozen and in the boostrap 4 version. So i recommand change complett the function parse to this: Start about at line 35 catalog/admin/includes/classes/upload.php function parse() { global $messageStack; $file = array(); if (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } elseif (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } if ( tep_not_null($file['tmp_name']) && ($file['tmp_name'] != 'none') && is_uploaded_file($file['tmp_name']) ) { if (sizeof($this->extensions) > 0) { if (!in_array(strtolower(substr($file['name'], strrpos($file['name'], '.')+1)), $this->extensions)) { if ($this->message_location == 'direct') { $messageStack->add(ERROR_FILETYPE_NOT_ALLOWED, 'error'); } else { $messageStack->add_session(ERROR_FILETYPE_NOT_ALLOWED, 'error'); } return false; } } //BOC by mcmannehan if (preg_match('/^([-\.\w]+)$/', $file['name']) !== true) { $message = sprintf(ERROR_FILE_ILLEGAL_CHAR, $file['name']); if ($this->message_location == 'direct') { $messageStack->add($message, 'error'); } else { $messageStack->add_session($message, 'error'); } return false; } //EOC $this->set_file($file); $this->set_filename($file['name']); $this->set_tmp_filename($file['tmp_name']); return $this->check_destination(); } else { if ($this->message_location == 'direct') { $messageStack->add(WARNING_NO_FILE_UPLOADED, 'warning'); } else { $messageStack->add_session(WARNING_NO_FILE_UPLOADED, 'warning'); } return false; } } And add to the catalog/admin/includes/languages/english.php: const ERROR_FILE_ILLEGAL_CHAR = 'Invalid character in the file name! <strong>%s</strong>. Spaces and special characters are not allowed in Internet filenames. Allowed are: a-z A-Z 0-9 - _'; "const" have some restriction but it's much more better and faster than define.
  25. mcmannehan

    Upload Class File

    Changes in the Regex are wrong. For to allow only a-z A-Z 0-9 - _ . The regex must be: if (preg_match('/^[-A-Za-z0-9._]+$/i', $file['name']) == false) { $message = sprintf(ERROR_FILE_ILLEGAL_CHAR, $file['name']); if ($this->message_location == 'direct') { $messageStack->add($message, 'error'); } else { $messageStack->add_session($message, 'error'); } return false; }
×