Jump to content

[Resolved] Shipping Nightmare - Packaging


Spechal

Recommended Posts

I used CC back in the v3 days and it was great for what I needed.  These days, there is no shipping out of the box.  You have to figure out how to get it all working.  On top of that, nothing really works together well or fits nicely within what the titles describe.  I don't mean to rant, more so offer assistance if interested.

I am going to use a real life scenario, if it can be solved by a combination of existing modules, I retract everything I've said sans the figuring out how to setup shipping part.

Let's say I want to sell coins.  Raw and graded coins.  I also don't trust anyone but USPS.  To save everyone money, I will send US Priority and Flat Rate boxes.  For security, if the purchase if over X dollars, then registered mail is required.

Module breakdown:

Per Item - Won't work, but promising. If someone buys 3 x graded coins, it will fit into a smaller package and go US Priority.  If they order 4 to 8, Small Flat Rate, etc... If they order raw coins, the space required is much smaller and I can fit probably 10 into a smaller package.  If shipping could be broken into specifying a price at an item by item level, it may work.

By Weight - Won't work.  Raw coins weight almost nothing but take up space within the package.  Same issue as above.

By Price - I may not fully understand this, but it didn't seem to work when testing the aforementioned scenario.  

All In One - This is the closest needed and I am thinking about extending it.

What I really need is a shipping tab on the product page to specify overrides for global defaults.  It can be abstracted out to a set of shipping options or case size options (maybe just a lookup table) and a builder tool.

Something like some words and drop downs or text autofills ...

Product -> Shipping

Item Shipping Cost: $XX
Items that fit in case: X
Special Requirements: - Signature Required (Registered Mail) 

Then I test my scenario:

Client purchases 10 raw coins and 3 graded coins.
Raw coins are set a 10 per case and shipping at $2.95 for US Priority Mail. Graded coins have two per case. Which bumps it to the next size, Small Flat Rate.  Success?  Yes, but how did it know that 10 raw and 2 graded fit?  This would introduce a dimensions aspect, which doesn't appear to exist. Why?

Client purchases 21 raw coins.  We have raw coins at 10 per case so we need 3 cases.  That bumps it up to Medium.  Success?  Yes, but how did it know?  The system would need to know how many of each item type can fit in each case size OR case sizes could be introduced in which they know how many of which item type can fit into a case.  However, we don't have product dimension support nor a shipping module with a concept of shipping based on dimensions or cases that are multiples of the same size (i.e. 1 cubic foot, 2 cubic feet, etc...).

Production options didn't seem helpful either, but again I may not be using them correctly.  I did't see them get into the product/shipping level either.  I don't see much that does get to the product level in regard to shipping.

This could all be just too specific to be and either needs abstracted out a bit more or I would just have to run with it for my own use ... it also turned into a brain dump.  Again, I don't mean to complain and do nothing about it.  I would like to help.  I am not the best but am PHP ZCE certified and have been doing this for like 15 years.

Thoughts appreciated.

Link to comment
Share on other sites

I will read your post in greater detail shortly, but I agree with one point you made.

CC6 comes "unbloated". That is, CC3/4/5 came with every Devellion-produced skin, shipping module, payment module, social module, affiliate module, language pack, livehelp module, and a few complicated payment/sharing modules. CC6 comes only with one skin and one language pack.

I think there should also be a simple payment module (POF) and a simple shipping module (FlatRate) -- to enhance the "will this work for me" exploratory phase.

CC6012 also comes with a "Quick Tour" but I have not actually gone through it. The QT may or may not discuss the requirement to get modules that will serve your needs.

On the admin Dashboard, there is an array of recent MarketPlace modules -- implying that this is where to go to explore, learn, and install additional functionality.

 

Link to comment
Share on other sites

  • 4 weeks later...

a "box builder" concept works, but is a real pain to develop. I used it on my UPS module. Essentially it takes into account item dimensions, your packing sizes and then packages the order virtually into your packing materials. It then calculates the weight, quantity and dimensions of each box and gets an overall shipping price for the consignment. It took me quite a while to get that working correctly. It can be done but it's complex.

To get around some of the shipping limitations I released a module:
https://www.cubecart.com/extensions/shipping-methods/link-cubecart-products-to-specific-shipping-services-/-modules

I use this module a lot in building solutions to complex shipping problems for people. You can essentially select which shipping "module" a product gets it's shipping price from. You can then create multiple versions of the same modules, for example USPS and setup different rules for each. You can then link your products to the relevent shipping service and get your correct shipping totals.

Shipping can be a complex problem to solve because no two businesses have the same processes.

Link to comment
Share on other sites

This is indeed a complex problem. If money is tight and you are not averse to doing some coding yourself, I have some things (all free) that may assist you:

- Adding product dimensions to CubeCart

- Shipping library I developed that can pack items according to any algorithm you want with a couple of default algorithms included

- Custom UPS shipping module developed for CubeCart using the above library (used the original CubeCart UPS module as a starting point)

Using the original USPS module as a starting point and the above UPS module as an example, you could write a USPS module with the above library that would then give you a lot of the flexibility you need.

Support for specific box sizes could be handled by clever use of constraints, e.g. FlexibleConstraint containing each of the box sizes as a custom constraint. Minimum box sizes could be enforced by extending one of the current packing algorithms.

I hope it's evident that this will require a fair amount of work and knowledge on your part, but if you are willing and able, I believe the library is flexible enough to meet your needs.

However, if money is not an issue for you, you can save yourself many hours (potentially entire days or more) of effort by finding an existing module that is close enough (such as the one by Noodleman) and perhaps modifying your shipping procedures slightly to account for that, or by hiring someone to create a module that does exactly what you need.

Either way, good luck!

Link to comment
Share on other sites

Noodleman I downloaded your plugin for its seven day trial.  I read this post which mentioned "You can then create multiple versions of the same modules", I also downloaded and installed the "All in One Shipping" plugin.  I then made three copies of the same plugin renaming to Flat Rate, By Weight, By number of items.  When I go into the admin manage plugins they are all the same name and it does not appear that I can rename them for easy identification.  Is there a way to do that?

Thank you

Link to comment
Share on other sites

If you find 7 days isn't enough for you, drop me a message and I will generate you a temporary license key :)

The "all in one" module is a little different than most, because it actually stores it's data in the following database tables

  • CubeCart_shipping_zones
  • CubeCart_shipping_rates

So, every copy of the all in one module will be reading the same configuration data from those tables. So, what you may want to do is clone those tables, then update each of your modules to use the differently names tables. Easiest to just do a find and replace using notepad++ on the entire module for the two DB table names.

So, for example duplicate "CubeCart_shipping_zones" into "CubeCart_shipping_zones_flat_rate", then update your "flat rate" version of the module by doing a find/replace on "CubeCart_shipping_zones", changing it to "CubeCart_shipping_zones_flat_rate" and finding "CubeCart_shipping_rates" and renamed to "CubeCart_shipping_rates_flat_rate".

Each module will now read it's own unique configuration / settings as it's stored in seperate tables. :)

Most shipping modules don't need additional DB tables, but all in one is an exception.


 

Link to comment
Share on other sites

Greetings,

I appreciate your offer to extend the trail period and I will take you up on your offer to provide me with an extended time key.

Given the fact that you know more about what I am trying to accomplish in shipping, I would appreciate your direction as how to accomplish this.  I am not bound to the All In One Shipping plugin by any means.

Frank

Link to comment
Share on other sites

Hi Frank,

I know you gave some scenarios in your original message, but can you provide me with a couple of your real world shipping problems that need to be solved. Will give it some thought and let you know what approach I would use :)

 

 

shipping_zones is not a directory. it's a table that is found within your database.

Link to comment
Share on other sites

When making copies of a module, there are two aspects that define its name: the name of the folder (using underscores instead of spaces in the folder name) paying attention to the capitalization, and the names given in the module's config.xml file (the <folder> node must match the folder name exactly, and the <name> node can be whatever you want).

 

Link to comment
Share on other sites

Got it Bsmither,  I made the changes you suggested and now my modules show the way I intended.

Per Noodleman's instruction I did duplicate the CubeCart shipping rate and zone databases along with editing a file called Shipping.class.php to reflect the names of the newly created databases but it does not reflect my changes.  I probably edited the wrong file.  When I make a change in any one of the modules it still reflects the changes in all three.

Frank

Link to comment
Share on other sites

Based on your initial example of coins, using graded and raw, I would use the module to define that "Graded" coins use one shipping module, and Raw use another.

You can then define the rates for the service that apply to a coin based on grade. At checkout, the items in the basket are sent to the modules they are configured for and those in turn will reply with the shipping rates.  My module then takes these rates and adds them together to give the total shipping price. Essentially combining the two services. This normally handles most scenarios, but there are some occasions where some custom code between those processes is required, it varies with every single case.

So, an example of custom rules in this case would be something like, "If the customer buys a mix of Graded, and RAW items, we want to ship everything via the Graded shipping service services".

Link to comment
Share on other sites

I thought I would add a real world example of where this is being used for one of my customers. His store ships rocket engines, and other materials which require special shipping. "Hazmat" shipping services, but he also sells regular goods as well.

We use the module to send his Hazmat marked goods through a special HazMat shipping service via UPS (one module). All other items go via FedEx (2nd Module). We put a bit of custom logic in there as well to handle cases where customers have a mixed cart.

If a customer orders only hazmat items, everything goes via the UPS hazmat service. If the basket contains only non hazmat materials, everything is shipped via FedEx. If the basket contains a mixture of both, we assume that we can combine the items into a single box and ship everything in the same package using the HazMat service. In this case we override the normal rules and assume we can pad out the one box with other items.

 

Link to comment
Share on other sites

Noodleman I should clarify that 95% of my shipping is done via dropship from our vendors, so I would like for the freight to be generic in nature so if a client selects FedEx and my vendor ships UPS, there would be no confusion or concern by our clients that they had a bait and switch on the shipping.

So the shipping will be setup to match what we are charged to ship a given order.

Hope that makes sense.

I am having issue with your product and the three cloned shipping modules.  Your module did create a new tab under the products so I can pick and choose which shipping service I want to link to a given product, pretty cool.  It all looked good until I tried to setup the Zones.  It would not save and gave me errors.  Eventually I re-enabled the original Shipping module, which had the default Shipping zones and rates,along with the three new cloned modules.  I was then able to save the zones as if the original is required to configure the zones.  Well I thought all was good because before I was unable to save all the settings in each of the three modules independent of each other.  Once the original module was added back into the mix I was able to add the zones to each of the three cloned modules which then showed up under the other modules as zero's.  To clarify,  the three modules now show three zones with only one amount related to a given module while the zones for the other two modules shows zero's.   To clarify the three modules are called Flat rate, By Weight, By Item.   if I look at the zones in the Flat Rate module the is $20 shows up under Flat rate while the By Weight and By Item are zero's   If I look under the other modules they show the respective amounts under there given zone with the other two zones being zero.  So it looked like things were working until I tried using a fake order.  When ordering the freight is zero with no ability to change it and when filling out the customer data, when selecting the state, before it use to popup with a list of states but  now there is no list.  I then noticed that under your module, I was unable to select and save the zone. I can select the United States, but when I save it ignores the save. I was doing this in an attempt to diagnose what was going on.  Do you have any idea's as to what I am missing here?

Thank you Frank

   
Link to comment
Share on other sites

I did a bit of research and testing.

First off I uploaded the original "All In One Shipping" module and had it be the only module activated and when I went to check out the freight amount was there.

Then I deactivated the "All In One Shipping" module and only activated the " Link products to specific shipping services - PLUGIN"  and the " Link products to specific shipping services - SHIPPING MODULE " modules by Noodleman,  when I went to check out the shipping amount was once again $0.00.  I then reactivate the "All In One Shipping" module and deactivated the "Link products" modules and the freight amount once again re-appeared.  I then tested each of the three modules (Flat_Rate, By_Weight, and By_Item) that I copied from the "All In One Shipping" and none of them work with or without the "Link products" module.  So for some reason none of the three copied modules work and the "Link products" module does not bring over the information from the "All In One Shipping" module.

Any help would be greatly appreciated.

Frank

Link to comment
Share on other sites

I just noticed that I cannot change and save the default shipping service under the "Link products" module. It is stuck on one of the three modules that are not working by themselves, so I'm thinking that may have something to do with presenting zero's at checkout.

I going over the three copies modules, everything looks good.  I can save settings, rates, and zones independent of each other and everything in the config files match the database and is case sensitive etc.  I had to have missed something in the copy and pasteing

I hear you bsmither, that is why I am hopeing Noodleman.to help me out.

Frank

Link to comment
Share on other sites

I even deleted the "Link to product" and recopied the plugin and I still cannot save the changes so that info must be stored someplace else.  I could really use some help here Noodleman.

 

Frank

When I removed and copied the Link to product module the " Link products to specific shipping services - PLUGIN"  did not come back with it.  Woops.

Link to comment
Share on other sites

Update, when I removed the three cloned and renamed plugins the Link to products now sees the All in One Shipping module.  So now it looks like I need Noodleman to guide me through the correct way of cloning etc. so I can have multiple All In One Shipping plug ins to accommodate my flat rate, per item and by weight plugins.

Frank

Link to comment
Share on other sites

Another update.  I looked at all of the newly cloned All In One Shipping data tables and they all look great.  What I mean is the data tables, structure, settings etc. all look the same and when I run the utilities for checking them, defrag, analyze etc. I don't receive any error messages. 

The name of the new data tables are as follows:

CubeCart_shipping_zones_Flat_Rate (which is case sensitive to the name of the existing data table)

CubeCart_shipping_rates_Flat_Rate (which is case sensitive to the name of the existing data table)

CubeCart_shipping_zones_By_Weight (which is case sensitive to the name of the existing data table)

CubeCart_shipping_rates_By_Weight (which is case sensitive to the name of the existing data table)

CubeCart_shipping_zones_By_Number_of_Items (which is case sensitive to the name of the existing data table)

CubeCart_shipping_rates_By_Number_of_Items (which is case sensitive to the name of the existing data table)

I can also see data that I input from within Cube Cart to each of the data tables.  So that all looks good. 

It appears that problem with with the search and replace edits to the files within the given module. I HOPE I FOUND ALL THE FILES ETC TO PERFORM THE SEARCH AND REPLACE ON.  The only files I found to edit were the "shipping.class.php " and "index.inc.php" files.  I also edited the "config.xml" file to change the name "All_In_One_Shipping" to

<name><![CDATA[Flat_Rate]]></name>

<name><![CDATA[By_Weight]]></name>

<name><![CDATA[By_Number_of_Items]]></name>

 

The search and replace edits to the shipping.class.php are as follows:

FOR THE FLAT RATE:

$this->_all_zones = $this->_db->select

('CubeCart_shipping_zones_Flat_Rate', false, false, 'sort_order, id');
        $this->_all_rates = $this->_db->select

('CubeCart_shipping_rates_Flat_Rate', false, false, 'zone_id, id');
        $this->_debug_lines = array();
    }

FOR THE BY WEIGHT

$this->_all_zones = $this->_db->select

('CubeCart_shipping_zones_By_Weight', false, false, 'sort_order, id');
        $this->_all_rates = $this->_db->select

('CubeCart_shipping_rates_By_Weight', false, false, 'zone_id, id');
        $this->_debug_lines = array();
    }

FOR THE BY_NUMBER_OF_ITEMS

$this->_all_zones = $this->_db->select

('CubeCart_shipping_zones_By_Number_of_Items', false, false, 'sort_order, id');
        $this->_all_rates = $this->_db->select

('CubeCart_shipping_rates_By_Number_of_Items', false, false, 'zone_id, id');
        $this->_debug_lines = array();
    }

 

I performed the same find and replace routine on the Index.inc.php show I did not show the details like above but the data table entries were the same as above.

Hope this helps to expedite your diagnostics of why the three newly created modules are not working in Cube Cart.

Thank you,

Frank

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...