
Originally Posted by
FuzzyBunny
Mrmech,
Awesome contribution.
Working beautifully on a 1.3.8a - with a few easy cutomisations it now works with my templates - waiting now to try and see how we go with implementing into superorders and other contributions
I'll try and post my customisations with other contributions if they actually work well enough to post!!
I have really been wanting something like this that's stable and seems fairly easy to customise also.
**** So here's the question:
I have tried in vane to try and work out the date how to turn off Saturday - Sunday is off as default - but not sure which bit of code turns it off and how!!!
Could you please advise how to turn off Saturday as well as Sunday ( or I guess any day when I understand how it works).
Thanks you very much for putting this up and your support for it.
Max
Max,
Open up tpl_checkout_shipping_default.php. This code should do the trick:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<select name="order_delivery_date">
<?php
for ($i=0, $n=50; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>0
AND strftime ("%w", $now[$i])<>6
AND strftime ("%m-%d",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%B %d %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
</fieldset>
<!-- Eof Ship Date -->
Bookmarks