How can I change the product availability message based upon the day that the customer is viewing (or ordering) the product?

Day of order : Will ship in X # of days

Sunday : 2

Monday : 1

Tuesday (before 10am) : 0

Tuesday (after 10am) : 2

Wednesday : 1

Thursday (before 10am) : 0

Thursday (after 10am) : 5

Friday : 4

Saturday : 3

1 Answer 1


Why not create a new module with a helper that uses http://php.net/manual/en/function.getdate.php

You have your logic listed above maybe write a switch statement that outputs your delivery message and the number of days is determined from the output if the switch statement.

Then its just a case of calling this helper function in your themes availability template file to output your delivery message.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.