Jump to content

fulluvscents

Members
  • Content count

    305
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fulluvscents

  1. fulluvscents

    [Contribution] - USPS Methods

    I suppose the USPS will determine this. They make changes to their API and sometimes they change the server that they use for the communications. RateV4 simply means that you are sending your request to the server that communicates this particular API (Version 4). If they update their API to a fifth version and put that on a new server, then we'll have to update yet again to a Rate V5 - or whatever they choose to use. Short answer - there is no end life as of now, but at some point in the future, it is likely that Rate V4 will be abolished just as past versions have been.
  2. fulluvscents

    [Contribution] - USPS Methods

    ot_shipping should be (without the line numbers of course): 27 $this->output[] = array('title' => str_replace($search, $replace, $order->info['shipping_method']) . ':', 28 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 29 'value' => $order->info['shipping_cost']); 30 } The other error is because you are missing the code that is supposed to be added to ADMIN/INCLUDES/FUNCTIONS/GENERAL.PHP Add the code and double check to make sure that you didn't add it to CATALOG/INCLUDES/FUNCTIONS/GENERAL.PHP. If so, just remove it.
  3. fulluvscents

    [Contribution] - USPS Methods

    testing.shippingapis.com The test server does not support V4 rate requests. All requests should be sent to the regular server, even if they are test requests.
  4. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    Easiest way to debug a redirect loop is to start commenting out the redirect commands one at a time. Comment, test, uncomment, comment the next one, test again, uncomment, until you find the redirect. Once you find it, you'll know what is triggering the loop, and can go from there. I'd check your stock levels. If you have zero stock items, then check admin and see if you're allowing checkout with zero stock. not the only possibility but seems most likely.
  5. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    If you installed it and it worked, and then you made other changes to your files, then I'm afraid, you probably aren't going to find much help. This is the reason it is so important to backup your files before you make any changes that are too difficult to reverse and also to backup when you make changes, test them, and it does work. Once you go losing and replacing things, there is no telling what went wrong. What you're talking about is a redirect loop. Your script is redirecting back and forth between two pages (it could even be going through 3 or 4 pages) until it times out and gives you the redirect error. Things that cause a redirect are empty shopping cart, zero order total, not selecting a payment method, or a shipping method, etc... In those cases, it'll send you back to the shopping cart or the checkout. I've only encountered the loop when using one page checkout, which (when certain conditions happen) redirects to checkout_shipping.php, which in turn redirects back to checkout.php. In my case it occurred because the cart contained only free items. I'm not sure what would cause it if you're using the regular checkout.
  6. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    There was no detailed installation instructions with the original contribution, and none were made for this modification. The easiest way to install is to use a file compare tool. I personally think that's easier/faster than following line by line install instructions.
  7. fulluvscents

    [Contribution] - USPS Methods

    5.2.2 contributed April 7, 2011 is the most recent full package contribution. Since that contribution, there was a change in signature confirmation prices which affected that portion of the module. A fix hasn't been contributed, although it was posted by someone a few posts back in this forum. Unfortunately, I haven't found a way around hardcoding the price into the mod, so until someone does, we'll have to fix price changes as they happen. I don't know of any reasons it won't work on php 4, but I'm running on 5.2.17. I haven't heard any specific cases of either success or problems on php4, but I do know that we had some issues in the beginning where things worked on some servers but not others. I think we've gotten past them all though. Please post if you run into any code compatibility issues though.
  8. fulluvscents

    [Contribution] - USPS Methods

    If you want to eliminate those transit response errors, then do this: Find around 650: if($transit) { $transitreq = 'USERID="' . $Authentication[0] . '">' . '<OriginZip>' . SHIPPING_ORIGIN_ZIP . '</OriginZip>' . '<DestinationZip>' . $dest_zip . '</DestinationZip>'; switch ($key) { case 'First-Class Mail': $transreq[$transid] = 'API=PriorityMail&XML=' . urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>'); break; case 'Media Mail': $transreq[$transid] = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>'); break; case 'Parcel Post': $transreq[$transid] = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>'); break; case 'Priority Commercial': $transreq[$transid] = 'API=PriorityMail&XML=' . urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>'); break; default: $transreq[$transid] = ''; break; } } Replace with: if($transit) { $transitreq = 'USERID="' . $Authentication[0] . '">' . '<OriginZip>' . SHIPPING_ORIGIN_ZIP . '</OriginZip>' . '<DestinationZip>' . $dest_zip . '</DestinationZip>'; switch ($key) { case 'First-Class Mail': $transreq[$transid] = 'API=PriorityMail&XML=' . urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>'); break; case 'Media Mail': $transreq[$transid] = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>'); break; case 'Parcel Post': $transreq[$transid] = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>'); break; case 'Priority Commercial': $transreq[$transid] = 'API=PriorityMail&XML=' . urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>'); break; case 'Express Commercial': $transreq[$transid] = 'API=ExpressMailCommitment&XML=' . urlencode( '<ExpressMailCommitmentRequest USERID="' . $Authentication[0] . '"><OriginZIP>' . SHIPPING_ORIGIN_ZIP . '</OriginZIP><DestinationZIP>' . $dest_zip . '</DestinationZIP><Date>' . date('d-M-Y') . '</Date></ExpressMailCommitmentRequest>'); break; default: $transreq[$transid] = 'API=StandardB&XML=' . urlencode( '<StandardBRequest ' . $transitreq . '</StandardBRequest>'); break; } } It won't make any difference to the function, but it will stop the script from sending empty requests and therefore will stop the receipt of response errors.
  9. fulluvscents

    [Contribution] - USPS Methods

    If you website works, and you're getting the quotes, and they are posting to the cart, then there is no need to use the debug or fix anything. We send two types of requests. The first is a "qoute request", which generally gives us the prices for shipping and add on services for each method. This request also gives us the shipping restrictions for international methods. In the case of Express mail, it also sends us a commitment date and drop off locations with cutoff times. We pick it apart and apply what we need to the checkout system. The second is a "transit request", which gives us a transit time for each method. Since USPS is sending Express mail commitments in the first response, we no longer need the commitments from the second response. But, the mod sends a transit request for every shipping method that you accept. In the case of Express mail the request is blank because we don't need the duplicate response. So, what you're seeing is the response to our blank express mail request. Although the script can be changed to skip over, or to change the request on a "per method" basis, it just adds more to a script that's already too long, and it isn't necessary for the functionality of the site.
  10. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    When you log back in as a customer, the voucher balance will appear below the shopping cart box (located in the columns). As a customer, if you purchase something, then when you get to checkout, there will be a check box giving you the option of using the voucher balance. You can also email the gift voucher to someone else as a gift to them and they can use it. The thought is that if you're purchasing a gift voucher, then you're purchasing it as a gift for someone else, although you can also use it yourself if you choose. It is a product for sale. After it is purchased, it becomes a store credit - no coupon code required. On what page are you having layout problems?
  11. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    Umm, yep. That would definitely cause problems. I replaced a couple files, but apparently put them in the zip file and not necessarily in the correct directories. I uploaded the fix, and you should be able to drop this package right over what you already have. Make sure you perform the sql query as well (found outside the catalog folder).
  12. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    I may misunderstand what you're saying, so correct me if I'm wrong. You're talking about dropping files over an existing site that has already been modified in one way or another? I installed this on a FRESH 2.3.1 site with NO modifications and it works. If you have a site that has been modified in any way, it is not recommended that you just drop the files (for any contribution). File drops are only recommended for clean installs, and usually, it's best to pick the most complicated contribution to drop, because after that, everything else needs to be manually done. And no, there's no way to customize a 'contribution' for a site that is already operating with modifications. Contributions are generic, and need to be customized on a site per site basis.
  13. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    New contribution can be found here: http://addons.oscommerce.com/info/8002
  14. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    code for working bm_shopping cart file: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_shopping_cart { var $code = 'bm_shopping_cart'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_shopping_cart() { $this->title = MODULE_BOXES_SHOPPING_CART_TITLE; $this->description = MODULE_BOXES_SHOPPING_CART_DESCRIPTION; if ( defined('MODULE_BOXES_SHOPPING_CART_STATUS') ) { $this->sort_order = MODULE_BOXES_SHOPPING_CART_SORT_ORDER; $this->enabled = (MODULE_BOXES_SHOPPING_CART_STATUS == 'True'); $this->group = ((MODULE_BOXES_SHOPPING_CART_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $customer_id, $cart, $new_products_id_in_cart, $currencies, $oscTemplate; // Start - CREDIT CLASS Gift Voucher Contribution $cart_contents_string ="<script language=\"javascript\">function couponpopupWindow(url) {window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150')}//--></script>"; // End - CREDIT CLASS Gift Voucher Contribution if ($cart->count_contents() > 0) { $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0" class="ui-widget-content infoBoxContents">'; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $cart_contents_string .= '<tr><td align="right" valign="top">'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { $cart_contents_string .= '<span class="newItemInCart">'; } $cart_contents_string .= $products[$i]['quantity'] . ' x '; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { $cart_contents_string .= '</span>'; } $cart_contents_string .= '</td><td valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { $cart_contents_string .= '<span class="newItemInCart">'; } $cart_contents_string .= $products[$i]['name']; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { $cart_contents_string .= '</span>'; } $cart_contents_string .= '</a></td></tr>'; if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) { tep_session_unregister('new_products_id_in_cart'); } } $cart_contents_string .= '<tr><td colspan="2" style="padding-top: 5px; padding-bottom: 2px;">' . tep_draw_separator() . '</td></tr>' . '<tr><td colspan="2" align="right">' . $currencies->format($cart->show_total()) . '</td></tr>' . '</table>'; } else { $cart_contents_string .= '<div class="ui-widget-content infoBoxContents">' . MODULE_BOXES_SHOPPING_CART_BOX_CART_EMPTY . '</div>'; } // Start - CREDIT CLASS Gift Voucher Contribution if (tep_session_is_registered('customer_id')) { $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . (int)$customer_id . "'"); $gv_result = tep_db_fetch_array($gv_query); if ($gv_result['amount'] > 0 ) { $cart_contents_string .= '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td align=center>' . VOUCHER_BALANCE . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($gv_result['amount']) . '</td></tr></table>'; $cart_contents_string .= '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td align=center><a href="'. tep_href_link(FILENAME_GV_SEND) . '">' . BOX_SEND_TO_FRIEND . '</a></td></tr></table>'; } } if (tep_session_is_registered('gv_id')) { $gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'"); $coupon = tep_db_fetch_array($gv_query); $cart_contents_string .= '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td align=center>' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</td></tr></table>'; } if (tep_session_is_registered('cc_id') && $cc_id) { $coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_id = '" . $cc_id . "'"); $coupon = tep_db_fetch_array($coupon_query); $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_id . "' and language_id = '" . $languages_id . "'"); $coupon_desc = tep_db_fetch_array($coupon_desc_query); $text_coupon_help = sprintf("%s",$coupon_desc['coupon_name']); $cart_contents_string .= '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td align=center>' . CART_COUPON . $text_coupon_help . '<br>' . '</td></tr></table>'; } // End - CREDIT CLASS Gift Voucher Contribution $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . '</a></div>' . ' ' . $cart_contents_string . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_SHOPPING_CART_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Shopping Cart Module', 'MODULE_BOXES_SHOPPING_CART_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_SHOPPING_CART_CONTENT_PLACEMENT', 'Right Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_SHOPPING_CART_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_SHOPPING_CART_STATUS', 'MODULE_BOXES_SHOPPING_CART_CONTENT_PLACEMENT', 'MODULE_BOXES_SHOPPING_CART_SORT_ORDER'); } } ?>
  15. fulluvscents

    Credit Class & Gift Vouchers (CCGV) for 2.3.1

    I have it installed in 2.3.1 here: http://www.chasethecup1.com This is NOT A TEST SITE. The contribution works perfectly. I will say that it was a straight 24 hours of code modifications, one page at a time, but well worth it. I do have a full file set that I could clean up and contribute, but I'm working on so many things, that it would be a while before I could get to it.
  16. fulluvscents

    [Contribution] - USPS Methods

    I'm an idiot. I need to allow myself to wake up before responding to things. You got that from the packet dump. I didn't read that. The requests are sent in urlencoded format, so what you see there is correct. What we receive back is decoded and doesn't include that garbage. You can get the responses emailed to you using the decode instructions - but those responses don't include what is sent - although they can with a bit of change to the script. If the ship date and your time matched, I don't understand at all why USPS would have a problem with the date. Not only that, but the date is optional and is ignored for everything except express mail and a select few commercial priority options. From the USPS Rate V4 guide: Scratches head and says WTF. So, did you remove that line, and did it work with the line removed?
  17. fulluvscents

    [Contribution] - USPS Methods

    It does not make sense at all and I have never had such a problem on my own site. But, I might have a few ideas. It could be that after a certain time in the evening, the post office is expecting the next day's date - although I've never seen that as a problem. If it is, then we need to add a day to the script. Or, it could be that you are sending a date that doesn't match the ship from zip code (At what time did you send the date (April 25) - before or after midnight?). Or, it could be the encoding that you mention. Where did you see the date in encoded format? I assume this is what you saw: %3CShipDate%3E25-Apr-2011%3C/ShipDate%3E But, that is not what should have been sent.
  18. fulluvscents

    [Contribution] - USPS Methods

    @ErikMM I'd say that's quite a little mess. I'm surprised you're still having problems. Sporadically not working sounds like a time setting. When doesn't it work? Only at night? If so, it's your time. If not, then..... idk. The new instructions have 2 different options for setting time, in case that's the problem. That PP button in the cart should be abolished and the person who put it there shot. It is absolutely asinine to send somebody to a payment screen BEFORE shipping has been calculated (shall I also mention how utterly distasteful that button is?). That is why it doesn't charge shipping. It is bypassing shipping and going straight to payment. I'm sure somebody has dealt with it and fixed it, but personally, I've never had it in my cart page, so I have no clue how to deal with it if someone wants to leave it there. Why remove the definitions but not remove the actual display from the shopping_cart.php file? You are still displaying it and the link still exists on that page. It's just invisible because the definitions have been removed. Find the link for that button and comment the section out. It'll lighten the page load a little. It seems really odd that one would have to go to cart before going to checkout in order for the mod to work, but you say that even then, it doesn't work all the time. Have you tested other shipping modules?
  19. fulluvscents

    [Contribution] - USPS Methods

    I think you need to do an sql cleanout of the usps configuration entries. I had the exact same thing happen to me last night while working on a payment mod and it was because I had double entries in the sql. Removed them and reinstalled and it worked again. It's probably the same problem with your shipping mod.
  20. fulluvscents

    [Contribution] - USPS Methods

    Yup, leaving old files in the modules directory will cause problems b/c admin is reading them as mods. Good to know you found the problem rather easily.
  21. fulluvscents

    [Contribution] - USPS Methods

    Ah, ok, so I misunderstood what was happening. Ummm, try removing the usps mod file and language file altogether (set them aside). Then go back in and click install modules. See if that makes a difference. Have to do process of elimination here, cause I'm not sure what it would be, since I've never run into that particular issue.
  22. fulluvscents

    [Contribution] - USPS Methods

    If you can't see the USPS module from admin, it's one of two things. You aren't clicking the "install modules" button in upper right hand corner which shows all available modules, or you didn't put the new USPS mod and language files in the correct places, overwriting/replacing the previous files.
  23. fulluvscents

    [Contribution] - USPS Methods

    The password is not used by USPS on the rate v4 server, so it was removed with the 5.XX versions. It's supposed to be 30 altogether when installed. One is the installed modules key, the remaining 29 are the USPS mod keys. If you didn't uninstall prior to installing the new mod, you might have the correct number, but the wrong entries, or more likely, you will have too many keys, with conflicting duplicates. Uninstall the mod from admin, delete all usps configuration entries in the db, and then reinstall the mod from admin. That is the easiest and fastest way to update the db and remove all conflicting entries. You don't want to compare the new entries to old entries, as this is counterproductive. They are not supposed to be the same. If that doesn't work, then please go back through the instructions and make sure nothing was missed. You are getting responses, but they aren't posting to the cart. That means that there is a problem with the service names, which usually stems from mismatched or conflicting db entries. But if your db is correct, then something was missed in the instructions. If you still can't find the problem, then PM me.
  24. fulluvscents

    [Contribution] - USPS Methods

    the tep_round_up function should be defined in: store/includes/functions/general.php NOT store/admin/includes/functions/general.php They are two different files with two different modifications needed. This is the biggest mix up that happens with this install and is the most likely culprit here.
×