Jump to content

insaini

Members
  • Content count

    207
  • Joined

  • Last visited

Posts posted by insaini


  1. Hey everyone.. voting has opened up. If you have a moment I would definitely appreciate your votes! .. but take a look at the other projects if you like as well.. there are some good ones. But hey I wont mind if you dont vote for them either ;)

     

    Cheers


  2. Hi everyone,

     

    its been quite a long time since ive logged into the forums..

     

    I was an entrant in this years MintChipChallenge (http://www.mintchipchallenge.com) and I ended up creating a production ready payment module for this concept currency form.

     

    The module is available here..

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

     

    and a screencast to my presentation can be viewed here..

     

    while its not a live payment system.. I did enjoy writing it.. and wanted to give it back to the community. I hope they accept my submission!

     

    Cheers

     

    J


  3. Hi Guys.. its been a while since ive been here... I havent had time to work on this mod for quite some time..but my thanks go out to everyone who has provided support.. Yes the install file is missing some information when it comes to the cookie file.. it does need to be set correctly.. the mod has been locked down.. but im going to open it up right now.. so whoever knows whats missing and what needs to be updated in the install file.. if you have the time .. you are more than welcome to update the info and upload the changes..

     

    J


  4. I found this code in ajax.php and made the changes but it doesn't do anything to my state selector box.

     

    I really need a solution as I expect others may since users can register without properly choosing their state and then not get charged tax properly (i.e California). What a pain.

     

    This must be pretty simple to fix since the country box already displays "please select as default.

     

    Maybe Jesse will read this and give me an idea.

     

    Thanks for the suggestion and all your other help too Steve.

     

     

    Stevel's code will work for the ajax version except for a minor change..

     

    		$zones_array = array();	
    			$zones_array[] = array('id' => '', 'text' => 'Please select...');
    	$zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");

     

    if you dont see the difference.. the ..'array('id' => '',...);' stevel has a 0 for his code.. but for the ajax version should be an empty string ''

     

    i havent tried this but that should work.. its a one line addition to the functions/ajax.php file ..

     

    J


  5. Hey everyone, Id like to apologize for not providing support on the 1.5x versions.. They were modified by me but I just havent had time for the last few months to come in here help with with any problems.. A big thanks to Steve for helping as much as he does with your problems even though he doesnt use the version himself. If there are any big problems you can email me at webmaster AT insaini DOT com.

     

    Also for a bit of info..

     

    The AJAX Functions file (catalog/includes/functions/ajax.php) has a function

     

    function ajax_get_zones_html($country, $default_zone = '', $ajax_output = true) {

     

    where $country is a country id, $default_zone is the zone id or state (string) .. and ajax_output either echo's the output directly or does a return

     

    the defaults should be noted..

     

    at the top of for instance the create_account.php file

     

    you only need this

     

      require(DIR_WS_FUNCTIONS . 'ajax.php');
    
    if (isset($_POST['action']) && $_POST['action'] == 'getStates' && isset($_POST['country'])) {
    ajax_get_zones_html(tep_db_prepare_input($_POST['country']));
    } else {

     

    some of you may have

     

     require(DIR_WS_FUNCTIONS . 'ajax.php');
    
    if (isset($_POST['action']) && $_POST['action'] == 'getStates' && isset($_POST['country'])) {
    ajax_get_zones_html(tep_db_prepare_input($_POST['country']), '');
    } else {

     

    or

     

      require(DIR_WS_FUNCTIONS . 'ajax.php');
    
    if (isset($_POST['action']) && $_POST['action'] == 'getStates' && isset($_POST['country'])) {
    ajax_get_zones_html(tep_db_prepare_input($_POST['country']), true);
    } else {

     

    the latter will cause the '1' to show up.. (as true really represents a 1) .. so the default_zone is usually 1 .. best to remove both the extra parameters.. they are only needed on the first call (when the page loads) and have default values

     

    so you all should change the code to look like

     

      require(DIR_WS_FUNCTIONS . 'ajax.php');
    
    if (isset($_POST['action']) && $_POST['action'] == 'getStates' && isset($_POST['country'])) {
    ajax_get_zones_html(tep_db_prepare_input($_POST['country']));
    } else {

     

    at the top of those files which require it.. i believe (create_account.php, address_book_process.php, etc..)

     

    ALSO

     

    if you look below the code shows the 'echo ajax_get_zones_html(....)' ajax function call.. here you can specifiy the default zone you want to show up (false for ajax output is necessary as we are not returning the output and not echoing directly) ..

     

    further down you will see how the country selector calls the javascript getStates method..

     

    Your code should look like this.. if it doesnt.. you might be having problems.. overall the script works as it should.. however there is the one situation I think someone described.. that they want a list of the most common nations at the top .. this isnt in code.. best to see the ajax function and rework it as you need to..

     

      if (ACCOUNT_STATE == 'true') {
    ?>
    				<tr>
    				  <td class="main" width="25%"><?php echo ENTRY_STATE; ?></td>
    				  <td class="main"><div id="states">
    					  <?php
    			// +Country-State Selector
    			echo ajax_get_zones_html($country,'',false);
    			// -Country-State Selector
    			?>
    					</div></td>
    				</tr>
    				<?php
     }
    ?>
    				<tr>
    				  <td class="main" width="25%"><?php echo ENTRY_COUNTRY; ?></td>
    				  <?php // +Country-State Selector ?>
    				  <td class="main" colspan="3"><?php echo tep_get_country_list('country',$country,'class="formtextinput" onChange="getStates(this.value, \'states\');"') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
    				  <?php // -Country-State Selector ?>
    				</tr>


  6. Hi Jesse,

     

    I have been working on other priorities and finally got back to testing your contribution. I found an error in the way cookies were configured in my test site, it is fixed now and your contribution works great. Thanks for your support during my fumbling.

     

    I found a couple of small items missing in the INSTALL.htm as follows:

     

    Open admin/includes/classes/order.php +++++++++++++++++++++++++++++++++++++++++++++++++++
    
    Comment: 'shipping_method' is missing in INSTALL.htm
    
    Find:
    
    'orders_status' => $order['orders_status'],
    
    Add AFTER:
    
    'cp_tracking' => $order['cp_tracking'],
    'shipping_method' => $shipping_method, // missing in INSTALL.htm

     

    Open /admin/includes/languages/english.php +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    Comment: missing in INSTALL.htm
    
    Find:
    
    the last  define('IMAGE_XXXXXXXXXX', 'YYYYYYY');
    
    Add AFTER:
    
    define('IMAGE_ORDERS_SHIP', 'Create Canada Post Shipping Label');

     

    I have made changes to admin/orders.php by moving the shipping_label button on the Edit page next to the tracking_number input box. I also added tracking and label buttons. The 3 buttons will only display if the required information is in the order. I did this so that my wife wouldn't be confused when or when not to create a shipping label for her orders. If you are interested in the code please let me know and I will email it to you.

     

    Thanks again for the wonderful contribution and support.

     

    Regards,

    Byron

     

    Im happy it worked out for you.. you can if you like (as i dont have much time anymore) .. make the changes repackage and upload the changes.. or you can email me the changes and I can do it when I have some time..

     

    J


  7. I was able to fix the problem with Step 7. Now I have a new question.

     

    During the checkout process, I am getting an error (XML parsing error) under Canada Post shipping. Prior to fixing the above problem the Canada Post shipping showed properly during checkout. I haven't been able to figure out why its not working now.

     

     

    Hmm.. step 7 i believe is payment issue..

     

    did you add a credit card to your canadapost sellOnline account? you have to store the alias to that card which is usually the first 4 digits followed by 8 asterisks and then the final 4 digits.. and of course the cvv from the back must also be stored in your shipping module configuration.. im assuming you did this and the payment proceeded..

     

    but why you are getting an xml error.. that im not sure of.. do you know which line its happening on? sorry I dont check this that offen.. if you have a problem you can email directly at webmaster AT insaini DOT com.

     

    The total weight of the package is supposed to be retrieved from the stored shipping method chosen by the customer.. the value of the weight is stored and then parsed back by the shipping labels software when its time to print a label.. if it doesnt ship up thats because it wasnt stored correctly.. and if you are using my shipping module then it should be .. there might be another problem.. just have to debug it through..

     

    J


  8. Hi.

     

    I have set up the Canada Post and Automated label program. We are currently running in test mode with CP. It works fine with 1 or 2 items.. it fails with 3 items. Weight is not a problem. We have set box sizes and item dimensions. Both are in KG and CM.

     

    Any suggestions out there.

     

    D Clark

     

    What do you mean it fails.. what happens when you add more than 2 items?


  9. One more thing I'm not in the clear about. Is VentureOne necessary for the Labels module to function? I'm not sure if I understand correctly, but the guys I'm doing the cart for (while they do have Canada Post OBC account) say they are "LEVEL 2" or something and that VentureOne would be a downgrade for them. <_<

     

    Also, here's part 2 of my stupid question from before: what would the "correct path" for the cookies look like? "/var/www/virtual/mysite.com/cp_cookies"? And the folder needs to be 777, right?

     

    if /mysite.com is your root path.. (where say your index.php file is) then no..

     

    the setup would be

     

    /virtual/mysite.com

    /virtual/cp_cookies

     

    you can store the cp_cookies file anywhere.. as long as its a 777 access file.. you could also store it in your temp directory.. im not sure if it contains secure information.. it may .. but hopefully canadapost only keeps track of a session and doesnt store user credentials or anything else.. i cant say for sure..

     

     

    and for cURL.. you 7.15 may work.. im using 7.18 and I know it doesnt work on 7.12 so not sure what version is required.. but i can tell you that OpenSSL and libSSH2 are mandatory libraries.. i see you have OpenSSL.. but you dont have libssh2 .. that is definitely required and you will have to install libssh2 and then rebuild php with libssh2

     

    J


  10. As far as I can see, insani hasn't added shipping with Canada Post contracts yet. But it requires very minor modifications, just check the ship_canadapost.php file of the original contribution and look for all blocks of code containing "$cp_contract".

     

    I believe natriums original release had code for contracts.. I removed this actually I didnt expect anyone to need it.. clearly im mistaken ;) .. however I dont really have time to go in to look.. but the code is fairly easy to modify.. take a look at ship_canadapost_ajax.php (in my release) look for where payment processing is done.. you can add in the necessary contracts code stuff there..

     

    you do not need to enter your credit card alias in the shipping module if you will use contract setup.. the contract code should also probably be added to the shipping module configuration so it can be retrieved from there.... ive basically tightly integrated the shipping module and shipping labels packages.. although the shipping module can function without the labels package.. it doesnt work the other way around.. for the labels package to work you need this specific shipping module..

     

    J


  11. Hi,

     

    I added/updated the "Canada Post Shipping Module v1.1" (http://addons.oscommerce.com/info/391) to a clients cart in December 2007 and have not needed to visit here since.

     

    The client has just requested I "add/include" GST and Fuel Surcharges to the shipping charges displayed to the customer so I am here in the forum to see if anyone else has encountered/fixed this issue.

     

    So now I see there is a "Canada Post Automated Labels 2.2.1 AND Canada Post Shipping Module 4.1" (http://addons.oscommerce.com/info/5842) listed that I never noticed before.

     

    Can somebody please advise -

     

    1. Is the Canada Post Automated Labels 2.2.1 AND Canada Post Shipping Module 4.1 an UPDATE for v1.1?

    2. OR Is it a total REPLACEMENT for v1.1?

    3. Does it address the GST and Fuel surcharge issue?

    4. Will I have to UNINSTALL v1.1 to use this "new" version?

     

    Any and all comments/advise is welcome, Thanks

     

    The Automated Labeles and Shipping Module combined package is basically the older 3.1 shipping module with dimensions support that has been enhanced to use the standard osc unit configuration as well as modified for integration with automated labels. I enhanced the Automated Labels code and added integration with the shipping module.. it does require some specific cURL and SSL libraries but this package is only required if you are looking at creating labels via your admin panel rather than directly with canada post web software.

     

    GST depends on your tax setup.. as long as your taxes are configured properly in osC then your shipping calculations will also calculate GST/HST/PST correctly as well. Fuel surcharge is taken care of via your sellOnline account located on Canada Post.

     

    J


  12. Thanks for getting back to me Jesse.

     

    When Hostgator originally compiled libcurl for me they retrograded our PHP version back to 4. Yesterday I requested them to reestablish PHP 5.2.6. So that happened and the following is our libcurl compilation:

     

    libcurl/7.18.2 OpenSSL/0.9.7a zlib/1.2.3 libidn/0.5.6 libssh2/0.18

     

    I tried another test and I am having less success now because the login within Step 2 is failing with:

     

    https://sso-cal.canadapost-postescanada.ca/.../login/redirect

     

    HTTP/1.1 500 Internal Server Error

    Date: Wed, 25 Jun 2008 16:20:29 GMT

    Content-Length: 82

    Expires: Thu, 01 Jan 1970 00:00:00 GMT

    Set-Cookie: JSESSIONID=84hjLvwNGPvGMmLygvpglwml1jrfn4ZJyWn2hBJTnykjKtqWsyzW!-1464866007; path=/

    Cache-Control: no-cache, no-store

     

    <html><body>

    <form name=Login action="/sso/login.jsp?~language=EN" method=POST>

     

    So I am checking through everything to see if I created my own problem. Do you have any ideas?

     

    Regards,

    Byron

     

    Hmm.. i have to make a couple shipments today.. i havent since last week.. they may have changed something so ill check and see my side..


  13. Hello and thanks for this contrib. I only hope I manage to get it working, since I'm quite the noob.

    Now I kindly ask you to excuse my ignorance and answer a few potentially stupid question that I have.

     

    First, I don't exactly understand the cookie part:

    define (COOKIE_FILE, '/home/user/cookies/cp_cookies');
    define (USER_AGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6');

    What is "/home/user"? Do I have to set any specific permission for the cp_cookies folder?

     

    Also - is the Automated Labels part supposed the show up somewhere in the admin panel? I can't seem to find it.

     

    Yes.. I think I do mention that the cookie file has to be set correctly in the instructions.. if I dont then I do apologize .. you must create a directory just outside of your public www root folder called cp_cookies or whaever you like.. and place the correct path at this config setting.. its needed to store the cookie file between requests

     

    THe automated labels is loaded via a link on your order page.. so pull up the details of an order.. and the button should be at the bottom of the page SHIP

     

    For configuration of Automated Labels.. thats done via the shipping module


  14. 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


  15. Hello and thanks for that great contrib.

     

    I have a problem when I submit the label in the admin. I receive this message :

     

    2008-06-19_130431.jpg

     

    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...


  16. Does your server have port 30000 open for the module to use ? Does your products have a weight associated with it ? Do you have a Venture One account with Canada Post ? Canada Post offers email and phone support for the configuration of ecommerce modules.

     

     

    All these things above are required and you should check to make sure everything has also been properly configured in the modules administration section in admin..


  17. 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


  18. 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?


  19. 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


  20. 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...


  21. 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..

×