Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

osmyrna

Pioneers
  • Posts

    70
  • Joined

  • Last visited

Profile Information

  • Real Name
    cmf
  • Gender
    Not Telling

osmyrna's Achievements

  1. Another question. After putting the pwa information on the admin/orders.php page, the admin for orders was blank. So, I removed the pwa mods from it, and everything seems to be functioning fine. Did you find this to be the case, or am I missing something? The only thing that is odd on the page is that the instruction buttons (invoice, packing slip, etc.) are showing up at the top and the bottom.
  2. THANK YOU! Successfully converted order_info.php and login.php. HAPPY.
  3. The only page that seems problematic for me is the /catalog/login.php page from 2.2.2. Everything was the same on the page until the 3rd line at this point, after which everything changes: $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function session_win() { window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus(); } //--></script> </head> Dare I hope you have a sample page of 2.3 /catalog/login.php that was edited to include the lengthy 2nd modification which is structured for the 2.2.2 page and doesn't match up with the section on 2.3 that it is supposed to replace? I keep trying to figure out how to fit this and that into it, but it keeps not matching up. Thanks anyway for the encouragement that it CAN be done.
  4. Is there ANY way to modify PWA v0.910 to work with OsCommerce v2.3? It looked do-able until I hit /catalog/login.php - at that point, I gave up and tried to install "Consolidated_login_with_guest_checkout (1)_1" but hit a snag with that when I got to my header page because I had to use the 2003 version to have header and columns present properly. Since my database is already set up for PWA v0.910, that would sure be nice to be able to work with. ??
  5. Happy, happy. Thank you. Just did both database edits and then ran a sample order through; and it put the correct tax charge for the items and s/h. Osmyrna
  6. Er, no. I just discovered that was the problem and am now trying to find out how to fix it through the database, since I've entered 635 products so far. Sigh. Can help? Osmyrna
  7. Hello, I've got everything pretty well set up, but I just got an order in from my home state and it didn't have the sales tax entered. So I went through the instructions and re-did everything in the admin, but I still can't get any sales tax to enter. Is there something else I need to do? I've searched, but this doesn't seem to be a common problem. I did install PWA modifications - could this be affecting anything? I tried both the PWA page and the regular account page, and it didn't charge tax on either. Help? Osmyrna
  8. Here's the code for my cc_validation.php - the only thing I can guess is that when 15 digits are entered instead of 16, it comes back with the numbers not adding up to that kind of card??? I'm stumped. Can someone out there help or point me to help? Thanks. Osmyrna <?php /* $Id: cc_validation.php,v 1.1 2002/11/01 02:13:21 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // start the card recognition and acceptance class cc_validation { var $cc_type, $cc_number, $cc_expiry_month, $cc_expiry_year; // Remove any non numeric characters. function cleancc($number) { return ereg_replace('[^0-9]', '', $number); } function validate($number, $expiry_m, $expiry_y) { $this->cc_number = $number; // could not get the strip non numerics to work but left the function in and commented out the function call // $Number = cc_validation::cleancc($number); $Number = $number; // 4 number and 6 number checks $NumberLeft4 = substr($Number, 0, 4); $NumberLeft6 = substr($Number, 0, 6); $NumberLength = strlen($Number); if ( strtolower(CC_VAL) == 'true' ) { //empty these variables just to be sure $ShouldLength2=''; $ShouldLength3=''; // Diners Club if (ereg('^3(0[0-5].{11}|[68].{12})$', $this->cc_number)) { $this->cc_type = 'Diners Club'; $ShouldLength = 14; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_DINERSCLUB) != 'true' ) { return -5; } // American Express } elseif (ereg('^3[47].{13}$', $this->cc_number)) { $this->cc_type = 'American Express'; $ShouldLength = 15; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_AMERICANEXPRESS) != 'true' ) { return -5; } // Carte Blanche } elseif ( ($NumberLeft4 >= 3890) && ($NumberLeft4 <= 3899) ) { $this->cc_type = 'Carte Blanche'; $ShouldLength = 14; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_CARTBLANCHE) != 'true' ) { return -5; } // Australian Bankcard } elseif (ereg('^5610.{12}$', $this->cc_number)) { $this->cc_type = 'Australian BankCard'; $ShouldLength = 16; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_OZBANKCARD) != 'true' ) { return -5; } // Discover/Novus } elseif (ereg('^6011.{12}$', $this->cc_number)) { $this->cc_type = 'Discover/Novus'; $ShouldLength = 16; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_DISCOVERNOVUS) != 'true' ) { return -5; } // Mastercard } elseif (ereg('^5[1-5].{14}$', $this->cc_number)) { $this->cc_type = 'Master Card'; $ShouldLength = 16; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_MASTERCARD) != 'true' ) { return -5; } // JCB } elseif (ereg('^(3.{15}|(2131|1800).{11})$', $this->cc_number)) { $this->cc_type = 'JCB'; $ShouldLength = 16; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_JCB) != 'true' ) { return -5; } // Visa } elseif (ereg('^4(.{12}|.{15})$', $this->cc_number)) { $this->cc_type = 'Visa'; $ShouldLength = 16; $ShouldLength2 = 13; if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_VISA) != 'true' ) { return -5; } } else { return -1; } // function to check the number length // Is the number the right length? if ( !( ($NumberLength == $ShouldLength) || ( !(empty($ShouldLength2)) && ($NumberLength == $ShouldLength2) ) || ( !(empty($ShouldLength3)) && ($NumberLength == $ShouldLength3) ) ) ) { return -6; } } else { $this->cc_type = 'CC'; } if ( strtolower(CC_BLACK) == 'true' ) { // Blacklist check $card_info = tep_db_query("select c.blacklist_card_number from " . TABLE_BLACKLIST . " c where c.blacklist_card_number = '" . $Number . "'"); if (tep_db_num_rows($card_info) != 0) { // card not found in database return -7; } } // checks the expiry just in case the javascript does not if (is_numeric($expiry_m) && ($expiry_m > 0) && ($expiry_m < 13)) { $this->cc_expiry_month = $expiry_m; } else { return -2; } $current_year = date('Y'); $expiry_y = substr($current_year, 0, 2) . $expiry_y; if (is_numeric($expiry_y) && ($expiry_y >= $current_year) && ($expiry_y <= ($current_year + 10))) { $this->cc_expiry_year = $expiry_y; } else { return -3; } if ($expiry_y == $current_year) { if ($expiry_m < date('n')) { return -4; } } return $this->is_valid(); } function is_valid() { $cardNumber = strrev($this->cc_number); $numSum = 0; for ($i=0; $i<strlen($cardNumber); $i++) { $currentNum = substr($cardNumber, $i, 1); // Double every second digit if ($i % 2 == 1) { $currentNum *= 2; } // Add digits of 2-digit numbers together if ($currentNum > 9) { $firstNum = $currentNum % 10; $secondNum = ($currentNum - $firstNum) / 10; $currentNum = $firstNum + $secondNum; } $numSum += $currentNum; } // If the total has no remainder it's OK return ($numSum % 10 == 0); } } ?>
  9. Hello, Thought I had everything working great, but just checked entering 15 digits for a VISA instead of 16 and the error message comes up from 'TEXT_CCVAL_ERROR_UNKNOWN_CARD', rather than 'TEXT_CCVAL_ERROR_SHORT', Can anyone please tell me what and where to fix this problem? Thanks. Osmyrna :o
  10. I've been trying to get this together (20 minutes???) and got to Step 3 to run the included file pwa_install.sql but I get this error message, Error SQL query: ALTER TABLE customers ADD purchased_without_account TINYINT( 1 ) UNSIGNED DEFAULT '0' NOT NULL AFTER customers_id; MySQL said: #1060 - Duplicate column name 'purchased_without_account' I assume I have 0.70 because I only had one file to delete and 0.90 had 5 - could this make a difference? Can anyone tell me what's wrong here? I kept telling myself, "I can do this!" but . . . Thanks, osmyrna
×
×
  • Create New...