dreamworker Posted June 2, 2010 Share Posted June 2, 2010 I would like to display supposed delivery date(SPD) on product page. It should display supposed delivery date if the order is made right now (displaying: you can have this product at home on --date--)I have some experience with php and mysql, so programming is not a problem, but i need some hints how to start.My idea is first creating algorithm to display correct SPD based on current date and day of the week. And second implement this to product template(and php files).1. AlgorithmBasically our business rule is like this:We ship from monday to friday, orders made until 11am are shipped the same day, then it takes one day for shipping(exluding weekends - friday shipped are delivered on monday).I think timeframes should be created based on day of the week and current time:Monday - Wednesday0 - 11am SPD is today+111am - 0 SPD is today+2Thursday0 - 11am SPD is today+111am - 0 SPD is today+4 (monday) - will be shipped on fridayFriday0 - 11am SPD is today+3 (monday)11 - 0 SPD is today + 4(tuesday) - will be shipped on mondaySaturday0 - 0 SPD is today + 3(tuesday)Sunday0 - 0 SPD is today + 2(tuesday)2. ImplementationIn product.php there should be implemented this algorithm and result of the algorithm(date) would be stored in new smarty variable.Then new variable would be displayed in product.tpl template, displaying correct SPD.What do you think about this idea?Do you have hints for creating PHP code for the algorithm? Anyone experienced with PHP datetime functions that could be used?Let s try to accomplish this. And make the code available for everyone to use. 1 Link to comment Share on other sites More sharing options...
airbag Posted June 3, 2010 Share Posted June 3, 2010 Hello, yes good idea.I just use the "Availability Field" to show a text string for delivery date. This is a standard field in the products page.What would be nice would be for this field to be a drop down select box, rather than text.. this way you can define the options somewhere, and then simply select it on the product page.Maybe you could make a module to do as you say above? Link to comment Share on other sites More sharing options...
tomerg3 Posted June 3, 2010 Share Posted June 3, 2010 In the next version of my Attribute Wizard Pro (found on my site) there will be an option to add a date picker as an attribute.Not sure exactly when it will be ready, probably 1-2 months. Link to comment Share on other sites More sharing options...
PoSSeK Posted December 10, 2010 Share Posted December 10, 2010 Hello!Does anybody know if there is a module displaying the delivery date, just like dreamworker says?It is used in Amazon.com for example, displaying the text: "Want it delivered Monday, December 13?Order it in the next 14 hours and 19 minutes, and choose One-Day Shipping at checkout.Details "Thanks and best regards Link to comment Share on other sites More sharing options...
SkyHiRider Posted December 21, 2013 Share Posted December 21, 2013 I'm reviving this thread as I also need a similar module - instead of showing the number of products in my warehouse prestashop should display the expected delivery time of the product. If I have the product in stock then the delivery should displayed as tomorrows date (if the order was made before 14:00) or Tuesday if the order was made after 14:00 on Friday. Link to comment Share on other sites More sharing options...
letrof Posted January 8, 2014 Share Posted January 8, 2014 I need that kind of module to. I'm really surprised that there is none. And just to be clear - It's about displaying a message: "Delivery tomorrow", "Delivery day after tomorrow" depending on current hour and day. There are a lot of modules that gives you an option of picking particular date, but it's not what we need. Can someone make that kind of module? Link to comment Share on other sites More sharing options...
Lucif Posted February 22, 2014 Share Posted February 22, 2014 I need this to! I hope there is someone who can make this for us! Link to comment Share on other sites More sharing options...
Recommended Posts