If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Shipping Modules / Dropship Core [Support Thread]

Dropship Core [Support Thread]

Started by lhungil on 24 Oct 2012, 6:01 PM · Views: 28,939

Results 1 to 20 of 37
24 Oct 2012, 6:01 PM
#1
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #1 by lhungil

Firstly, Thanks to all those who spent the time to write, code, and maintain Zen Cart over the years.

Plugin / Add-On Details
This plugin adds the core capabilities for the support of dropshipments in Zen Cart. Pages and profiles are added to allow administrative users to maintain dropshipment information about suppliers and products. An observer watches for reference numbers to be added to the session and records them into the order history upon checkout.

A base shipping class is provided to handle existing shipping requirements (including using Curl to retrieve shipping data) and provide access to the new dropshipment information. A base shipping module (subclass of the base shipping class) provides convenience functions for quickly building a shipping module utilizing the base shipping class.

By abstracting how shipping is handled for dropshipments, many different shipping backends can be implemented without the need to duplicate code.

Not Included
I have not included any shipping modules built using the classes in this Plugin / Add-On.

I can tell you I have built a handful of shipping modules extending the base classes in this plugin (and they are in production use). This includes both parcel and freight shipping carriers. I am not releasing them to the public at this time.

Install / Uninstall
This version does not require users to manually alter the database. The provided (un)installation scripts under "admin/includes/auto_loaders" and "admin/includes/init_includes" will handle all required database changes. These scripts DO require the Zen Cart database user to have permission to create, update, and delete tables.

Disclaimer
As with all Zen Cart Plugins / Add-Ons you should first TEST the changes on a non-production site. It is recommended to backup your entire Zen Cart installation and database prior to installing.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

25 Oct 2012, 7:46 PM
#2
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #2 by lhungil

Release Notes

  • Added support for recording shipping quote reference information. The quote reference can only be viewed from the administrative interface and is not sent to the customer.
  • Updated the observer to use zen_db_perform when updating the database and to perform additional safety checks.
  • Updated comments in source code.
  • Moved the extra_datafiles to the correct location in the zip file.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

26 Oct 2012, 6:48 AM
#3
wilkesy avatar

wilkesy

Zen Follower

Join Date:
Jul 2004
Location:
stroud, gloucestershire
Posts:
198
Plugin Contributions:
0

Post #3 by wilkesy

Hi,

Please could you give more of a description of what this module actually provides. I think iunderstand but just need to clarify.

Regards

paul

Even novices can be professionals!

**Funky Fancy Dress**

28 Oct 2012, 7:56 AM
#4
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #4 by lhungil

Wilkesy:

Please could you give more of a description of what this module actually provides. I think iunderstand but just need to clarify.

Extra database fields to handle drop shipments

  • Drop Shipment Source Locations (TABLE_SUBCONTRACTORS_SHIPPING). Stores shipment origin locations along with name aliases and additional information such as shipping contact person and restrictions for the location.
  • Drop Shipment Package / Shipment Carrier Information (TABLE_PACKAGING_FOR_SHIPPING). Stores package name, shipping carrier (intended to correspond with the shipping module names), type (shipping carrier's code for the package), and description (human readable description of the packaging). Future versions will probably support additional options.
  • Drop Shipment Default Source Location for a MFG (TABLE_MANUFACTURERS_SHIPPING). Stores a default shipping origin for each MFG if desired.
  • Drop Shipment Product Level Information (TABLE_PRODUCTS_SHIPPING). Stores information about each product including the shipping location to use, shipping attributes (width, depth, height), freight class, leadtime (approximate time from ordering to product shipping from origin location), and packaging for the product. Future versions may include additional options.

Admin Management Pages

  • Page for managing drop shipment origin locations.
  • Page for managing drop shipment packaging / carrier types.
  • Updated manufacturer page for adding a default shipment origin.
  • Updated product pages to allow the entry of additional shipping options including origin location.

Base Classes

  • dropship class. Contains methods to retrieve extra shipping information from the database tables
  • dropship_carrier class. An abstract class handling common methods needed to: retrieve information about products to be shipped, communicate with a shipping carrier, provide a unified quote request method, and provide logging.
  • dropship_carrier_module class. An abstract class extending dropship_carrier to provide storage for required shipping module fields, required shipping module methods, surcharge handling, and convenience functions for retrieving the values of shipping module constants.

Observer
Watches for shipping modules to add "Quote Reference" and "Shipping Reference" information such as an "ID". If the shipping module provides this information during checkout, once the order has been confirmed, the information is added directly to the order history.

In the case of "Quote Reference" this is added as a private entry and can be used when talking with the shipment carrier to identify the quote (or even to record the quote details).

In the case of a "Shipping Reference" this is added as a public entry and is intended to be used by the customer to reference their shipping (either with your store or to add the tracking number from UPS, FedEx, etc). The "Shipping Reference" will also be sent in the order confirmation email to the customer.

What is not included
Actual shipping classes built extending "dropship_carrier_module".

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

29 Oct 2012, 1:44 PM
#6
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #6 by lhungil

icecold:

Seems like a very interesting module, does it work only with 1.5.1? Or is it possible to use it with 1.5.0?
Does it support multiple warehouses?
I've only included copies of the new files for 1.5.1 in the distribution zip file. If you are willing to spend the time merging, (most of the affected files are commented to let you know where changes were made), you can merge the changes into a Zen Cart 1.5.0 installation.

I do have this module installed (and working) in a production Zen Cart 1.5.0 installation. I just did not provide the "affected files" already edited and updated for a Zen Cart 1.5.0 installation in the distribution zip file.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

6 Nov 2012, 9:04 PM
#7
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #7 by lhungil

I'm working on a new DB Model to use for future releases. The proposed changes are more flexible, but may change as I work through some new activity diagrams. Any thoughts and feedback are appreciated.

The goal is to support some things currently not supported... such as package sizes and weight, max qty of an specific product in a package, etc. While all shipping methods will not use all the options (I'm trying to leave things flexible enough to work with any shipping carrier and packaging methods).

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

6 Nov 2012, 9:29 PM
#8
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Post #8 by limitless

I am very interested in testing this module out. Don't quite have the time available to dedicate to this yet, but hoping to in the coming months.

In regards to some of the db changes, esp relating to shipping sizes, are you thinking of being able to use this for dimensional weight?

Will there be additional shipping modules being built (or needing to be built)?

6 Nov 2012, 9:52 PM
#9
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #9 by lhungil

Limitless:

In regards to some of the db changes, esp relating to shipping sizes, are you thinking of being able to use this for dimensional weight?
Was not planning to generate dimensional weight. One could, but for Freight I am currently using the "class" field to store a product's NMFC classification (determined by shipping dimensions and weight).

Mostly the changes are to meet a client's packaging requirement. Certain items are shipped in "bundles" of up to X items per bundle. These final bundles are smaller than can be calculated by simply adding one of the dimensions (imagine items L or C shaped). We know the maximum size each bundle (package) can be upfront. Another is using set shipping packages such as UPS or USPS flat rate shipping. Knowing the final box size lets one attempt to arrange the items into boxes. Another is some packaging adds significant weight or dimensions. For example 'A' frame pallets.

Limitless:

Will there be additional shipping modules being built (or needing to be built)?
I plan to eventually release a basic UPS Ground shipping module as an example. First I want to hash out all the database needs (for many reasons - but especially to keep the installation script relatively simple).

Before I provide a working example, I want to make sure I've covered all the core data we need associated with a product / shipping location. I can then continue to add and build functions into the "Dropship Core" classes to provide common SQL lookups, optimizations, some common packaging methods, etc.

I'm hoping others will contribute some shipping modules (and potentially enhancements) over time.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

6 Nov 2012, 10:31 PM
#10
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Post #10 by limitless

Now I understand why you are keeping track of dimensions.

I get hammered on a few items that go UPS ground because they bill by dimensional weight, not 'real' weight and something like a 1# fishing pole 'dimensionally' weighs 11#.

Good stuff and still hope to play with this module.

7 Nov 2012, 4:45 PM
#11
mhawkins avatar

mhawkins

New Zenner

Join Date:
Jun 2009
Location:
Lynnwood, WA, USA
Posts:
40
Plugin Contributions:
0

Post #11 by mhawkins

I am having a problem getting the dropship core coding to play nice in the collect_info page(admin/includes/modules/product/collect_info).
When I try to add the beginning of the changed code, the admin product information input page goes blank. When I add only the bottom part of the code change the page comes up fine and the new input ares are added. The part that is a problem is the ( $parameters = array( and $product = $db->Execute('SELECT).

I am installing on zencart 1.51 with addons. The addons for the collec_info page are Origin Drop Ship (which I change the drop ship reference) and Numinix Product Info addon. The following coding under $product = $db->Execute('SELECT I think is the problem. Can you help to clarify coding so that the program works as intended.

                          .. ..............................................................
                           ps.leadtime, ps.packaging, ps.width, ps.depth, ps.height, 
                           ps.class, ps.subcontractors_id,                                       
                          ..............................................................
                          from " . TABLE_PRODUCTS . " p, " .
                          TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id
                          and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" . 
                          TABLE_SUBCONTRACTORS_SHIPPING . " ss, " .
                          TABLE_PRODUCTS_SHIPPING . " ps where p.products_id = ps.products_id 
                          and ss.subcontractors_id = ps.subcontractors_id . " .   
                          TABLE_MANUFACTURERS_SHIPPING . " ms where p.manufacturers_id = 
                          ms.manufacturers_id and ss.subcontractors_id = ms.subcontractors_id . "  .

                          WHERE p.products_id = '" . (int)$_GET['pID'] . "' .
                          WHERE ss.subcontractors_id = '" . (int)$GET['ssID'] ."' . " . ");

I am not a programmer so suggestions on what to do would be greatly appreciated since I am winging it.

One other thing all the programs have infomation for only 1 package. I find the dimensional shipping items a lot of times have more than 1 package to the shipment with different sized boxes.

I am waiting patiently for your shipping mods to add to the program.

7 Nov 2012, 5:43 PM
#12
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #12 by lhungil

mhawkins:

... The part that is a problem is the ( $parameters = array( and $product = $db->Execute('SELECT) ... The addons for the collec_info page are Origin Drop Ship (which I change the drop ship reference) and Numinix Product Info addon. ...
I have not tested this module with either of those modules installed, but I would be willing to wager they also modify both the $parameters array and also the select statement. They may even use similar column names in the database.

The goal of this module is to provide all data needed for most shipping modules and lookup / convenience functions to quickly build new shipping modules utilizing drop shipping and dimensional shipping (without using any other modules).

Are there any pieces of information those other modules add (relating to shipping) which do not exist in the database diagram I posted?

mhawkins:

I am waiting patiently for your shipping mods to add to the program.
Aye, if you are looking for finished code w/ working shipping modules you might want to wait on attempts to integrate this module until an example shipping module has been released. I already know I am going to need to change a number of things for the next release.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

7 Nov 2012, 8:31 PM
#13
mhawkins avatar

mhawkins

New Zenner

Join Date:
Jun 2009
Location:
Lynnwood, WA, USA
Posts:
40
Plugin Contributions:
0

Post #13 by mhawkins

I am willing to wait for the shipping modules but wanted to install this now since I am upgrading my store to 1.51.
The other addons do have similair names but are in a different db table. And, I have modified the other addons to fit my needs. I add information (additional packaging info, 2 shipping boxes info, item measurement, dimensional size and dimensional weight for each box). I also like this information to be visible to the customer.

7 Nov 2012, 10:46 PM
#14
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #14 by lhungil

mhawkins:

I am willing to wait for the shipping modules but wanted to install this now since I am upgrading my store to 1.51.
Just so anyone reading this later understands. If you install this module in Zen Cart < 1.50 it will not install the admin profiles or admin pages.

mhawkins:

The other addons do have similair names but are in a different db table. And, I have modified the other addons to fit my needs. I add information (additional packaging info, 2 shipping boxes info, item measurement, dimensional size and dimensional weight for each box). I also like this information to be visible to the customer.
I want to make sure I've covered any shipping needs applicable to this module in the database design. If there is any "additional packaging info" required and not included, please let me know what data and how the data would be used :)

You should probably not store the shipping information in two separate places in the database. This makes updating the data harder, wastes space, and could cause you some other issues down the road. If you decide to use this module you should probably remove "Origin Drop Ship" as it will probably conflict.

I can see the value of showing the customer some select information about the shipping details. Once the database is finalized I would welcome you to write up some template files based off 'default_template' to display shipping information for future inclusion in the module :)

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

8 Nov 2012, 3:10 PM
#15
mhawkins avatar

mhawkins

New Zenner

Join Date:
Jun 2009
Location:
Lynnwood, WA, USA
Posts:
40
Plugin Contributions:
0

Post #15 by mhawkins

I add info for 2 more shipping boxes, dimensional size for each box(computated but shows to customer as Oversized or Not Oversized) and dimensional weight for each box). The other items I added you already have covered or are not shipping related.

8 Nov 2012, 5:12 PM
#16
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #16 by lhungil

mhawkins:

I add info for 2 more shipping boxes, dimensional size for each box(computated but shows to customer as Oversized or Not Oversized) and dimensional weight for each box). The other items I added you already have covered or are not shipping related.
The next version (see the pdf recently posted) allows you to add any number of packages (box, pallet, bundles, etc) via the 'package_for_shipping' table. Each package can have a specified description, width, depth, height, and weight (specific to the package - not product). By having the table 'products_packaging' we can associate multiple packages to a product. Does this fit what you are explaining?

You can always modify your shipping modules (built on top of this) to override the dimensions for a specific size of box if you do not use set box sizes (for example if you manufacture your own box for each order). Personally I've usually seen people use boxes supplied by another company which come in set sizes. But with what is in the database, you should be able to handle variable box sizes if needed.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

8 Nov 2012, 7:41 PM
#17
mhawkins avatar

mhawkins

New Zenner

Join Date:
Jun 2009
Location:
Lynnwood, WA, USA
Posts:
40
Plugin Contributions:
0

Post #17 by mhawkins

It is exactly what I am looking for. I look forward to the next version. I thank you for your contribution that will help many like myself.

15 Nov 2012, 10:27 PM
#18
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #18 by lhungil

I've put in some more work on the database and dropship class files including a ton of phpdocs and comments. I am currently working on a more streamlined installation, upgrade, and removal process.

In the meantime feel free to look at the latest database design document (alas the tool I am using does not like to show the identifying multiple to one relationships when it outputs to PDF). The new documents should also show where alternative indexes have been added to speed up queries.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

29 Nov 2012, 6:45 AM
#19
jeremiah_h avatar

jeremiah_h

New Zenner

Join Date:
Sep 2012
Posts:
8
Plugin Contributions:
0

Post #19 by jeremiah_h

Hello,

Is there a way to assign drop shippers to a specific product instead of to a specific manufacturer? I have multiple drop shippers, and some of them carry products from the same manufacturer. For example Drop Shipper A and Drop Shipper B both carry products from the Acme Company. Drop Shipper A has product 1 and 2 at a lesser price than Drop Shipper B. However, Drop Shipper B carries products 3 and 4 from the same manufacturer (Acme), but Drop Shipper A does not have these products listed. I want to carry all of the products on my site, but in my Drop Ship Core, I have Drop Shipper A as the default for Acme.
Can I use Drop Ship Core in this way? If not, does anyone have any suggestions as to a solution or another plug-in that may work for me? I am using zen cart 1.51

Thank You,

Jeremiah

29 Nov 2012, 2:32 PM
#20
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #20 by lhungil

There are no publicly released shipping modules built upon this module currently. So at this time just installing this module will not give you full dropship + dimensional shipping in and of itself. This plugin just gives a starting point for developers to build shipping modules with support for dropship and dimensional shipping.

To answer you question, yes. Basically you can assign a "default" shipment origin by manufacturer. Then you can override the shipment origin on a product level. This data is then used to generate a shipping quote (and you can use a completely different location when you actually ship).

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker