Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

chrisjclay

Archived
  • Posts

    10
  • Joined

  • Last visited

Posts posted by chrisjclay

  1. chris.. you would have to place the call to this file in step one of the ajax file.. ship_canadapost_ajax.php load that up.. look at the first step (initialization) .. it has to go before anything else.. However. I do see a problem because the above url is sellonline (which is fine for shipping quotes) but the urls required for label generation are different..

     

    To be honest I don't know how to place the call to my friend's external server. I see case1 in ship_canadapost_ajax.php but I'm not sure how to proceed from there :( I know some basic php but my skills are limited and this is over my head... I'm not sure which line of code I should be pasting the link to callcp.php. Right above case one I see several URLS - am I meant to replace one of them? i.e. Should I replace the url in the line that reads "define ('ORIGINAL REFERRER'...)" ? ... or the one in that reads "define (SSO, 'https://....')" ... or should I be looking at a different line of code?

     

    however for automated labels.. the proxy settings should have been enough.. one last thing.. when and what errors are you getting? are you getting errors from the shipping module? or the automated labels software?

     

    The error appears whenever I try making a test purchase. Each time I get to the "Delivery information" step during Checkout, I get this error:

     

    Cannot reach Canada Post Server. You may refresh this page (Press F5 on your keyboard) to try again.

    If you prefer to use canadapost as your shipping method, please contact the The Tale of the Whale via Email.

     

    I've actually never tried generating a label before - I didn't think I'd be able to until I successfully placed a test order. I just tried now for the first time and received this error:

     

    Progress Indicator

    Step 1. Initialized.

    Step 2. Error: Failed check in /home/content/t/a/l/taleofthewhale/html/store/catalog/admin/includes/languages/english/ship_canadapost.php at line 9. This most likely means that Canada Post has changed their user interface. You need to update your Canada Post Automatic Shipping Labels module.

     

    At any rate, I'm not too worried about the labels - it would be a nice bonus if they worked, but by far the most important thing right now is getting shipping prices from Canada Post during the checkout process.

     

    I thought I'd try switching to GatorHost to see if I have better luck, but they seem to have placed my order on hold because I used Paypal for my payment and am outside the US (I'm in Canada). Anyway, if you have any more suggestions I'd appreciate them and would try them... Otherwise I'll get my order straightened out at GatorHost and try setting up the site there.

     

    Regards,

    Chris

  2. Chris, you can add those lines to the ship_canadapost.php function file.. located in /admin/includes/functions .. its the first function at the top of the file...

     

    Argh... Still doesn't work. I have one last idea though... "darkknightenterprises" posted another fix here:

     

    http://addons.oscommerce.com/info/391 ... called "A complete work around if you can not get your hosting provider to open port 30000!!!"

     

    He suggests uploading a file, cpcall.php, to a friend's server which then "makes the call to the canadapost server from there and the cURL call from the canadapost.php file calls to it."

     

    I uploaded the included test file to a friend's server and it successfully connected to Canada Post :) So far so good... Now I'm just not sure how to modify the curl call on my own osCommerce site so it calls to the cpcall.php file on my friend's site. Here are the contents of the cpcall.php file that is now sitting on my friend's hosting account (not at GoDaddy!):

     

    <?php
    function sendToHost($data)
    {
    	set_time_limit(5);
    	$ch = curl_init("sellonline.canadapost.ca:30000");
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    	curl_setopt($ch, CURLOPT_URL, "sellonline.canadapost.ca:30000");
    	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    	curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 2678400);
    	curl_setopt( $ch, CURLOPT_HEADER, 0 );
    	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    	curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
    	$buf = "";
    	$buf = curl_exec($ch);
    	curl_close( $ch );
    	if($buf == "")
    	{
    		$buf = "<?xml version=\"1.0\" ?><eparcel><error><statusMessage>Cannot reach Canada Post Server. ".
    			   "You may refresh this page (Press F5) to try again.</statusMessage></error></eparcel>"; 
    	}
    return $buf;
    }
    
    $data = $_REQUEST['XMLRequest'];
    $response = sendToHost($strXML);
    echo $response;
    ?>

     

    I assume this is meant to take the place of the function called "function cp_setup" in the file admin>includes>functions>ship_canadapost.php. Any ideas on what I need to do to force the Canada Post module to use the function "sendToHost" that's sitting on my friend's server (in the cpcall.php file) instead of the one found in ship_canadapost.php? If I can figure that out, I think everything else will fall into place. I highlighted in red the part of darkknightenterprise's instructions that don't make sense to me:

     

    IF you have someone that has a web server online or an account with a web hosting company that has port 30000 open, just upload the test.php to that server and open it in your browser.

     

    If port 30000 is open, you will see an XML response from the Canadapost server. If you don't, then you know that port 30000 is NOT open. IF it is then all you have to do is upload the cpcall.php to a directory on that server then put the URL to the cpcall.php in place of "http://www.yourserver.com/cpcall.php" and your CPC username in place of "CPC_DEMO_XML" in the canadapost.php file that upload it to your osCommerce store in catalog/includes/modules/shipping/canadapost.php and everything should be working perfectly.

     

    I know that it is working because this is how I had to do it to get it to work and I am using this technique now. Good luck getting everything working for your store and may you prosper well in your endevors.

     

    Chris

  3. hmm.. well that does say libcurl 7.10 .. which isnt libcurl 7.16 .. but give it a go and see how it works out..

     

    Hey there,

     

    I did a fresh install of the module and it's still not working on GoDaddy, but it turns out I'll need to add a few lines of code re: a proxy server to get it to work:

     

    On our shared hosting, any CURL applications that make secure HTTP connections (HTTPS over port 443) need to pass through a proxy server. The address for this proxy server is proxy.shr.secureserver.net and connections must specify the use of port 3128. The code below already includes this information.

     

    GoDaddy posted some sample code here:

     

    http://help.godaddy.com/article/289

     

    Similarly, someone in an older Canada Post mod used the proxy server to get things working on GoDaddy:

     

    I couldn't get this thing to work because I forgot to check and make sure that the proxy call in cURL was in the code. Added the needed lines and got it working.

     

    He posted the fix here...

     

    http://www.oscommerce.com/community/contributions,391

     

    which seems to add an extra few lines of code to the mod:

     

    //Next 2 lines for GoDaddy.com hosting accounts.
    curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
    curl_setopt($ch, CURLOPT_PROXY, "http://proxy.shr.secureserver.net:3128");

     

    Similarly, someone posted a similar fix for the Fed Ex module:

     

    One of our clients was facing issue with the FedEx Module in osCommerce.

     

    The site was running on Godaddy Hosting.

     

    We disabled Fedex. Then in Fedex1.php, we changed the part that references godaddy to:

     

    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);

    curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);

    curl_setopt($ch, CURLOPT_PROXY, “http://proxy.shr.secureserver.net:3128″);

     

    Then enable the module again, and did a rate request, and that’s it.

     

    (from http://oscommerceindia.com/help/2008/01/17...odaddy-hosting/ )

     

    All of this is a bit over my head - I'm hoping someone could give me a hint as to where I should insert these lines of code. The only "curl_setopt" reference I could find was in the ship_canadapost_ajax.php file (under Case 8, around line 481) but when I inserted these lines immediately after it, it didn't seem to do anything. I keep getting the same error, "Cannot reach Canada Post Server. You may refresh this page..."

     

    Please help! I need to get our site online and this module is the last barrier before we can launch it. Thanks again insaini for all your hard work and suggestions...

     

    Chris

  4. I'm wondering if anyone has been able to get this working on a GoDaddy shared hosting account yet? According to the installation instructions,

     

    libcurl-7.12 does not work and is what comes with GoDaddy Virtual Dedicated Servers. You will need to replace with a higher version (other versions not tested) in order for this contribution to work)

     

    I've tried contacting GoDaddy to see how I can replace libcurl-7.12 with 7.18 but haven't heard back yet... Any help would be most appreciated!

     

    Chris

     

    P.S. Thanks for all your hard work :)

  5. Hey everyone,

     

    I installed the "PayPal Website Payments Standard" Add-on that's available here:

     

    http://addons.oscommerce.com/info/5655

     

    I'm testing it in Paypal's Sandbox and so far everything seems perfect except the shipping address doesn't seem to be transferred from osCommerce to Paypal. When I view the test orders, they all say:

     

     

    Shipping Address: No Address Provided

    Payments without a shipping address are not covered by PayPal's seller protection policies and programs.

     

    Obviously we want to make sure our orders are covered by the seller protection program. Does anyone know how to ensure this add-on sends the shipping address to Paypal along with the rest of the order details?

     

    Thanks in advance!

    Chris Clay

×
×
  • Create New...