insaini Posted May 26, 2008 Author Share Posted May 26, 2008 The fine tooth comb of agony has revealed this:There is no length, width, height or ready to ship column in the DB Products Table.... .... .... Okay so I went back and did the sql command again... ta-da! Okay so that seemed to fix the errors in all 3 places... BUT now in the front end, My subtotal does not tally up on the first shopping_cart.php page (Or Cart Contents from top right nav). Very odd. No displayed errors. And when you walk through the rest of the checkout process to the checkout_confirmation.php page, it correctly displays the subtotal and other totals. Any ideas? hmm you are talking about the cart contents page.. seems as though you may need to check out where that total is being totaled in shopping_cart.php .. if its adding up correctly at the confirmation then it seems as though the problem is specific to shopping_cart.php .. do you have any other mods done to this? J Quote Link to comment Share on other sites More sharing options...
roback Posted May 26, 2008 Share Posted May 26, 2008 hmm you are talking about the cart contents page.. seems as though you may need to check out where that total is being totaled in shopping_cart.php .. if its adding up correctly at the confirmation then it seems as though the problem is specific to shopping_cart.php .. do you have any other mods done to this? J No other mod that effects that page. Any idea on what line approximately the total is figured out in shopping_cart.php ?? Quote Link to comment Share on other sites More sharing options...
KKT Posted May 26, 2008 Share Posted May 26, 2008 Hey Insaini, I got all registered with SellOnline and then had to request that they add the "Add/Modify/Delete Empty Space Items" module to my account so that it will calculate that multiple items can fit in one box. My sellonline info is all filled out and it's still not wanting to ship things in one box. I have the weight and dimensions of my products entered in the OsCommerce admin as well. Is that wrong, should that be deleted so it's not repeated in SellOnline? Thanks! Quote Link to comment Share on other sites More sharing options...
KKT Posted May 26, 2008 Share Posted May 26, 2008 Hey, nevermind, I realized that i had to go into admin > modules > shipping and edit out the demo CPC that was in there and put in the Customer ID, LOGIN AND PASS that they assigned me when i emailed them. Quote Link to comment Share on other sites More sharing options...
roback Posted May 26, 2008 Share Posted May 26, 2008 hmm you are talking about the cart contents page.. seems as though you may need to check out where that total is being totaled in shopping_cart.php .. if its adding up correctly at the confirmation then it seems as though the problem is specific to shopping_cart.php .. do you have any other mods done to this? Hey I tried reverting shopping_cart.php back to the original file and it again displays the correct price. Now I also proceeded through the checkout and it appeared to work just the same with the default shopping_cart.php. Now a WinDiff on the two version shows the only significant difference is that p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship[\code] are added to two of the queries (approx lines 259 and 319) and [code]'length' => $products['products_length'],'width' => $products['products_width'],'height' => $products['products_height'],'ready_to_ship' => $products['products_ready_to_ship'],[\code]added to the product array (approx line 336). I am not great at picking apart the code to determine where things go and how they function so can you explain the need for these in the shopping_cart.php thanks appreciated. Quote Link to comment Share on other sites More sharing options...
newbie1233 Posted May 27, 2008 Share Posted May 27, 2008 Hi, I am getting a bunch of errors when I hit submit for automatic labels. Here is what I get: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/user/cookies/cp_cookies) is not within the allowed path(s): (/home/esteemforthehome.ca/httpdocs:/tmp) in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 152 Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File(/home/user/cookies/cp_cookies) is not within the allowed path(s): (/home/esteemforthehome.ca/httpdocs:/tmp) in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 10 Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 1. Initialized. Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File(/home/user/cookies/cp_cookies) is not within the allowed path(s): (/home/esteemforthehome.ca/httpdocs:/tmp) in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 7 Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File(/home/user/cookies/cp_cookies) is not within the allowed path(s): (/home/esteemforthehome.ca/httpdocs:/tmp) in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 10 Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 2. Error: Failed check in /home/esteemforthehome.ca/httpdocs/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. Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/user/cookies/cp_cookies) is not within the allowed path(s): (/home/esteemforthehome.ca/httpdocs:/tmp) in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 152 I am pretty sure I need to get my server to remove the restrictions on this file path but while I'm waiting for them to get back to me, is there any other solution to this problem? Thanks Quote Link to comment Share on other sites More sharing options...
newbie1233 Posted May 27, 2008 Share Posted May 27, 2008 Anyone? Any help would be much appreciated as I am so close to being able to launch this site. Thanks in advance Quote Link to comment Share on other sites More sharing options...
roback Posted May 28, 2008 Share Posted May 28, 2008 Probably not a surprising error to anyone, but while trying to use the shipping module in the admin, I am getting the following errors: Step 2. Error: Failed check in /home/suchgirl/public_html/shop/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. Now after reviewing the previous threads, I noticed the cURL and Port issues so I check with my host (Hostgator) and this was their reply: Regarding cURL: CURL Information => libcurl/7.18.1 OpenSSL/0.9.8g zlib/1.2.1.2 libidn/0.5.6 Regarding Port 30000: The port was not open on the server but I have opened it up. Now the one thing I noted from the posts was: I believe curl also has to be built with libssh cURL Information libcurl/7.18.0 OpenSSL/0.9.7a zlib/1.2.1.2 libssh2/0.18 Could this be what is causing the problems? Any help would be appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
cwm3 Posted May 30, 2008 Share Posted May 30, 2008 Quick 2 questions. I noticed that the Expedited and Regular shipping prices are the same. Priority is of course more expensive. But why the 2 same prices? Can this be different? Also, seems like everything is installed correctly, just wondering why my process is stopped at step 2. Logging into CP's system? What should I double check here? Quote Link to comment Share on other sites More sharing options...
newbie1233 Posted June 2, 2008 Share Posted June 2, 2008 Anyone? Any help would be much appreciated as I am so close to being able to launch this site. Thanks in advance Ok, I figured out the cookie problem but I still get these errors: Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 1. Initialized. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 2. Logged In. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 3. Started shipping application. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 4. Error: Failed check in /home/esteemforthehome.ca/httpdocs/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. So that I don't look like I'm talking to myself on this forum any response would be appreciated. Thank you Quote Link to comment Share on other sites More sharing options...
insaini Posted June 2, 2008 Author Share Posted June 2, 2008 Ok, I figured out the cookie problem but I still get these errors: Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 1. Initialized. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 2. Logged In. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 3. Started shipping application. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/esteemforthehome.ca/httpdocs/catalog/admin/includes/functions/ship_canadapost.php on line 13 Step 4. Error: Failed check in /home/esteemforthehome.ca/httpdocs/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. So that I don't look like I'm talking to myself on this forum any response would be appreciated. Thank you Sorry guys been a little busy.. ill be on later tonight to answer some messages.. but quickely.. Yes curl MUST! be built with OpenSSL AND! libssh2 .. otherwise you will not pass step 2 for authentication on canadapost servers. newbie.. seems your curl is running in safe mode.. dont know why but maybe its a host issue.. J Quote Link to comment Share on other sites More sharing options...
insaini Posted June 4, 2008 Author Share Posted June 4, 2008 Hey I tried reverting shopping_cart.php back to the original file and it again displays the correct price. Now I also proceeded through the checkout and it appeared to work just the same with the default shopping_cart.php. Now a WinDiff on the two version shows the only significant difference is that p.products_weight, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship[\code] are added to two of the queries (approx lines 259 and 319) and [code]'length' => $products['products_length'],'width' => $products['products_width'],'height' => $products['products_height'],'ready_to_ship' => $products['products_ready_to_ship'],[\code]added to the product array (approx line 336). I am not great at picking apart the code to determine where things go and how they function so can you explain the need for these in the shopping_cart.php thanks appreciated. You definitely need this code as it deals with the product dimensions.. they are needed in the queries... however.. these added fields to the queries would in no way affect the pricing.. Quote Link to comment Share on other sites More sharing options...
insaini Posted June 4, 2008 Author Share Posted June 4, 2008 Quick 2 questions. I noticed that the Expedited and Regular shipping prices are the same. Priority is of course more expensive. But why the 2 same prices? Can this be different? Also, seems like everything is installed correctly, just wondering why my process is stopped at step 2. Logging into CP's system? What should I double check here? THese are the prices that are being returned by Canada Post.. sometimes they are the same.. but for the customer.. to them its a no brainer to choose Expedited.. you can if you like.. disable Regular shipping prices by logging into your sellonline account and removing that option.. Number 2.. you most definitely need to have your curl built with openssl AND! libssh2 .. this is an absolute must otherwise you will not pass step 2.. step 2 is used for SSL authentication on Canada Post servers... Quote Link to comment Share on other sites More sharing options...
Panda_X Posted June 4, 2008 Share Posted June 4, 2008 Number 2.. you most definitely need to have your curl built with openssl AND! libssh2 .. this is an absolute must otherwise you will not pass step 2.. step 2 is used for SSL authentication on Canada Post servers... Hi Guys, I'm in the same boat as Ivan and others with cURL. Everything is good except when i go to print labels, I can't get passed step 2. I have checked and my cURL installation is libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13 so im guessing im missing the libssh2. Now how do I fix that? I have been looking all over the net and I can't find any tutorials or how-tos. I've asked my host they said you cant simply add libssh2 and that they can't solve these kinds of problems for me. Can anyone help with this or point me in the right direction? Do I need to rebuild cURL? THANKS!! :) Quote Link to comment Share on other sites More sharing options...
insaini Posted June 5, 2008 Author Share Posted June 5, 2008 Hi Guys, I'm in the same boat as Ivan and others with cURL. Everything is good except when i go to print labels, I can't get passed step 2. I have checked and my cURL installation is libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13 so im guessing im missing the libssh2. Now how do I fix that? I have been looking all over the net and I can't find any tutorials or how-tos. I've asked my host they said you cant simply add libssh2 and that they can't solve these kinds of problems for me. Can anyone help with this or point me in the right direction? Do I need to rebuild cURL? THANKS!! :) There is no adding libssh2 .. curl has to be recompiled with libssh2 .. only your host can do that for you.. if they are unwilling.. I would suggest finding another host.. unfortunately .. for SSL authentication.. libssh2 is mandatory.. no way around it apparently.. Jesse Quote Link to comment Share on other sites More sharing options...
Panda_X Posted June 5, 2008 Share Posted June 5, 2008 Thanks Jesse! Talking to my host now.. crossing my fingers. Quote Link to comment Share on other sites More sharing options...
roback Posted June 5, 2008 Share Posted June 5, 2008 There is no adding libssh2 .. curl has to be recompiled with libssh2 .. only your host can do that for you.. if they are unwilling.. I would suggest finding another host.. unfortunately .. for SSL authentication.. libssh2 is mandatory.. no way around it apparently.. Jesse So is there any other way around this libssh2? My host will only provide that if upgraded to SSL hosting plan. Thought there was someone who mentioned cURL redirect or something for one file on a secure server? Any enlightement on this approach? Quote Link to comment Share on other sites More sharing options...
insaini Posted June 5, 2008 Author Share Posted June 5, 2008 So is there any other way around this libssh2? My host will only provide that if upgraded to SSL hosting plan. Thought there was someone who mentioned cURL redirect or something for one file on a secure server? Any enlightement on this approach? THe redirect will require a rewrite of the code somewhat to be secure.. if you use a redirect to someone else's server where curl has libssh2 built.. then your redirect will be unsecured.. you will be transmitting your login / pass over http to the redirecting server before it is transmitted over https to canadapost.. if someone intercepts that transmission.. they will have the username and password for your canadapost account.. gaining access to your credit card information.. another question is.. why dont you have an SSL hosting plan? are you running oscommerce without ssl? Quote Link to comment Share on other sites More sharing options...
roback Posted June 6, 2008 Share Posted June 6, 2008 another question is.. why dont you have an SSL hosting plan? are you running oscommerce without ssl? Running payments through PayPal Standard so no secure info is passed to/from or stored on our site/server. In which case you can bypass the SSL. correct? Quote Link to comment Share on other sites More sharing options...
insaini Posted June 7, 2008 Author Share Posted June 7, 2008 Running payments through PayPal Standard so no secure info is passed to/from or stored on our site/server. In which case you can bypass the SSL. correct? Ahh ok.. makes sense.. but then i guess thats where the tradeoff is.. to make use of automated labels.. you are passing security information to canadapost servers where you have your creditcard information stored.. but even still.. the problem is when you login into canadapost shipping label application.. its done over https .. not http .. it wont work with http calls.. only https .. so you will definitely need SSL. How much difference is there in an SSL hosting plan.. thats kinda weird.. who are you hosting with? .. im with godaddy but an SSL certificate costs $20 and you can use with i think any plan.. although im on a virtual dedicated server.. not a shared plan and no one recommends their shared plans.. J Quote Link to comment Share on other sites More sharing options...
royfra Posted June 19, 2008 Share Posted June 19, 2008 Hello and thanks for that great contrib. I have a problem when I submit the label in the admin. I receive this message : Also, does the shipping method should not be the one that the customer choose in his checkout process? thanks to all Quote Link to comment Share on other sites More sharing options...
bjcworks Posted June 21, 2008 Share Posted June 21, 2008 Thanks for great contribution but I have run into a small problem. I have reviewed the forum posts but haven't found a similar issue noted anywhere. I am able to login to CP, i.e. I have received the "Step 2. Logged In." message. When the program moves onto Step 3, I receive a 404 Error, URI not found. I have turned on debug and the URL that was submitted is as follows: https://sso-cal.canadapost-postescanada.ca HTTP/1.1 404 Not Found Date: Fri, 20 Jun 2008 21:59:17 GMT Content-Length: 1214 Content-Type: text/html Connection: close ........ I didn't include the text between .............. </FONT><P><FONT FACE="Courier New">The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.</p><p>If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.</FONT></P> I reviewed the Case 3 code in ship_canadapost_ajax.php: case 3: // curl init $ch = cp_setup(false); $response = cp_submit_page($ch, $response, SSO); $response = cp_submit_page($ch, $response); curl_close($ch); I am wondering about the 2nd arg, "$response" in the 1st cp_submit_page call, how is this arg initialized because that arg is used to expand the URL? I will dig into this in more detail but I am hoping you can give me guidance in what to research. Regards Quote Link to comment Share on other sites More sharing options...
insaini Posted June 22, 2008 Author Share Posted June 22, 2008 Hello and thanks for that great contrib. I have a problem when I submit the label in the admin. I receive this message : Also, does the shipping method should not be the one that the customer choose in his checkout process? thanks to all Roy.. you will have to convert the English language files for ship_canadapost.php to french.. since I didnt provide the french language file.. its unable to locate it and thats why you are getting those errors... Quote Link to comment Share on other sites More sharing options...
insaini Posted June 22, 2008 Author Share Posted June 22, 2008 Thanks for great contribution but I have run into a small problem. I have reviewed the forum posts but haven't found a similar issue noted anywhere. I am able to login to CP, i.e. I have received the "Step 2. Logged In." message. When the program moves onto Step 3, I receive a 404 Error, URI not found. I have turned on debug and the URL that was submitted is as follows: https://sso-cal.canadapost-postescanada.ca HTTP/1.1 404 Not Found Date: Fri, 20 Jun 2008 21:59:17 GMT Content-Length: 1214 Content-Type: text/html Connection: close ........ I didn't include the text between .............. </FONT><P><FONT FACE="Courier New">The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.</p><p>If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.</FONT></P> I reviewed the Case 3 code in ship_canadapost_ajax.php: case 3: // curl init $ch = cp_setup(false); $response = cp_submit_page($ch, $response, SSO); $response = cp_submit_page($ch, $response); curl_close($ch); I am wondering about the 2nd arg, "$response" in the 1st cp_submit_page call, how is this arg initialized because that arg is used to expand the URL? I will dig into this in more detail but I am hoping you can give me guidance in what to research. Regards Byron.. that is very interesting.. today is sunday and i created two labels just today that went through just fine.. why you are getting that error doesnt make sense to me.. but to begin with I need to verify your curl build .. can you go to admin->tools->server info and look up the curl build .. and post how its been built.. as for the $response variable.. this is maintained in the session between requests.. you can see where this is happening near the top of the file.. J Quote Link to comment Share on other sites More sharing options...
Motley_17 Posted June 23, 2008 Share Posted June 23, 2008 I get all the options: Priority Courier, Expedited, and Regular, and prices etc., but when no matter wich one is clicked on it defaults to the regual shipping. There is also only blue highlighted lines. Is there a way of inserting radio buttons? Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.