Glad to see you got it to work!
PS: Did you know when you type "purolator module" in google, you get this thread? :)
Glad to see you got it to work!
PS: Did you know when you type "purolator module" in google, you get this thread? :)
Hi wajdi
I was going through the Purolator site http://www.purolator.com/index.html
and was not able to find any tutorial on integration with the shopping cart
Can you let me know the link?
Thanks
San
Originally Posted by superprg
awesome![]()
![]()
that's pretty cool.
superprg:
Unfortunately there are no guidelines offered by anyone (to my knowledge) on how to integrate shipping modules in to zen cart or how to create purolator modules for websites.
The way I did it was by reading through the modules already built in and understanding how they were all linked in the environment.
Thankfully the zen-cart environment is so user-friendly for developers it almost made me cry in joy....
If you check out the zip file attached you will see what is required for shipping modules. In the most basic case you just need two files and most likely a table (or many) to throw in to the database. One in each of the following directories:
includes\languages\english\modules\shipping\<shipping_module.php>
includes\modules\shipping\<shipping_module.php>
The first directory is for all your "defines" of outputted text
i.e: define('MODULE_SHIPPING_PUROLATOR_TEXT_TITLE', 'Purolator Shipping Rates');
The second directory points to the actual implementation of the module you want to implement.
I strongly suggest trying to understand how the various functions/variables are used in other modules to know what you would need to properly implement the tool you require.
If you have any more questions don't hesitate to ask...it took me quite some time to understand the overall structure and get it working, so don't give up :)
Last edited by wajdi; 10 Oct 2006 at 08:36 PM.
Thanks mate
I am going through it
I will let you know in case I run into any problems!
SAn
I dint understand the shipping_rates table
CREATE TABLE `shipping_rates` (
`shippingid` int(2) NOT NULL auto_increment,
`zone_detail` varchar(4) NOT NULL default '',
`lt_ten` decimal(3,2) NOT NULL default '0.00',
`ten_twenty` decimal(3,2) NOT NULL default '0.00',
`twenty_thirty` decimal(3,2) NOT NULL default '0.00',
`thirty_fifty` decimal(3,2) NOT NULL default '0.00',
`fifty_hundred` decimal(3,2) NOT NULL default '0.00',
`hundred_twofifty` decimal(3,2) NOT NULL default '0.00',
`gt_twofifty` decimal(3,2) NOT NULL default '0.00',
PRIMARY KEY (`shippingid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=34 ;
What are lt_ten, ten_twenty etc?
Thanks
Hey,Originally Posted by superprg
lt_ten = less than 10
ten_twenty = between 10 and 20 (same applies for the rest)
gt_twofifty = greater than 250
The fields in the shipping_rates table correspond to weight ranges. Whatever value is under the ten_twenty, twenty_thirty, etc is an incrementing value that adds to the lt_ten value.
So depending on your weight the shipping price will be determined. For example:
weight = 14
postal code: XXX-XXX gives us zone XXXX which has a flat rate (lt_ten) of $5.25
However the weight is 14, so it belongs in the range ten_twenty. Assuming that the incrementing value for this range is 0.24:
0.24 will be added to 5.25 four times to adjust for appropriate weight.
I hope that helps :)
Thanks much man!
no probs dude.
error checking time.
The shipping estimator needs some fine tuning to work with the purolator module.
When you first select the shipping estimator and you are not a logged in as a registered user you will get an sql error because the province and postal code are empty. Once you enter the appropriate values, all works well. Probably due to a cookie being dropped but even when you close the estimator and decide to go for a another set of items, it will remember your postal code and province even when both boxes are empty.
So, I'm thinking maybe the best thing to do would be to put in the error checking in the shipping estimator side seeing that none of these problems arise when you are in the checkout phase. Do not want to end up putting in error checks that will come out in the checkout when it is not necessary.
Anyone have any other suggestions?
how you are checking postal code against province....
if i enter ontario postal code and select nfld as province , how can you fix that....?
Bookmarks