TNT zone shipping module in Joomla Virtuemart

After lots and lots of googling i couldn’t find any shipping module for Virtuemart that was suiteble for our situation.

There is some kind of module for TNT but its for TGP Post and I didn’t get it working.

So there is no other option then write a module myself.

The first steps:

(1) Shipping Zone importing

I’ve imported all country zone codes by downloading the zone PDF from TNT, copied the in Excel and wrote a PERL script for the importing.

To make it more simple to you just download the SQL file here and just run the code in phpmyadmin.

It will update zone information (zone_id) for all countries in the jos_vm_country table.

If you prefer just international country codes with shipping zone information find it here. (same data, other format)

Beware this zone data is only from the Dutch point of view ;-) This will be different for your country!

(2) Writing the module itself:

The problem is, there is a default Zone Shipping module in Virtuemart, but here in the Netherlands the shipping costs are calculated different.

For example, in the default module you can ship a product sized 30cm * 30cm * 30cm with the weight of 50 Kg for just the zone price. There’s no difference in shipping a very large/small/heavy package. Only the destination matters.

TNT caculates the weight and the volume weight. You pay the highest value.

Weight is just the weight in Kilogram.

Volume weight is the size of the package length*width*hight / 6000.

Source: http://members.ziggo.nl/mfleur/maten.html

I’m writing the PHP code for the shipping module at the moment, so hold on a week or two.

Update 19 november 2008:

I had success with writing the module. There is a working alpha version. My deadline is 31 december 2008, so working hard to make this happen. I will make it more configurable, some parameters are hardcoded at the moment.

Update 9 january 2009:

I can report the shipping module is working fine :-) It still has the be tested some more, but it working.
There is one practical problem I”m facing, the volume weight calculation.

When you have some products, you can calulate their volume. But not in witch box they will fit.

At the moment i’m tweaking this calculation for the most optimal box.

If someone has a good solution for this, please write a comment below :-)

Update 14 Juni

Thanks all for waiting! :-) I can report this module is working fine in production now. At the moment i’m VERY busy with school (tomorrow I’ll have my final exam!).

Within a short time I’ll set the code online for testing. Anyone interested in this testing?

Tags: , , , , , , , , , , ,

26 Responses to “TNT zone shipping module in Joomla Virtuemart”

  1. Rutger says:

    Hallo en wat fijn dat het werkt ik ben ook al erg lang op zoek naar zo’n module
    zou je mij op de hoogte willen houden van je voortgang

    heel erg bedankt

    Rutger

  2. jurgen says:

    Zit ook te wachten op een goed shipping module voor GLS en TNT

    ben erg benieuwd naar de status

    gr Jurgen

  3. John says:

    Ben reuze benieuwd! Zal een hoop schele voor ons allemaal!
    gr

  4. Ocean says:

    Kan je al een indicatie geven wanneer we de eerst beta te zien krijgen

  5. admin says:

    De beta draait op dit moment in productie :-)
    Er zaten wat grove fouten in de uiteindelijk berekende prijs. Dit kwam door de plugin van docdata.
    Hier zitten een aantal flinke bugs in.

    Ik studeer letterlijk morgen af, ben dus erg druk. Als ik de kans zie zal ik hem als download aanbieden en kijken of er reacties komen :-)
    Helaas reageert niemand op mails nadat ze hier commentaar gepost hebben, om de beta te testen.

    Jij wel?

  6. Walter says:

    Hoi Admin,

    Ik ben ook op zoek om voor mijn website een TNT module in virtuemart te implenteren. Mijn joomla installatie is op dit moment alleen lokaal dus ik hoop dat ik het dan ook kan testen. Uiteindelijk is het wel de bedoeling om op een hostingprovider mijn website te zetten. Is het ook mogelijk om dit alleen voor NL te gebruiken??

    Ik heb er geen problemen mee om de beta te testen.
    Als jij me een goede handleiding mee kan sturen hoe ik kan installeren en testen dan wil ik met alle plezier de beta van je testen. (ben nog een redelijke joomla beginner)

    Met vriendelijke groet,

    Walter

  7. Pascal Leurs says:

    Ben meer dan bereid wat tests uit te voeren, want dit initiatief zou mij veel kunnen helpen. Mail me gerust.

  8. admin says:

    In hoeverre ben je bekent met Joomla, en PHP + SQL etc?

  9. Rene says:

    we staan in de startblokken om deze module te betatesten. kom maar op! mail me en ik geef je access tot het praktijkgedeelte van onze site.

  10. Jean-Paul says:

    Hai,

    Ik ben hard opzoek naar een TNT module.
    Ben de eerste die hem van je download!
    Ik zal dit topic regelmatig bekijken en hoop dat je snel je 1e versie kan uitbrengen.

    Succes!

  11. Suzette says:

    Hi
    Any news yet on this module? Is it ready yet?
    I would love to try it on this new shop we have just completed.
    If ready, where can I get it?

    Thanks
    Suzette

  12. admin says:

    I’m getting alot of requests for the download. The coding for now is done. It running for a few weeks in production now.

    But the point is, there is NO manual about installation, configuration etc.
    Is there anybody technical enouge to read an do some SMALL edits to the PHP files, so they fit your situation? And also can import data in the SQL database manually?

    If so please tell me, i send you the files. It would be nice if that person can also write a litte documentation.

  13. admin says:

    Also a request to all ppl who post comments.
    Please submit your real email address in the form.

    I WILL NOT SPAM YOU!

    It’s just that I cannot come in contact with the requests, and ppl forget to look at this site again..

  14. Miranda says:

    I’d love to have a look at the files you have, and if I’m able to figure it out for myself (which shouldn’t be too much of a problem) I’ll have a look at making a manual as well. You’ve got my real e-mail address :D so let me know. Also, I think it’s great somebody has taken up this TNT problem.

    Cheers!

  15. Miltan Chaudhury says:

    It looks like your solution is a handy one for my requirements. can I have a copy of the code please ? This is my real email address, you can send a zipped version here.

    Regards
    Miltan

  16. LeGrand says:

    Hallo,

    Is er sinds augustus iets nieuws te melden? Ik ben druk zoekend naar een dergelijke module. Is er al een beta of een stable version?

  17. admin says:

    Het probleem is dat ik geen draaiende site meer beheer. Ik kan de code dus niet uitzoeken.

    Als ik deze week nog even tijd vind zal ik een lokale installatie maken en je code toesturen.

  18. Anouck says:

    Hallo,

    Ik ben ook erg geinteresseerd in dergelijke module…Is deze al in orde en ergens te downloaden?

  19. Chris Perabo says:

    Hi,

    If you give me the files you have, I can work to complete the project. There are soooo many requests for this. I can even launch a development portal site with a Wiki for editors-in-de-maak who want to help contribute.

    Chris

  20. Dell says:

    Bedankt. Ben reuze benieuwd!

  21. admin says:

    I’ve contacted Chris on his email. Maybe we can work something out.. :)

  22. Iwan says:

    Ik ben benieuwd! Hou me op de hoogte wanneer de module beschikbaar is aub!

  23. Dezign says:

    Ben al zo lang op zoek naar een TNT module! Hoop echt dat je hem dit jaat nog kunt afronden! Hou me op de hoogte!

  24. Wieger says:

    Ik heb jaren terug al een module voor TNT geschreven, haalt actuele tarieven van de TNT website met allerlei extra opties. Misschien kan ik je een hoop werk besparen. op dutchjoomla even zoeken dan vind je wel meer informatie.

    Wieger

  25. Energy52 says:

    Hallo Wieger,

    jou TNT 0.9 module doet het toch niet meer omdat TNT die website heeft veranderd?

  26. Ong Yew Seng says:

    Can I have a copy of this module to test?

Leave a Reply