osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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. ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #11  
Old 02-16-2007, 08:14 AM
Lurker
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ZacFields is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12  
Old 02-16-2007, 10:29 AM
osCMax Testing Team
 
Join Date: Nov 2002
Location: Orlando
Posts: 201
Thanks: 10
Thanked 25 Times in 14 Posts
Rep Power: 7
JohnW will become famous soon enoughJohnW will become famous soon enough
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13  
Old 07-10-2007, 09:02 AM
New Member
 
Join Date: Jul 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
adamr415
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 09:08 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14  
Old 07-11-2007, 01:29 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 419
Thanks: 3
Thanked 68 Times in 64 Posts
Rep Power: 6
met00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the rough
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15  
Old 07-11-2007, 05:35 PM
New Member
 
Join Date: Jul 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
adamr415
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16  
Old 07-25-2007, 12:56 AM
Lurker
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
idanag is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17  
Old 07-25-2007, 10:43 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 419
Thanks: 3
Thanked 68 Times in 64 Posts
Rep Power: 6
met00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the rough
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18  
Old 10-09-2007, 08:10 AM
New Member
 
Join Date: Oct 2004
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
nefertari7
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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19  
Old 10-09-2007, 09:01 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 268
Thanks: 7
Thanked 21 Times in 20 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
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".
__________________
MindTwist of Twisted Reality and Twisted Tienda
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20  
Old 10-09-2007, 10:38 AM
New Member
 
Join Date: Oct 2004
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
nefertari7
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
limiting products properly in products_new ganz_friedrich osCommerce 2.2 Modification Help 0 06-10-2005 04:48 AM


All times are GMT -8. The time now is 07:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax