Re: How to do this (shipping method)

Originally Posted by
joshuayang
my shop shipping workflow is:
shop is in china, and the rate of shipping is FLAT, $25 to usa, $30 to uk, and $32 to other conturies.
when customer make an order on the site, i will call DHL/UPS take the products.
how can i make the shipping method?
My thought on it now is: to copy the shipping method of FLAT RATE two times, and set it to usa\uk\others, but how can i do that?
please, help me by your kindness and wise.
You have to copy all the files related to the flatrate module. Do not touch the original files but make as many copies as you need (practise with one first).
Make marks in which folder each of the copied files are (better if you keep the folder structure for it).
You should find these:
includes -> modules -> shipping -> flat.php
includes -> languages -> english -> modules -> shipping -> flat.php
(the same way all the languages you are using)
When you open the file flat.php under modules (non-language one) you will see lot of these:
MODULE_SHIPPING_FLAT_TEXT_TITLE
Change in your copied file (not original) all of them for example like this:
MODULE_SHIPPING_FLATUK_TEXT_TITLE
and rename your php file the same with small letters, like flatuk.php.
You can use Find-and-replace function with a good raw text editor (do not use any Word, Wordpad etc. since they will destroy your code; I use mac computers and BBEdit there) and replace one by one checking that it is replacing properly the word FLAT for word FLATUK. Keep everything else untouched in the file.
In the language files you can put the description what is your module called (so of course put different descriptions for each of the different shipping methods).
I was trying long time ago ask help for this same matter and nobody answered me here, so I needed to find my way. This way above is the one I did then.
When you have carefully changed your info in a copied flatrate files, please upload them back to their correct directories and you will see them on your admin as a shipping option that can be activated there. You probably see some need for editing the language part again when you see how it appears for the customer in the shop and how it is in admin. Then you just update the proper language file for that.
I hope this answer helps you to get forward.
Elli
Last edited by ellivir; 12 Sep 2006 at 08:08 PM.
I may be blond but at least I found Zen.