Multiple modules in same code hook

I believe I have seen a post related to this question but I’ve spent the last hour going back over the forum and just can’t find it. So I’m going to ask it here. I haven’t had much luck in getting questions answered in this forum. My store is now 2 weeks late from opening because I can’t get past this one issue. My wife is going crazy and I can’t seem to get everything together.



I am using the Suppliers add-on. This works great but unfortunately does not handle my shipping setup from my drop-shippers. Some of my drop-shippers use set shipping costs for SOME items and regular UPS costs for other items. When I put in the fixed shipping cost on an item I use the Shipping Freight field. I discovered that the shipping process calculated a dynamic shipping charge from UPS based on the weight of the item and ADDED that to the Shipping Freight amount. This won’t work! So I changed the weight to zero. Dang if CS-Cart defaults the weight to .01 lbs regardless. Thus, UPS calculates a minimum shipping charge that is then added to the Shipping Freight amount. I tried setting the Free Shipping indicator on, but then it ignores both the dynamic calculation AND the Shipping Freight.



The only solution I can come up with is to add a module at the prepare_package_info code hook that will recalculate the weights appropriatly. It appears this is the right place. (i surely would appreciate it if someone would confirm that.)



But there is a major complication. The Suppliers add-on uses this code hook to recaluclate the package_infos array to accomodate suppliers. What I need to do is modify the package_infos array AFTER the suppliers hook runs. I just need to add a loop that ignores the weights when there is a Shipping Freight amount.



So, when multiple modules utilize the same code hook what is the sequence that the hooks are executed? Surely there is a set process there and it’s not random. If I could resolve the weight calculation I think I can manage the modifications necesary to get this all working.



Also, if someone could suggest an alternate solution to this I would greatly appreciate it. We are ready to open our new eCommerce store as soon as I can get it to generate accurate shipping data.



If I can’t get this resolved I’ll just have to go in and physically change the base code. I have been trying to avoid it, but these changes are just not easy to make using the hook technique.



My appreciation and thanks to anyone interested in responding with some help!!!

I don’t understand why it is not possible to get help in this forum. One of the things I have noticed is that many posts go ignored while others are answered in volumes. I can’t quite figure out what the magic key is to get a little assistance.



It is obvious that the CS-Cart developers have no interest in participating in the forum. It would hurt their bottom line. They are making their real money by “enhancing” the software do what it should have done in the first place. Paid for by the suckers who were fooled into buying it in the first place. Usually a user forum works nicely in a situation like this. Obviously it does not here.



I suppose everyone thinks my questions are ridiculous, naive and/or stupid. I wonder if those who know the answers are waiting for an offer of payment. Not on this earth.



I will limp along trying to make CS-Cart do what I need for it to do until I can find a solution that has decent documentation and support.



A lesson learned the hard way is always the best lesson. I wish everyone the best.

Hello Glennp,



I do not use the suppliers addon, so although I may not be of much help, thought I would give it a quick shot…



Adding a value to the “Shipping Freight” field of a product will add this value as an additional amount to whatever shipping method you already have setup as mentioned at the bottom of this knowledgebase page:

[url]CS-Cart Documentation — CS-Cart 4.15.x documentation



From your previous post, it appears as if you are using both realtime & fixed rate shipping methods combined. Personally, if it were me… I would use realtime shipping rate calculations across the board, and then, for the individual products of which your supplier controls the shipping cost and you believe the cost will be higher, I would insert an additional amount into the “Shipping Freight” field to make the needed adjustment. This very well may not turn out to be spot on, however, unless you sell tiddlywinks in a flat rate envelope (one of my absolute favorite phrases) :slight_smile: , you can spend endless hours trying to accomodate every possible scenario… and will most likely still not always be spot on!



There are alot of helpful people here on the forum, it is just that your situation is not the most common nor simplest to solve. The other issue at hand is that alot of us are also putting added focus on our own businesses to offset the negative effects of this economy. :wink:





And you are right, CS-Cart staff members seldom reply to any requests for help in the forums. IMO, just a few quick responses a week to forum questions would go a very long way for them!