osCmax v2.5 User Manual
Results 1 to 5 of 5

How to show products in first page

This is a discussion on How to show products in first page within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; Hi. I want to cancel the " new product in month...." feature on the first page and I want to ...

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


    Default How to show products in first page

    Hi.

    I want to cancel the " new product in month...." feature on the first page and I want to be able to show any product/s (multiple) on the first page.

    Can anybody tell me how to do that ?
    or..maybe how to cancel the date match on the new items in "month.."

    10x

    Idan

  2. #2
    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: How to show products in first page

    so you want every first page to load with a random selection of products?
    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

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


    Default Re: How to show products in first page

    YEs , That might work.
    Do you know how I can do that ?

  4. #4
    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: How to show products in first page

    One simple way is to use the new products, but change it so that it picks products from a random month... in this case modify the SQL

    Old SQL:
    Code:
     $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' and month(p.products_date_added) = month(now()) order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
    New SQL
    Code:
    srand(time());
    $randmonth = (rand()%12);
     $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' and month(p.products_date_added) = ".$randmonth." order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
    Then modify the /includes/languages/english/ files as necessary

    This is a simple hack, but it should do what you want. To make it a tad more complex you could

    1) load a selection of products (say 50 products by month, by random selection of the fisrt letter in the products name... whatever you want to use to make the selection totally random) into an array
    2) select MAX_DISPLAY_NEW_PRODUCTS (assume it will be under 50 ) from the array randomly and insert into another array
    3) display the second array
    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. #5
    osCMax Development Team
    Join Date
    Nov 2002
    Location
    Orlando
    Posts
    433
    Rep Power
    14


    Default Re: How to show products in first page

    You might try this contribution that uses featured products that you set in the admin section. I used it on my old OSC site before I switched to oscmax and it was a really easy contribution to load.

    osCommerce: Featured Products
    John

Similar Threads

  1. Replies: 0
    Last Post: 03-18-2007, 04:50 PM
  2. new products-link show all products, not 10 as I configure..
    By mikkvais in forum osCommerce 2.2 Discussion
    Replies: 0
    Last Post: 08-23-2005, 01:31 PM
  3. Show manufacturer's name on product page, not category page
    By kellbot in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-25-2005, 04:57 AM
  4. Show more than 10 products
    By PaintballGT in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 04-05-2005, 09:02 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
  •