TB Posted August 9, 2003 Share Posted August 9, 2003 NZ Bank Transfer module for those New Zealand osCommerce users who want to offer bank transfer as a payment method. This module displays: Account Name, Account Number and Bank Name. http://www.oscommerce.com/community/contributions,1441 Thanks to: Phil Townsend for the original UK Bank Transfer module. Steve Kemp for modifying the UK module to suit the Australian osCommerce sites, as well as adding administration functionality. This NZ version is based on the Australian version by Steve Kemp. Quote "The price of success is perseverance. The price of failure comes much cheaper." Link to comment Share on other sites More sharing options...
RobAnderson Posted August 25, 2003 Share Posted August 25, 2003 Sounds like a useful contribution. I've installed it and configured it in the admin section (2.2MS2) but when I test it in Catalog no extra payment option appears at the Payment Information stage. The customer I am using has New Zealand as the countryand I have a New Zealand Zone assigned in the NZ Bank Transfer details. (The zone works OK with my NZ GST option). Any ideas why this payment option does not appear? Any help greatly appreciated :) Rob P.S. I am a noobie at oscommerce, so hope I'm not forgetting something really stupid. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 29, 2003 Share Posted August 29, 2003 Hi there I too also run a NZ oscommerce site and am using this contrib as well with the same prob as rob anderson. same version of oscommerce. any ideas we can try? Thanx heaps Quote Link to comment Share on other sites More sharing options...
azer Posted August 29, 2003 Share Posted August 29, 2003 i dont want to bother you but can someone tell me if there are other contribtuion specially wrote for new zealand , like shipping or payement ones ? thanks in advance :wink: Quote MS2 Link to comment Share on other sites More sharing options...
TB Posted August 29, 2003 Author Share Posted August 29, 2003 I've just tested it from the download again, and it works perfect. Remember to change the default 'Sort Order' to 1 or higher, if it remains on 0 it will not display. Also, I'm not sure if there are any other contributions created specifically for New Zealand, this one is a modified version of Steve Kemps Australian Bank Transfer. I think you'll find that most Australian modules will satisfy, or even other countries with a little tweaking, little the Italian module: Partita IVA which I tweaked a little to use it for the Australian ABN. Hope the above works for you... there should be no problems once you change the default sort order. Tony Quote "The price of success is perseverance. The price of failure comes much cheaper." Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2003 Share Posted August 30, 2003 I have also tried to install this but as with the others, it did not show up as a payment option during purchase. I had a look at the code and TB, could you please confirm if on line 42 the wording: $order->delivery should be: $order->billing the same as in line 47 - should it be $order->billing then in line 101 at the end of the line it has now()) "); I have changed this to be now());"); I have made the three changes and I have also rearranged the code a bit and added a bank branch and it now works just the way I need it to. Thanks to all the others who have contributed to this and I hope the above changes are actually correct and I havent actually stuffed things up, although if it is now working, I can only assume they were required changes. Quote Link to comment Share on other sites More sharing options...
TB Posted August 30, 2003 Author Share Posted August 30, 2003 The code has been test with MS2 and works fine as is from the download. It should also work with MS1 no problems, though I haven't tested it. The modified code you've mentioned from line 101 doesn't look right as you're terminating the string early. My guess is that you will get errors if you try to uninstall, and reinstall the module. As for lines 42 and 47, these should be based on delivery address not billing. As above, the download should work fine. Just don't forget to copy the unmodified files to their directories and click 'remove' and then 'install' to clear your old code from the database and add the correct code from the unmodified files. Let me know how it goes once you've done the remove/reinstall process with the unmodified code from the download. Cheers, Tony Quote "The price of success is perseverance. The price of failure comes much cheaper." Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2003 Share Posted August 30, 2003 Well I went into admin (using my modified code) and i hit the uninstall and it worked fine, I then reinstalled it and again, no problems, still with my modified code. I made a fake order and the bank transfer option is there, i chose this and it continued to the next step, showing me the bank details I had put into admin. Everything seems to be working fine, so the changes i made dont seem to be causing me any problems. To make the changes I actually compared the code in nzbank.php to the moneyorder.php and it had the $order->billing rather than the $order->delivery, that is why I changed it. Comparing the insert into table configuration code the moneyorder.php showed this extra ; so that is why i threw it into the nzbank.php. I also removed line 25 $this->enabled = ((MODULE_PAYMENT_AUS_BANK_STATUS == 'True') ? true : false); as I couldnt see how this would help me in NZ I am in no way a coder, I simply look and see what makes something work and copy it or hack it to work the way i want it to. Sometimes this cut and paste behaviour isant always the best way but so far it has worked for me. TB - could you please explain the difference the $order->delivery and $order->billing would make to how it all works since it seems to work in the moneyorder.php and now with my modified nzbank.php. Also the extra ; that i put in, it is also present in the moneyorder.php. Im finding this a little confusing now so any explaination to how this works would be great. Quote Link to comment Share on other sites More sharing options...
TB Posted August 30, 2003 Author Share Posted August 30, 2003 Sandy, You were right in removing the line AUS_BANK line. $this->enabled = ((MODULE_PAYMENT_AUS_BANK_STATUS == 'True') ? true : false); It was carried over from the Australian Bank module. The $order->billing and $order->delivery work like this: If you use $order->billing, the NZ Bank option will show if someone uses an overseas address (ie. outside the zone) and a NZ address for billing. If you use $order->delivery, it doesn't matter if a NZ billing address is supplied, the NZ Bank option won't show if the shipping address is outside the set zone. I use $order->delivery, since I don't ship outside of Australia, though this is up to you personally. Another option would be to set all shipping modules to delivery and all payment modules to billing, this should pretty much guarentee that you won't get an order going somewhere where you don't ship. I've uploaded a new version of the code, without the line of code from the Australian Bank version. Thanks for picking up on that! :) Also, I've removed all the additional ; characters from the code. All lines in the install function now end correctly now())"); not now());"); Hope this helps to clear it up some confusion, Tony Quote "The price of success is perseverance. The price of failure comes much cheaper." Link to comment Share on other sites More sharing options...
azer Posted August 30, 2003 Share Posted August 30, 2003 i searched in the contribution part , but find nothing around securised online cb payement , you guys can tell me if there is a developped contribtuion that works this way with a nz banque ... Quote MS2 Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2003 Share Posted August 30, 2003 Tony, Ive removed all the extra ; from the code and changed the billing back to delivery because, like you with Aus, we will only be shipping around NZ. Much appreciated. cheers Sandy Quote Link to comment Share on other sites More sharing options...
TB Posted August 30, 2003 Author Share Posted August 30, 2003 Sorry I don't understand what you mean by 'CB Payment'? Can you please explain it differently, and I will see how I can help. Cheers, Tony Quote "The price of success is perseverance. The price of failure comes much cheaper." Link to comment Share on other sites More sharing options...
RobAnderson Posted August 30, 2003 Share Posted August 30, 2003 Well, seeing as I started this whole thread, about time I pitched in again! Thanks to Sandy for the suggestion to remove the line below: $this->enabled = ((MODULE_PAYMENT_AUS_BANK_STATUS == 'True') ? true : false); I did this and it now works OK. I now see the NZ Bank Transfer option in the payment options and it delivers e-mails fine. Not sure why...but I aint complaining. Thanks a heap to all who have given their time and contributed to this thread. Cheers, Rob Quote Link to comment Share on other sites More sharing options...
Guest Posted August 30, 2003 Share Posted August 30, 2003 Hi there Yup me too would lke to thank those who responded to this thread with help :) i was rewritng the module and had it almost done and working when an email come in for the fix lol Thanx heaps :) Quote Link to comment Share on other sites More sharing options...
RobAnderson Posted October 10, 2003 Share Posted October 10, 2003 Not sure if anybody has struck this, but I noticed that my NZ Bank Transfer option was not displaying if a customer chose only downloadable products. By comparing this module with the Money Order one (which was displaying) I traced the problem to the use of a delivery address as opposed a billing address as the determinant for whther it showed up or not. By changing all instances of delivery to billing, it now works, e.g. look for $order->delivery ['country']['id'] or $order->delivery['zone_id'] and change to $order->billing['country']['id'] or $order->billing['zone_id'] In any case, I think the use of billing over delivery makes more sense because you would normally only want to offer a payment option of Cheque/Money Order or local Bank Transfer if the payor lives in your own country. In contrast, the delivery address could presumably be outside of your country. Hope this helps ;-) Cheers, Rob 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.