Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

arkane8

Pioneers
  • Posts

    24
  • Joined

  • Last visited

Everything posted by arkane8

  1. I finally figured out how to do international shipping with this module. I know alot of people have been asking for this for the last 3 years, so here goes.... After about 7 hours of hacking, learning, and crunching, here is more or less the code you need to get it working. You will have to also update abbreviate.php in your catalog/admin/includes folder accordingly to abbreviate your countries into two letter formats for FedEx, and make sure your shipping addresses for international have the proper 'State/Province', or reprogram your OSC to allow blank 'State/Province' fields, or else FedEx might return an invalid state error. Here is the vital piece of code you'll need to insert into ship_fedex.php in catalog/admin. It should be inserted right after the $shipData array. $order_qty_query = tep_db_query("select * from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $order . "'"); $count = mysql_num_rows($order_qty_query); $i=1; if (tep_db_num_rows($order_qty_query)) { while (($order_qtys = tep_db_fetch_array($order_qty_query)) && ($i <= $count)) { $products_id = $order_qtys['products_id']; $products_weight_query = tep_db_query("select * from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'"); if (tep_db_num_rows($products_weight_query)) { $products_weights = tep_db_fetch_array($products_weight_query); $order_weight = $order_weight + ($order_qtys['products_quantity'] * ($products_weights['products_weight'])); } $shipData['79-' . $i] = $order_qtys['products_name']; // description of commodity $shipData['80-' . $i] = $senders_country; // country of manufacture of commodity $shipData['81-' . $i] = '<insert harmonized tariff code here>'; // HS tariff code (10 digits) of commodity $shipData['82-' . $i] = $order_qtys['products_quantity']; // quantity of the commodity $shipData['1407-' . $i] = number_format($products_weights['products_weight'], 1, '.', ''); $shipData['1408-' . $i] = $order_qtys['products_price'] . '00' ; // price per commodity $shipData['414-' . $i] = 'PCS'; // unit of measurement for how your commodities are counted $i++; } } You'll need to lookup the HS tariff code for your products (you should be able to google it) and replace it accordingly in the example above, and you'll need to designate how your items are measured. For the example above, I used 'PCS' for pieces. You might want to look up what yours is in the FedEx API manual. FYI, you can't just write any unit mesaurement, it has to be abbreviated in the FedEx API format. So this is the most vital section of code to allow you to be able to ship internationally. It will automatically count the number of line items in your order and send it over to be declared in FedEx international shipments. If anyone can build this code into the contrib and release it as an entire package (and if you can credit me) the entire community would be appreciated. I'd do it myself, but I've customized my Fedex contrib code so much that it's unusable by the general public. Good luck. If you still get any shipping errors from Fedex, just let me know -- I may have left out one or two API's that's somewhere else in my code.
  2. first, register.com hosting is a ripoff with insufficient services on the server to run more complicated scripts for fully dynamic sites (i mean, their domain registration is $35 a year....cmon!) anyway, register.com's hosting may not have curl installed fully you could be missing the ca-certificates package on your server, or its simply not provided by register.com's hosting u may try to ask register.com to add that to your server or activate it for u, but if ur on shared hosting, i dont see much luck (unless u have a dedicated server and u can do it urself, which may take a lot of more expertise as you will need to know how to access linux shell, or navigate through whm/cpanel) i highly recommend u try a better, less expensive host
  3. This would be a rather advanced upgrade to the system, although a much-needed one. But it is much more difficult than you think. FedEx requires a lot of parts when shipping international, where you have to list each item you are shipping and you have to enter the weight for each one, value, country of manufacture, lots of factors. Thus the osc contrib would have to recognize your product, how many of them, and all the attributes required by Fedex, pass them as a FedEx API code per attribute, then finally hand it over to FedEx for label processing. Because of the significant number of variables involved with shipping internationally, this can be very tedious to program. It is definitely possible though -- in fact, not even hard, just extremely tedious -- I just haven't had to the patience to do something this big.
  4. Yes! This would be very helpful and I'm in need of such a thing too as my store also ships ice and non-ice products. I think the way to address this is to use a universal contribution by defining ice or non-ice "tags" to each product. During checkout, if the system recognizes an ice "tagged" product in the shopping cart, it adds a surcharge to the order (or ideally, into the shipping costs to mask the "fee", but this would be difficult since everyone could have different shipping modules). But since sometimes the shipment will share contents in a single ice box but not increase the amount of ice, it wouldn't make sense to add a charge for every single ice product. So to increase flexibility, the admin should be able to define how much surcharge is added depending on different # of ice products in the cart. I'm sure many people such as the OP would appreciate such a contrib and find it very useful in the osc community. Many thanks to any a talented php'er out there who can do this!
  5. In regards to putting the 3rd party account # in setup, that's only assuming if the account will always be the same. If you want to use a different fedex account each time, that becomes a hassle. It's a rather easy piece of code to add/change to make it so you can enter third party #s per shipment (under Billing Recipient).
  6. 1. The contribution does not include this, but with some basic php programming, you can easily incorporate this. Make sure you find the right API code in the Fedex API guides. I have this added into my site. 2. The contribution, once again, does not include this -- but I'm sure you can change the appropriate php function to force it to $30 at all times.
  7. when configuring your fedex module in the admin section, leave the meter id blank, and let it generate a new one for you automatically
  8. hi imagixx ignore the line '$status_note = $track_Ret['1159-'.$i.'-1'];' Keep it as '$delivery_date = date("F j, Y", $delivery_date);' The sample I provided was a modified code for testing purposes but forgot to format it back when i posted it online. The point of the change was to indiciate you had to insert 'if ($signed_by)', not modify anything else.
×
×
  • Create New...