Path

ez projects / ezfedexshipping


ezfedexshipping

UNIX name Owner Status Version Compatible with
ezfedexshipping Stuart Fenton stable 1.0.b1 3.8+

This is a FedEx shipping extension. It can be added to your 3.8+ shop and
deal with shipping based on weight and destination country.
It also allows the user to enter a different destination to the
registration address and country but will require a small patch to
the kernel.

Copyright ©2006 Stuart Fenton at grandmore.com
email:
This is a FedEx shipping module that can be extended to include other
shippers.
I created this module after looking at both FedEx and UPS. I decided
the best route was to accommodate both so that later one can be add
later. The shipping module will eventually work with both shipping
suppliers, and possibly some other ones. At the moment it's only
FedEx.
The problem with both shippers is that they have different ways of
classifying the zones they ship to (a zone is a group of countries
that has the same cost to ship to).
So I have written the FedEx shipping module because it has more zones
that UPS. Which means we can fit UPS into the same structure later
on.
UPS zones are number based whereas FedEx is Letter based so excuse the
fact that it's written for numbered zones instead of lettered zones
(it's easier to code). This means you must translate the 15 FedEx
zones from A to Z into 1 to 26.
Apart from that it should just work.
There are some sql statements that will populate the tables but you must
do this for yourself with the correct prices from your country of
origin.
This module is based on the shipping module provided by ez at:
---
An extra feature is that the customer can supply a separate address
instead of the one supplied during registration. In order for this to
work the kernel needs to be altered as there's no way to hook into
the process. I tried and tried and eventually succumbed to editing
the kernel. If anyone has a better way let me know. (ez can I have a
hook for this?)
The edit is in the kernel/classes/ezorder.php class as shown below.
Inserted after the ?$db->commit();?
function &detachProductCollection()
{
$collection =& $this->productCollection();
if ( !$collection )
{
$retValue = false;
return $retValue;
}
$db =& eZDB::instance();
$db->begin();
$newCollection =& $collection->copy();
if ( !$newCollection )
{
$db->commit();
$retValue = false;
return $retValue;
}
$this->setAttribute( 'productcollection_id', $newCollection->attribute( 'id' ) );
$this->store();
$db->commit();
//SF-START- code change for Shipping Module
$productCollectionID = $collection->attribute( 'id' );
$newProductCollectionID = $newCollection->attribute( 'id' );
$query = "UPDATE ezfedexshippinginfo " .
"SET productcollection_id= '$newProductCollectionID',
completed_productcollection_id = '$newProductCollectionID' " .
"WHERE productcollection_id='$productCollectionID' AND
completed_productcollection_id = '0'";
$db = eZDB::instance();
$result = $db->query( $query );
//SF-END Code Change
return $newCollection;
}
---
So onto Installation.
Basically do the usual process for installation.
Upload the extension into the extensions folder
go the admin side of your site and go to setup / extensions and
activate the extension. (click on extensions again to ensure it has
been activated)
If you doing this manually then make sure your site.ini.append.php file
in settings/override has the following in the
[ExtensionSettings]
[ExtensionSettings]
ActiveExtensions[]=ezfedexshipping
You must update your user class to use the Country datatype as the
extension uses it to work our what the destination shipping country
is.
Look here for this.
Then you need to add a ?weight? attribute to your product classes. The
weight attribute should be a ?float? type.
The weight is used in combination with the country of the user to
calculate the shipping.
Then your good to go.
If I?ve forgotten anything I?m sure you?ll remind me.
Please enjoy.
Cool
Fats.

Screenshot

This project has no reviews yet. Be the first one to review it!

No forum messages yet.