Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / How to change Featured Products for the "Month Of X" to Weekly

How to change Featured Products for the "Month Of X" to Weekly

Started by htdigitals on 11 Aug 2013, 3:05 PM · Views: 517

Results 1 to 3 of 3
11 Aug 2013, 3:05 PM
#1
htdigitals avatar

htdigitals

New Zenner

Join Date:
Aug 2013
Location:
Washington
Posts:
1
Plugin Contributions:
0

Post #1 by htdigitals

Hello,

I list several products as specials or featured every week. What I would like to do is have the title for these sections reflect the date of the week selected, i.e.

Featured Products for the week of 8/11/2013, or even for Featured Products for the Week of August 11 - 18.

While it would be nice to have the time frame of the Featured Products/Specials changeable from the Admin Area (maybe it is and I missed it?) I could live with having to hard code the desired date range as in my case it will always be weekly.

Thanks for any suggestions.

11 Aug 2013, 6:43 PM
#2
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Post #2 by picaflor_azul

HTDigitals:

Hello,

I list several products as specials or featured every week. What I would like to do is have the title for these sections reflect the date of the week selected, i.e.

Featured Products for the week of 8/11/2013, or even for Featured Products for the Week of August 11 - 18.

While it would be nice to have the time frame of the Featured Products/Specials changeable from the Admin Area (maybe it is and I missed it?) I could live with having to hard code the desired date range as in my case it will always be weekly.

Thanks for any suggestions.

You could add the hard coded date range to the constant definition in includes/languages/override/english.php.

Thanks,

Anne

11 Aug 2013, 7:17 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #3 by ajeh

Not sure if this helps you build the dates that you want from the pieces and parts:

   $today = getdate();
   $weekstartdate = $today['mday'] - $today['wday'];
   $weekenddate = $today['mday'] - $today['wday']+6;
   echo 'This week: ' . $today['month'] . ' ' . $weekstartdate . ' - ' . $weekenddate . '<br>';

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!