Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,277
    Plugin Contributions
    0

    Default adding a message to special section

    hello.
    As part of navigation , i am adding Specials link to my nav. Problem is that , if there are no specials , center box is empty . i like to add a message saying something like sorry there are no special today. bla bla.

    i like to know how i can do that .

    Thanks.

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,277
    Plugin Contributions
    0

    Default Re: adding a message to special section

    any advice ??

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: adding a message to special section

    If you look how the Categories sidebox manages this, you should be able to adapt the code for what you are doing ...
    Code:
        if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
          if ($show_this->RecordCount() > 0) {
            $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
          }
        }
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  4. #4
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,277
    Plugin Contributions
    0

    Default Re: adding a message to special section

    Thank for the pointer . will try to make it work from here on . :)

  5. #5
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,277
    Plugin Contributions
    0

    Default Re: adding a message to special section

    i failed .. codes are not my thing . anyone with more straight forward code to solve this problem ?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: adding a message to special section

    You may need to adjust this but see if it helps:
    Code:
    <?php
    // bof: specials link
          $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
          if ($show_this->RecordCount() > 0) {
            echo '<li><a href="' . zen_href_link(FILENAME_SPECIALS) . '">' . 'Specials' . '</a>' . '</li>';
          }
    // eof: specials link
    ?>
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    20,981
    Plugin Contributions
    25

    Default Re: adding a message to special section

    To give a message in the specials page if empty
    PHP Code:
          $show_this $db->Execute("select s.products_id from " TABLE_SPECIALS " s where s.status= 1 limit 1");
          if (
    $show_this->RecordCount() !> 0) {

            echo 
    'There are no specials today.';

          } 
    Last edited by gjh42; 18 Feb 2012 at 02:04 AM.

  8. #8
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,277
    Plugin Contributions
    0

    Default Re: adding a message to special section

    Thank you both . I am kinda confused .. where is that code ? do i need to add it to a page ? which page and where exactly . .

    sorry , to much drug in my system and I cANT tHINK Straight .. really

 

 

Similar Threads

  1. Product Special Order message error
    By RobertG in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 6 Nov 2010, 05:36 PM
  2. Caution message in my Admin section
    By trnghosh in forum Basic Configuration
    Replies: 2
    Last Post: 29 Aug 2010, 08:32 AM
  3. New installation error message trying to access admin section
    By flipfloptreasures in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 25 Apr 2008, 04:51 AM
  4. adding new section on homepage -
    By keylesslocks in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Jan 2008, 06:46 PM

Bookmarks

Posting Permissions

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