Premitium Posted September 30, 2016 Share Posted September 30, 2016 Hi, I want to add a new functionality to my store. Let people decide when they want to receive their stuff. A couple or radio buttons that will show options like: 1. Delivered tomorrow after 12:00 2. Delivered today in three hours. 3. Delivered in 48 hours. My questions are: 1. Should I create a carrier module? 2. Which object should I alter with the users choice so that I know when to ship it? Thanks! Link to comment Share on other sites More sharing options...
NemoPS Posted October 1, 2016 Share Posted October 1, 2016 It really depends on your needs.If you have a single carrier, just create 3 instances of it and label them as needed. If you have more, you might want to extend the cart and order objects, add a dropdown in the checkout and save it during the order process Link to comment Share on other sites More sharing options...
Premitium Posted October 3, 2016 Author Share Posted October 3, 2016 It really depends on your needs. If you have a single carrier, just create 3 instances of it and label them as needed. If you have more, you might want to extend the cart and order objects, add a dropdown in the checkout and save it during the order process NemoPS, thank you for the reply. I am going to build a new carrier for the purpose. So when I create the carrier I will have to extend the cart object too and pass the info from the carrier to the cart in order to save the users choice, right? And should I do that in the carrier module? Link to comment Share on other sites More sharing options...
NemoPS Posted October 3, 2016 Share Posted October 3, 2016 Well it's not strictly necessary to have a module, as long as you override the classes. Basically you need an ajax call on the cart, which saves the user's choice when the selection is made. I don't think you need to override the carrier object, unless the price changes depending on the user's choice 1 Link to comment Share on other sites More sharing options...
Premitium Posted October 3, 2016 Author Share Posted October 3, 2016 Thank you for the help I succeeded so far. However, one last thing that bugs me is where to hook the *.tpl file so that I can show a list of options in the carrier div. Which hook should I use? Link to comment Share on other sites More sharing options...
NemoPS Posted October 5, 2016 Share Posted October 5, 2016 You can't hook it there, I think the only solution is editing order-carrier.tplOtherwise hook to ShoppingCart and use javascript to append the div where you need 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