View Single Post
  #4  
Old 02-02-2010, 09:55 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Order today and Receive By Calculator?

Pleas make a backup of all files you are changing.



I added this


$config['date'] = '%D';
$smarty->assign('config', $config);
$smarty->assign('holDate', strtotime('+2day'));
$smarty->assign('holDateSat', strtotime('+3day'));
$smarty->assign('holDateFri', strtotime('+4 day'));

to home.php at the end right before
func_display("customer/home.tpl",$smarty);
?>




then added this to head.tpl
<b>{$lng.lbl_holiday_bar} {if $smarty.now|date_format:"%A" eq "Friday"}{$holDateFri|date_format:$config.date } {elseif $smarty.now|date_format:"%A" eq "Thursday"}{$holDateFri|date_format:$config.da te} {elseif $smarty.now|date_format:"%A" eq "Saturday"} {$holDateSat|date_format:$config.date}{else}{$holD ate|date_format:$config.date}{/if}</b>

PLEASE NOTE:there is a space in the line above that should no be there $holD ate|date_format - ^^^^^I tried to fix it but it won't go away!!!


The holiday_bar language variable is something like this.

If you purchase today, then receive by -
the rest displays the date.

You may have to play with the php to suit your date needs.

It does take into account the weekend for non business days.

If you want this to show up on static pages, cart page... etc you will need to add the php to those pages also.

I think you could add it to auth.php to get it site wide. Not sure if it's a good idea to add stuff to auth.php tho, need one of the php gurus to answer that.

Ash
__________________
xcart 5.1.2
Reply With Quote