osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

"new products for %s" appears twice if no new products

This is a discussion on "new products for %s" appears twice if no new products within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Bags & Can Liners : G and F Supply I can't say I know where to look, considering that <a ...

      
  1. #1
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default "new products for %s" appears twice if no new products

    Bags & Can Liners : G and F Supply

    I can't say I know where to look, considering that
    <a class="headerNavigation"
    does not appear anywhere in my code.

  2. #2
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: "new products for %s" appears twice if no new products

    If I take out the following line from new_products.php, both appearances of "new products for %s" disappear:
    $box_content[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '" class="headerNavigation">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B') . '</a>'));

    The html output for the appearances are:

    <td width="100%" height="14" class="infoBoxHeading"><a class="headerNavigation" href="http://gandfsupply.com/catalog/products_new.php">New Products For January</a></td>

    <table width="100%" cellspacing="0" cellpadding="4" border="0" class="infoBoxContents">
    <tbody><tr>
    <td align="left"><a class="headerNavigation" href="http://gandfsupply.com/catalog/products_new.php">New Products For January</a></td>
    </tr>
    </tbody></table>

  3. #3
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Post Re: "new products for %s" appears twice if no new products

    Suggest you look up the wiki for how to use BTS and template switching.
    Then see if the fallback template exhibits the same issue.
    We should have a dedicated page during install that says:

    DO NOT MODIFY FALLBACK

    Something to fall back on Synonyms, Something to fall back on Antonyms | Thesaurus.com
    It may then sink in why it is called fallback.

    Last edited by ridexbuilder; 01-30-2011 at 12:44 AM.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  4. #4
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    indiana
    Posts
    640
    Blog Entries
    1
    Rep Power
    27


    Default Re: "new products for %s" appears twice if no new products

    Perhaps the fallback modification issue can be "dramatically" reduced by saying that on the download page for oscmax. "Make a renamed copy of fallback, but don't modify the original fallback directory." Also for ridexbuilder sake, so the man does not go out of his mind

  5. #5
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Default Re: "new products for %s" appears twice if no new products


    Maybe need to be more subtle. Don't modify fallback, d'uh
    Hosting plans with installation, configuration, contributions, support and maintenance.

  6. #6
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    26


    Default Re: "new products for %s" appears twice if no new products

    During installation...

    it has a button that says

    http://isg.theverybestdeal.com/dmf.php <<<<-------- click here for a very important message from the oscMax Development Team.
    Last edited by met00; 01-30-2011 at 01:20 PM.
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  7. #7
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Post Re: "new products for %s" appears twice if no new products

    Poor mraeryceos
    Comes here for a spot of advice and gets a from us zimmer posters.



    [I know, I know, I started it. ]
    Last edited by ridexbuilder; 01-30-2011 at 02:05 PM.
    Hosting plans with installation, configuration, contributions, support and maintenance.

  8. #8
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: "new products for %s" appears twice if no new products

    We could always hide it somewhere else! Perhaps, moving fallback back into the catalog root might stop people from fiddling with it.

    Regards,
    pgmarshall
    _______________________________

  9. #9
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: "new products for %s" appears twice if no new products

    The action happens in includes/classes/boxes.php

  10. #10
    New Member
    Join Date
    Jan 2011
    Posts
    19
    Rep Power
    0


    Default Re: "new products for %s" appears twice if no new products

    At the top of includes/modules/new_products.php I replaced some code with:
    Code:
      $products_new_query_raw = "select p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and month(p.products_date_added) = month(now()) order by p.products_date_added DESC, pd.products_name";
      $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);
      $products_new_query = tep_db_query($products_new_split->sql_query);
      $no_of_products_new = tep_db_num_rows($products_new_query);
      if ($no_of_products_new > 0) {
         $boxy_content = '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '" class="headerNavigation">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B') . '</a>');
         echo '<img width="100%" height="10" border="0" alt="" src="images/pixel_trans.gif">' . $boxy_content;
      }
    The trick was to have an array other than $box_content, because I think it gets used again further on.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 09-29-2008, 09:00 AM
  2. Replies: 0
    Last Post: 09-24-2008, 11:00 AM
  3. Replies: 0
    Last Post: 09-22-2008, 11:00 AM
  4. Replies: 0
    Last Post: 09-21-2008, 01:53 AM
  5. need products to display on products.php not index.php, products not displaying below
    By libraschld in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 09-20-2008, 02:40 AM

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
  •