cmroanirgo Posted October 24, 2018 Share Posted October 24, 2018 Hi, I'm new to Prestashop, and have been looking at the way shipping works, and for my business needs, it just isn't working very well. To be clear, I've already hacked in a distance module that works using `getOrderShippingCostExternal` and `getOrderShippingCost`. However, the settings to get this to work are stored in the module's configuration page, when ideally, it would be better implemented as a new shipping_method as defined in Carrier.php, so that multiple carriers with these alternate ranges (time/ number of pieces/ distance, etc, etc) can be defined. To be more clear, in Carrier.php there's a lot of hard coded uses of shipping by weight, or by price. How do I go about overriding ALL of this so that I can add a new shipping_method (SHIPPING_METHOD_NUMBER_TIME/ SHIPPING_METHOD_NUMBER_OF_ITEMS)? The DB structure is fine as it is....it's only the php that's limiting me. It seems that the Carrier is always created using `new Carrier` rather than using a factory, so I'm a little at a loss on how I can sublass / instantiate modifications. (ideally it'd be great if `new Carrier` throughout the core code was replaced by `Context::getFactory('Carrier')->create()` or some such thing) I'm hoping I've missed something because I'm new...any suggestions? Cheers, Craig Link to comment Share on other sites More sharing options...
cmroanirgo Posted October 28, 2018 Author Share Posted October 28, 2018 bump. Any ideas? Suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now