Heidara Posted March 13, 2017 Share Posted March 13, 2017 Using latest 1.6 version Standard theme I have different types of shipping carrier, one of them is the same day delivery which I want to disable in specific day of week,for example available all days of week except Saturday. Link to comment Share on other sites More sharing options...
NemoPS Posted March 13, 2017 Share Posted March 13, 2017 I guess you can modify getAvailableCarrierList, Cart.php file. Can't tell you where exactly off the top of my head, just check $carrierList at the very end, loop through it and check against the static carrier id (not id_carrier, which changes every time you save one, but the static id_reference) if it's the one you want to disable.If date('D') == the day you want to disable it, then unset it from the list.I might write a quick tut about it, interesting question! Link to comment Share on other sites More sharing options...
Heidara Posted March 13, 2017 Author Share Posted March 13, 2017 Thank you for your swift reply, I appreciate the instructions you suggested. However, I'm not well-versed in PHP programming and it's difficult for me to apply unless I have specific and clear instructions. I attempted to search in cart.php, but it didn't help. Can you please provide step-by-step clear instructions? Thank you in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2017 Share Posted March 15, 2017 Here: http://nemops.com/prestashop-carrier-disable-on-specific-days/#.WMkJC2997OQ 2 Link to comment Share on other sites More sharing options...
Heidara Posted March 15, 2017 Author Share Posted March 15, 2017 Thank you Nemo, I did everything you said, even after deleting the class index and enabling override, I don't see the field. Link to comment Share on other sites More sharing options...
Heidara Posted March 16, 2017 Author Share Posted March 16, 2017 Thank you very much it worked. But I couldn't make in the override, so I added the new codes directly in both classes/Carrier.php and controllers/admin/AdminCarrierWizardController.php It works nicely now for me. Do you think I did a mistake by adding directly to the original files? Link to comment Share on other sites More sharing options...
NemoPS Posted March 17, 2017 Share Posted March 17, 2017 No mistake, no worries, it's odd the override didn't work though! Link to comment Share on other sites More sharing options...
BlackEdition Posted August 15, 2017 Share Posted August 15, 2017 (edited) Here: http://nemops.com/prestashop-carrier-disable-on-specific-days/#.WMkJC2997OQ Hi Nemo, Thank you very much for this great tutorial! Im using PS1.7.1.2 and my situation is very similar to OP's. I need to use time of day instead of date. What modifications do I have to do so your tutorial can work in my case? I have a delivery method that can deliver orders right away to customers living in the same city. Customers can only choose this option if they place an order between my business hours, or a time that I can specify myself and edit later in back office when needed (example: between 10AM to 6PM). If a customer goes to checkout between this specified time, then they have the ability to choose this delivery method if they want, but I don't want them to be able to choose this delivery method when it's outside of my specified hours. Can you help me achieve this? I would appreciate it very much. My business is built around delivering orders right away to customers in the same city and I couldn't find a paid module for this kind of thing. Edited August 15, 2017 by BlackEdition (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted August 16, 2017 Share Posted August 16, 2017 This can't really be done by default, it needs quite a modification or rather a new module, unfortunately I can't think of a proper solution for 1.7, you might try adding timespans like 12-14 or so, and act accordingly Link to comment Share on other sites More sharing options...
BlackEdition Posted August 16, 2017 Share Posted August 16, 2017 (edited) This can't really be done by default, it needs quite a modification or rather a new module, unfortunately I can't think of a proper solution for 1.7, you might try adding timespans like 12-14 or so, and act accordingly I honestly know nothing about programming so I can't do what you asked lol. Do you know any paid modules that can do this job for me? or at least something that can make it work with your solution? If not, then is it possible that you can custom make a module like this for me (for a fee of course)? Or better, you can design a paid module that does this sort of thing with the choice of (either days or time) and put it on sale on your website then i'll be able to buy it and so does every one out there instead of just a custom private module for me. Thanks Edited August 16, 2017 by BlackEdition (see edit history) 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