Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Default Specials Page

    With the way v1.3.6 is setup, one cannot have a blank Specials page.

    Note: status is auto enabled/disabled when dates are set


    Tried using EZ pages -- didn't work -- and editting the 'if >0' statements in the "tpl_specials_default.php" but could not get an 'else' statement to echo some text.


    Is there a way or setting, to always enable a blank or default Specials page?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Default Specials Page

    Not enough coffee yet ...

    What is a "blank" Special to you?

    Specials can have:

    1 beginning date

    2 ending date

    3 beginning and ending date

    4 no dates

    What is missing for your needs?
    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!

  3. #3
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Default Specials Page

    I don't know if this is what he's talking about, but this is the issue I'm having...

    I've hard coded a link to the specials page.

    If there are no specials defined, you get just a blank specials page, instead a "Specials" heading and of some sort of "there are no specials at this time" text.

    http://www.tlc.jadetrue.com/specials.html

  4. #4
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Default Specials Page

    The page is designed to just disappear if you have no specials defined.

    Jade, in your case you would need to have a conditional statement to say- sorry there are no specials at the moment. Refer to the product listing, it has a "sorry there are no products in this category".
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Default Specials Page

    I've made my own solution to this. There's probably a better way to code it, but I'm a php hacker, not an expert. Rob, I hope this was your original issue, otherwise I've terribly hijacked your thread.

    There are three files that need adjustments:

    includes/modules/pages/specials/main_template_vars.php (there's no override here, you're modifying a core file)
    includes/templates/YOUR_TEMPLATE/templates/tpl_specials_default.php
    includes/languages/YOUR_TEMPLATE/english.php

    Step 1. open includes/modules/pages/specials/main_template_vars.php

    Find:
    Code:
      $num_products_count = $specials->RecordCount();
      if ($num_products_count) {
        if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS==0 ) {
          $col_width = floor(100/$num_products_count);
        } else {
          $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
        }
    Replace with:

    Code:
      $num_products_count = $specials->RecordCount();
        if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS==0 and $num_products_count!=0) {
          $col_width = floor(100/$num_products_count);
        } else {
    	  if ($num_products_count ==0) {
    	     $col_width = 0;
    		 } else {
          $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
        }
    }

    Step 2. open up includes/templates/YOUR_TEMPLATE/templates/tpl_specials_default.php

    Find:
    Code:
    <h1 id="specialsListingHeading"><?php echo $breadcrumb->last(); ?></h1>
    Add this after:
    Code:
    <?php if ($num_products_count ==0) {
     echo TEXT_NO_SPECIALS; }?>
    Step 3. You need to add a define for the above code. Open up includes/languages/YOUR_TEMPLATE/english.php

    Add this somewhere, changing the text to your preference:
    Code:
    define('TEXT_NO_SPECIALS', 'There are currently no specials. Please check back later.');

  6. #6
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Default Specials Page

    Quote Originally Posted by Kim View Post
    The page is designed to just disappear if you have no specials defined.

    Jade, in your case you would need to have a conditional statement to say- sorry there are no specials at the moment. Refer to the product listing, it has a "sorry there are no products in this category".
    Kim, this page shows up in the site map for 1.3.6, without code to make it disappear if there are no specials defined.

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Default Specials Page

    Thank you, Jade.

    You were right on target and your modification works quite nicely.

    One minor slip-up though.
    Replace with:
    $num_products_count = $specials->RecordCount();
    if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS==0 and $num_products_count!=0) {
    $col_width = floor(100/$num_products_count);
    } else {
    if ($num_products_count ==0) {
    $col_width = 0;
    } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
    }
    }
    That last bracket was not required for it to work for me -- v1.3.6.

  8. #8
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Default Specials Page

    Quote Originally Posted by Website Rob View Post
    Thank you, Jade.

    You were right on target and your modification works quite nicely.

    One minor slip-up though.


    That last bracket was not required for it to work for me -- v1.3.6.

    Thanks Rob, you are correct.

    The replacement code for step 1 should be:
    Code:
    $num_products_count = $specials->RecordCount();
    if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS==0 and $num_products_count!=0) {
    $col_width = floor(100/$num_products_count);
    } else {
    if ($num_products_count ==0) {
    $col_width = 0;
    } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS);
    }

  9. #9
    Join Date
    May 2007
    Posts
    181
    Plugin Contributions
    0

    Default Re: Default Specials Page

    For me, this doesn't fully work if anyone can help...

    When there are no specials set, the message does come up however, when I do have a specials set, the product doesn't show. It does show in the sideboxes but nothing in the main content just as if no specials are set.

    Can anyone shed some light on this?

  10. #10
    Join Date
    Jan 2005
    Location
    USA, St. Louis
    Posts
    3,710
    Plugin Contributions
    9

    Default Re: Default Specials Page

    Quote Originally Posted by nrg77 View Post
    For me, this doesn't fully work if anyone can help...

    When there are no specials set, the message does come up however, when I do have a specials set, the product doesn't show. It does show in the sideboxes but nothing in the main content just as if no specials are set.

    Can anyone shed some light on this?
    Did you see the correction to the code one step above?

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v139h Catalog / Specials Page, How to change the number of specials displayed
    By lynbor in forum Customization from the Admin
    Replies: 2
    Last Post: 12 Jun 2015, 07:19 PM
  2. specials page is not displaying items that were set to be specials
    By mayleine in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Dec 2010, 12:49 PM
  3. Specials sidebox not showing at Specials page
    By JuanDBB in forum Basic Configuration
    Replies: 2
    Last Post: 15 Mar 2009, 04:59 PM

Posting Permissions

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