Posted - 09/06/2017 : 19:29:02
Oh wow, that works a treat, thanks so much Andy and Vince ------------------------------------------------ For other ECT Users who may want to add the Vacation Message to other store pages, here is the method I used. (1) Create a file named vacation-message.php containing this code: <?php $result=ect_query('SELECT onvacation,vacationmessage FROM admin WHERE adminID=1') or ect_error(); if($rs=ect_fetch_assoc($result)){ if($rs['onvacation']!=0){ print '<div class="ectwarning">' . $rs['vacationmessage'] . '</div>'; }} ?>(2) On index.php, or any other store pages whatsoever, inside <body> (and whatever div) at the exact position where you want the Vacation Message to appear (when activated), add this code: <?php include_once("vacation-message.php") ?> (3) Upload those 2 files to server and test. ------------------------------------------------ Vince, can I respectfully suggest that in the inccart.php file at Line 5809, we don't want the red inline styling code at all: print '<div class="ectwarning" style="text-align:center;font-size:1.3em;padding:16px">'; Because we can apply all the CSS styles we like to div. ectwarningAnd under Main Settings where we enter the Vacation Message, we can use whatever inline CSS styling desired there as well, like: <p style="font-size: 110%"><strong>Our store is closed for the Christmas and New Year Break</strong>.</p> <p>We will be open for business again on Monday 4th January.</p>Thanks once again for your wonderful support ! Gary
|