Jump to content

Supposed delivery date on product page


Recommended Posts

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. Algorithm

Basically 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 - Wednesday

0 - 11am SPD is today+1
11am - 0 SPD is today+2

Thursday
0 - 11am SPD is today+1
11am - 0 SPD is today+4 (monday) - will be shipped on friday

Friday
0 - 11am SPD is today+3 (monday)
11 - 0 SPD is today + 4(tuesday) - will be shipped on monday

Saturday
0 - 0 SPD is today + 3(tuesday)

Sunday
0 - 0 SPD is today + 2(tuesday)

2. Implementation

In 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.

  • Like 1
Link to comment
Share on other sites

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

  • 6 months later...

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

  • 3 years later...

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

  • 3 weeks later...

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

  • 1 month later...
×
×
  • Create New...