Jump to content

dtchaos

Members
  • Content count

    52
  • Joined

  • Last visited

  1. dtchaos

    [Contribution] - USPS Methods

    Ok, I could not figure out what was going wrong, so I un-installed the 3.0.2 version and installed VERSION: 4.3.0 ALPHA, and no First-Class options appear no matter the weight of my package, or what I set the limit to. Around line 368 of checkout_shipping.php the line echo($quotes[$i]['methods'][$j]['title']); prints the calculated shipping options to the screen, does anyone know where this is fed from? I'm trying to track down WHY I'm not getting any information on First-Class shipping, but I don't know where the data is sent to USPS or received from USPS, so I can't check it. Does anyone know where in the code information is sent to the USPS servers?
  2. dtchaos

    [Contribution] - USPS Methods

    Hello, I'm not sure if something changed with USPS recently, however First Class Mail no long shows up to my customers. I checked the Admin section, and it is selected as a choice that should be displayed to customers, however it never shows up. I don't remember making any new modifications to the module, I'm using V3.0.2., but I know it used to work just fine. Does anyone have any ideas what may have changed recently to make First Class Mail no longer show, or even butter, what needs to happen to make it show? // I added the dash in First-Class Mail $this->types = array('EXPRESS' => 'Express Mail', 'FIRST CLASS' => 'First-Class Mail', 'PRIORITY' => 'Priority Mail', 'PARCEL' => 'Parcel Post', 'BPM' => 'Bound Printed Matter', 'MEDIA' => 'Media Mail'); When i noticed the problem I added the - in the above code but That didn't do anything. Is there some other place I need to check to make sure it's named right so USPS sends the quote?
  3. The package splitting is done in includes/classes/shipping.php in a function called quote() and splits based on the value you enter as your maximum weight in admin panel --> configuration --> Shipping/Packaging As far as hiding the weight I'm unsure as it's part of the quote class. You may be able to write something in checkout_shipping.php that removes the weight and package from the quote[] array just before it's displayed.
  4. dtchaos

    USPS Module Won't Install

    Ok I'm not sure if this is what happened, but you did not mention uninstalling the new mod before you removed the code, and replace the file with your old file. So what may be happening is your current module may be conflicting with the database items from the module that errored out on you. So, there are several ways to remedy this, if it is indeed the problem. 1) You can change your files back to the modle that didn't work and try to use the "uninstall button" and then re-switch and edit files back to the way they used to be, and install the one that was working. 2) You can try to restore your Database from when you backed up before you started messing with this stuff, and see if that works. 3) ... and the most dangerous option... You can go into PHPmyAdmin browse your database specifically the configuration table, and remove the USPS module items from there, then reinstall the module that was working and get back to what you had. It's not as scary as it sounds. You can actually look at the "function install()" in the USPS.php file and find out what it installed so you can get rid of it. Good luck.
  5. dtchaos

    USPS Module Won't Install

    I'm not sure if this is the same module you used, but I used this one, http://addons.oscommerce.com/info/5782 and it worked for me, but please note that in the installation steps you have to make modifications to catalog/admin/modules.php catalog/admin/includes/functions/general.php In steps 5 and 6 respectively. I didn't notice anything that said part of was not needed unless you were already running the UPSXML_v1_2_3_1 MOD. Also don't forget to upload the includes/languages/english/modules/shipping/usps.php file as it wont work right without it. If you try this and it still doesn't work please give the exact error message you get. It may help diagnose the problem. I hope this helps.
  6. dtchaos

    Splitting the weight into more boxes

    I solved this my self by doing the following: I took the USPS Flat Rate shipping module, then edited my includes/classes/shipping.php quote function to read as follows. function quote($method = '', $module = '') { global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes, $flat_shipping_weight, $flat_shipping_num_boxes; // This was used for debugging and finding out what this function was doing. /* $myFile = "/home/thegemsh/thegemshop.com/html/osc/includes/classes/errlog.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = '$module = ' . $module . '\n'; fwrite($fh, $stringData); fclose($fh);*/ $quotes_array = array(); if (is_array($this->modules)) { $shipping_quoted = ''; $shipping_num_boxes = 1; $flat_shipping_num_boxes = 1; $shipping_weight = $total_weight; $flat_shipping_weight = $total_weight; if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) { $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT; $flat_shipping_weight = $flat_shipping_weight+SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100); $flat_shipping_weight = $flat_shipping_weight + ($flat_shipping_weight*SHIPPING_BOX_PADDING/100); } if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT); $shipping_weight = $shipping_weight/$shipping_num_boxes; } // This was used for debugging to find out what this function was doing. /*$myFile = "/home/thegemsh/thegemshop.com/html/osc/includes/classes/errlog.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = '$this->modules = ' . $this->modules . '\n'; fwrite($fh, $stringData); fclose($fh);*/ if ($flat_shipping_weight > 18) { // Split into many boxes $flat_shipping_num_boxes = ceil($flat_shipping_weight/18); $flat_shipping_weight = $flat_shipping_weight/$flat_shipping_num_boxes; } I then modified every instance of $shipping_weight and $shipping_num_boxes in includes/modules/shippin/uspsflat.php to be $flat_shipping_weight, and $flat_shipping_num_boxes. Thus making it use the variables that divide it into 20 lb packages. The reason why it divides at 18 and not 20 is to allow for the tear weight of the packages to be added without blowing the 20 lb limit. I hope this helps anyone trying to do the same thing. The contribution I modified is http://addons.oscommerce.com/info/5783 http://forums.oscommerce.com/index.php?showtopic=294676 is the forum thread for the mod I modified.
  7. dtchaos

    Splitting the weight into more boxes

    I tried modifying the calculation around line 85 of classes/shipping.php if(substr_count("flat",$method) > 0){ if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT); $shipping_weight = $shipping_weight/$shipping_num_boxes; } }else{ if ($shipping_weight > 18) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight/18); $shipping_weight = $shipping_weight/$shipping_num_boxes; } } However this wound up dividing ALL shipping methods into 18 lb boxes as opposed to just the flat rate mod. I'm assume once it found one instance, of "flat" it just divided all the shipping methods into 18 lb boxes.
  8. dtchaos

    Splitting the weight into more boxes

    Oh I realize it can be set in the Admin panel, but we need the over all wieght to be set to 70lbs so we can ship packages up to that weight, but we also need a a mod that shows what the shipping price would be if the order were split into several flat rate boxes. I.e. to find out which is cheaper etc. Note: I intended to post this in http://forums.oscommerce.com/index.php?showtopic=294676 sorry.
  9. I am trying to modify this mod, to split the weight of any order into 20 lb boxes, the shop I run sells rough rock, and people ordering over 20 lbs cant choose flat rate if their order is over 20 lbs as we are willing to ship in boxes up to 70 lbs. So what I'm trying to do is modify this mod so it divides the weight of the order into 20 lb packages. So this mod will show 2 boxes at 20 lbs instead of 1 box at 40 lbs. I realize that this is calculated in classes/shipping.php in the quote(); function. I noticed the quote(); function in uspsflat.php and I'm wondering if it would be possible to recalculate the package weight here so the user is shown the shipping cost if their order was split between 20 lb packages, or if I have to do that in shipping.php? Does anyone know if this would work?
  10. Hello, I have a working shop http://hegemshop.com For the most part it works. However if the user enters a bad credit card number or goes back after getting to checkout_confirmation.php They are give the following message: On some occasions in the past Authorize would receive the payment, but OScommerce would not record it. The help desk at Authorize told me this was a server time out issue, however the company that hosts our site says that my Authorize AIM add on is not properly configured, omitting the critical information as to HOW it is improperly configured. However I did get them to say it has something to do with SSL and cookies. They mentioned forcing cookie use (which if turned on in OSC causes the page to go to cookie_usage.php in stead of checkout_confirmation.php even if the browser has cookies enabled). I have very little knowledge of CURL stuff so I'm at a loss as to how to find out where things are going wrong. My configure.php reads as follows: // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', 'http://thegemshop.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers // changed for AIM (dtk) define('HTTP_CATALOG_SERVER', 'http://thegemshop.com');// changed for AIM (dtk) define('HTTPS_CATALOG_SERVER', 'https://thegemshop.com');// changed for AIM (dtk) define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('HTTP_COOKIE_DOMAIN', 'thegemshop.com');// added for aim 12/08/2008(dtk) define('HTTPS_COOKIE_DOMAIN', 'thegemshop.com');// added for aim 12/08/2008(dtk) define('HTTP_COOKIE_PATH', '/catalog/');// added for aim 12/08/2008(dtk) define('HTTPS_COOKIE_PATH', '/catalog/');// added for aim 12/08/2008(dtk) define('DIR_WS_HTTP_CATALOG', '/catalog/');// added for aim 12/08/2008(dtk) define('DIR_WS_HTTPS_CATALOG', '/catalog/'); // added for aim 12/08/2008(dtk) define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', ''); define('DB_SERVER_USERNAME', 'mysql'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> And the CURL section of authorizenet_aim.php is as follows: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_CAINFO, 'd:\home\thegemsh\ca-bundle.crt'); // blank response fix curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); if(MODULE_PAYMENT_AUTHORIZENET_AIM_CURL_PROXY != 'none') { curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY,MODULE_PAYMENT_AUTHORIZENET_AIM_CURL_PROXY); } $authorize = curl_exec($ch); curl_close ($ch); $response = split('\,', $authorize); // Parse the response code and text for custom error display $response_code = explode(',', $response[0]); $response_text = explode(',', $response[3]); $x_response_code = $response_code[0]; $x_response_text = $response_text[0]; // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message if ($x_response_code != '1') {//try changing this to <> instead of != tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $response[0] . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false)); //tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $x_response_text . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false)); } If you notice something missing or you have any idea what may be causing the problem, or how I might be able to track it, please let me know. Thanks.
  11. Hello, I have a working shop http://hegemshop.com For the most part it works. However if the user enters a bad credit card number or goes back after getting to checkout_confirmation.php They are give the following message: On some occasions in the past Authorize would receive the payment, but OScommerce would not record it. The help desk at Authorize told me this was a server time out issue, however the company that hosts our site says that my Authorize AIM add on is not properly configured, omitting the critical information as to HOW it is improperly configured. However I did get them to say it has something to do with SSL and cookies. They mentioned forcing cookie use (which if turned on in OSC causes the page to go to cookie_usage.php in stead of checkout_confirmation.php even if the browser has cookies enabled). I have very little knowledge of CURL stuff so I'm at a loss as to how to find out where things are going wrong. My configure.php reads as follows: // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', 'http://thegemshop.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers // changed for AIM (dtk) define('HTTP_CATALOG_SERVER', 'http://thegemshop.com');// changed for AIM (dtk) define('HTTPS_CATALOG_SERVER', 'https://thegemshop.com');// changed for AIM (dtk) define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('HTTP_COOKIE_DOMAIN', 'thegemshop.com');// added for aim 12/08/2008(dtk) define('HTTPS_COOKIE_DOMAIN', 'thegemshop.com');// added for aim 12/08/2008(dtk) define('HTTP_COOKIE_PATH', '/catalog/');// added for aim 12/08/2008(dtk) define('HTTPS_COOKIE_PATH', '/catalog/');// added for aim 12/08/2008(dtk) define('DIR_WS_HTTP_CATALOG', '/catalog/');// added for aim 12/08/2008(dtk) define('DIR_WS_HTTPS_CATALOG', '/catalog/'); // added for aim 12/08/2008(dtk) define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', ''); define('DB_SERVER_USERNAME', 'mysql'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> And the CURL section of authorizenet_aim.php is as follows: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_CAINFO, 'd:\home\thegemsh\ca-bundle.crt'); // blank response fix curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); if(MODULE_PAYMENT_AUTHORIZENET_AIM_CURL_PROXY != 'none') { curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY,MODULE_PAYMENT_AUTHORIZENET_AIM_CURL_PROXY); } $authorize = curl_exec($ch); curl_close ($ch); $response = split('\,', $authorize); // Parse the response code and text for custom error display $response_code = explode(',', $response[0]); $response_text = explode(',', $response[3]); $x_response_code = $response_code[0]; $x_response_text = $response_text[0]; // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message if ($x_response_code != '1') {//try changing this to <> instead of != tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $response[0] . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false)); //tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $x_response_text . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false)); } If you notice something missing or you have any idea what may be causing the problem, or how I might be able to track it, please let me know. Thanks.
  12. dtchaos

    [Contribution] - USPS Methods

    I'm having an odd issue with USPS 3.0 I updated the names and such and on occasion it works fine, but lately, a great majority of the time when a customer clicks First Class Mail they get a CGI time out. This has occurred, on rare occasion, with other USPS shipping methods but with First Class Mail it's occurs very often. In fact it screws up more often than it actually works. Has anyone had this problem, or does anyone know a way to track this to fix it?
  13. I'm using the March 8th 2006 version. I posted the above a while ago, but never found an answer. This is still happening. Also on occasion OScommerce is not receiving the order after Authorize charges the card. I have contacted Authorize and they say the error is a time out error, and that I need to print something, anything, to the screen right away. I have tried placing empty <div> tags or tags in various places, but the problem persists. Has anyone else had this problem? Or does anyone know how to fix it?
  14. I'm having an odd issue with Authorize.net AIM. When a customer enters bad payment data (bad credit card or forgets to click the payment style box) then hits continue, and enters good information after being sent back they get the following error: "An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card." Talking to authorize.net tech support this is a time out error. But it happens every time. Anyone have any idea how to fix this?
  15. dtchaos

    USPS Module Help Please!

    This worked. I changed the set_function field to text and ran the SQL again and everything works perfectly now. Thank you very much!
×