Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2010
    Posts
    15
    Plugin Contributions
    0

    red flag Shipping Date Estimate Module

    Hi,

    I am looking for a Shipping "Date" estimator.

    The products that I sell online are date sensitive, if it does not reach on a perticular date it would be useless for my customers. Till now I am informing my customers on various pages that the items would reach within 5-7 days.

    Now, I was thinking of implementing some code that picks up today's date, calculates the future date and informs the customer of the final date (which is 5-6 days after today's date) when the product is estimated to reach.

    This information I was thinking of Highlighting on the final page before the customer goes to make the payment. It needs to be dynamic in nature so that the arrival dates are always calculated based on the date customer is making the purchase.

    We know it could be achieved with some JavaScript code as well but we are not that much into programming. Any code, module that know of would help.

    Thanks,
    Chris

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Shipping Date Estimate Module

    Quote Originally Posted by chris13 View Post
    I am looking for a Shipping "Date" estimator.
    You probably won't find one. This is best implemented by whatever shipping module(s) you choose to use, because one way or another the choice of shipping method is going to affect the estimated delivery date.

    Quote Originally Posted by chris13 View Post
    The products that I sell online are date sensitive, if it does not reach on a perticular date it would be useless for my customers. Till now I am informing my customers on various pages that the items would reach within 5-7 days.
    It is one thing to quote a certain date, but what if there ARE delays in delivery? How will this affect the 'date sensitive' nature of your products?

    Quote Originally Posted by chris13 View Post
    Now, I was thinking of implementing some code that picks up today's date, calculates the future date and informs the customer of the final date (which is 5-6 days after today's date) when the product is estimated to reach.
    Not the best idea, because this will always assume that the item will be mailed 'today', even if the order is placed after closing time.

    Then what of the 'future date' ? You state 5-6 days... Does this include weekends? Holidays?

    Quote Originally Posted by chris13 View Post
    This information I was thinking of Highlighting on the final page before the customer goes to make the payment. It needs to be dynamic in nature so that the arrival dates are always calculated based on the date customer is making the purchase.
    You really need to think this through a little bit more... What if customer places the order at 9pm on a Friday night... You probably won't be able to mail it until the following monday ... Will you add the 5 or 6 days from when the customer buys, or from when you mail? Now take this same order through to the conclusion, assume you quote the 5 days from the date you mail, this makes the estimated date the following Saturday, so the customer probably won't get it until the following Monday - This is a good 10 days delay from when it was ordered at 9pm on a Friday.

    Quote Originally Posted by chris13 View Post
    We know it could be achieved with some JavaScript code as well but we are not that much into programming. Any code, module that know of would help.

    Thanks,
    Chris
    The code needed to do what you are asking for is pretty simple.. There are literally hundreds of examples to be found on the 'net in regards to calculate a date/days offset from the current (or any other) date (using PHP).
    Deciding where to place this code is probably going to pose the biggest problem... but as I have (hopefully) pointed out, using this simplistic method really isn't what you want, especially if the products are time sensitive enough for this to to be a critical requirement.

    Oh, and although not useful to you (unless you are based in Australia), the 'ozpost' shipping module does do what you need (as well as taking weekends/holidays into account). I mention this just to give you confidence that what you are asking for isn't an impossible task, it is just that you probably won't find a standalone Shipping "Date" estimator because it is self defeating.

    Cheers
    Rod

  3. #3
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Shipping Date Estimate Module

    I'm looking to setup my checkout page so that the customer can see what the estimated delivery date is based on the chosen delivery method.

    It needs to take into account, time of order placed, day the order is placed, destination country.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Shipping Date Estimate Module

    Hmm... Bearing in mind the caveats above, the code to do this would first need to look up the date/time (adjusted for the shipping location), the day of week, and an array of possible destinations with associated shipping delays (perhaps a range of possible delays). Each delivery method would also have to be taken into account, making a set of ranges. That's a lot of shipping duration numbers to be figured out; I hope you have a good source for that kind of info, because if it is inaccurate, the estimator is going to cause trouble.

    Then interpret the current day/time to determine the shipping date , and see whether the min and max delays for the selected destination enter/cross a weekend and adjust if necessary. It also needs to take national holidays for different countries into account, if they will add to the time required. This may need a connection to a service of some sort that will have that kind of info for the current year. (Or you could sidestep that with a prominent notice that national holidays may extend the shipping time accordingly.)

    So not a huge amount of computation, but a lot of baseline info and correlation required.

  5. #5
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Shipping Date Estimate Module

    If we were to start with domestic delivery first, then it is easier.

    Delivery method 1 = if ordered before 17:00 hours it will be delivered next working day before 13:00 hours
    Delivery method 2 = if ordered before 17:00 hours it will be delivered within two working days
    Delivery method 3 = if ordered before 17:00 hours it will be delivered next working day before 09:00 hours

    Do you think that would be easy to do?

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Shipping Date Estimate Module

    Probably easy if you are used to working with date/time elements; otherwise will take a bit of research to find the most effective/efficient way to handle them for various purposes.

    localtime(time(), true); //gives array of time/date elements - use these to calculate modifications to date
    strftime()
    strtotime()

    $ship_date =
    if is_holiday($ship_date) {//need function to determine holiday dates, extend $ship_date accordingly

  7. #7
    Join Date
    May 2011
    Posts
    1
    Plugin Contributions
    0

    Default Re: Shipping Date Estimate Module

    Hi
    If you are still looking for code, this is what I am using in OSCmax - like zen it is a modified version of oscommerce - the code sits in the product_info.tpl.php file and looks like this:
    <tr>
    <td class="main"><i><p><b>Expected Delivery Time</b>.<p>If ordered today (<?php echo date('F jS'); ?>) the expected delivery date for this
    item is between <?php echo date('F jS', time() + (7 * 24 * 60 * 60)); ?> to <?php echo date('F jS', time() + (10 * 24 * 60 * 60)); ?></i><p>.</td>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>

    So this output gives 7 - 10 days from today - you can change those to suit your delivery times - hope this helps

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Shipping Date Estimate Module

    With the obsolete HTML changed to more up-to-date form, this would be
    PHP Code:
    <div id="deliveryEst"><h4>Expected Delivery Time.</h4>If ordered today (<?php echo date('F jS'); ?>) the expected delivery date for this
    item is between <?php echo date('F jS'time() + (24 60 60)); ?> to <?php echo date('F jS'time() + (10 24 60 60)); ?>.</div>
    Style
    #deliveryEst {}
    and
    #deliveryEst h4 {}
    as desired.

 

 

Similar Threads

  1. UPS module not calculating shipping estimate
    By bkilby in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 5 May 2010, 04:33 PM
  2. UPS module not showing in Shoppin Cart estimate shipping
    By juneym in forum Addon Shipping Modules
    Replies: 20
    Last Post: 17 Mar 2009, 06:15 PM
  3. No Shipping Estimate Quote -- writing my own shipping module
    By Relentless in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 20 Sep 2008, 04:11 AM
  4. Shipping estimate for perweightunit module
    By neteasy in forum Bug Reports
    Replies: 1
    Last Post: 20 Sep 2007, 05:32 AM
  5. Rod G's Austpost module - estimate shipping not showing?
    By caznjj in forum Addon Shipping Modules
    Replies: 0
    Last Post: 27 Apr 2007, 01:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg