Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

products_new.tpl.php

This is a discussion on products_new.tpl.php within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I'm new to this. Had been debating between osCmax and just osC for a while, and just added stock yesterday. ...

      
  1. #11
    Lurker
    Join Date
    Feb 2007
    Posts
    2
    Rep Power
    0


    Default Re: products_new.tpl.php

    I'm new to this. Had been debating between osCmax and just osC for a while, and just added stock yesterday. I will take a look at this.. I thought I had gone through it line by line but apparantly I missed something! I will check this out.

    Zac

  2. #12
    osCMax Development Team
    Join Date
    Nov 2002
    Location
    Orlando
    Posts
    433
    Rep Power
    14


    Default Re: products_new.tpl.php

    I think you'll find that the oscMax version will be much better for you in the long run. If you go with the stock OSC cart you will probably want to include many of the contributions that Max already has. Max will save you a great deal of time but it will take longer to learn its capabilities. The time you spend learning the admin panel and reading about the contributions that are included will pay off for you long term in higher sales and less frustration.

    I just checked and it's under "maximum values" look for "new products module".
    John

  3. #13
    New Member
    Join Date
    Jul 2005
    Posts
    17
    Rep Power
    0


    Default Re: products_new.tpl.php

    If I wanted this to randomly select from the last, say 18 products entered, how would i do that
    Last edited by adamr415; 07-10-2007 at 10:08 AM.

  4. #14
    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
    21


    Default Re: products_new.tpl.php

    change the sql statement so that it does an order by date desc, then limit the selection to the last 18 records.
    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

  5. #15
    New Member
    Join Date
    Jul 2005
    Posts
    17
    Rep Power
    0


    Smile Re: products_new.tpl.php

    Quote Originally Posted by met00 View Post
    change the sql statement so that it does an order by date desc, then limit the selection to the last 18 records.
    But that will not randomize them, I want to select 18, then randomize how they show up, and show a random 6.

    Thanks for the attempt, always nice to see people care

  6. #16
    Lurker
    Join Date
    Apr 2007
    Posts
    4
    Rep Power
    0


    Default Re: products_new.tpl.php

    Hi.

    I can't find how I configure it to show more then one rule...
    After the change of the code I see only 3 products in one line.

    Please help....

    Idan

  7. #17
    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
    21


    Default Re: products_new.tpl.php

    1) load them into an array
    2) use array_rand() to return a limited number of the array items randomly

    PHP: array_rand - Manual
    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

  8. #18
    New Member
    Join Date
    Oct 2004
    Posts
    10
    Rep Power
    0


    Default Re: products_new.tpl.php

    I've searched the forums and can't locate how to restrict the total number of new products either. I think it's in this bit of code - but I don't know enough to insert the limit properly. Any help would be awesome.



    <?php
    $products_new_array = array();

    $products_new_query_raw = "select p.products_id, 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()) and year(p.products_date_added) = year(now()) order by p.products_date_added DESC, pd.products_name ";
    $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

    if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
    ?>


    [Edited to add in missing word]

  9. #19
    Active Member MindTwist's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona, Spain
    Posts
    408
    Rep Power
    7


    Default Re: products_new.tpl.php

    Not sure if this is the answer you are looking for, but if you mean how to set a maximum number of products to show as "new products", it has already been answered on this thread.

    Go to "admin / configuration / maximum values" and there you have the option "new products module".

  10. #20
    New Member
    Join Date
    Oct 2004
    Posts
    10
    Rep Power
    0


    Default Re: products_new.tpl.php

    Thanks MindTwist, but that only restricts the number of products shown per page. I'm looking to restrict them overall. Could you point me to the right thread? I've searched several times and can't find my answer.

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. limiting products properly in products_new
    By ganz_friedrich in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-10-2005, 05:48 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
  •