chrometweaks.org

Transfer domain to other hosting plan? iPage.com?

Click Here To View All Answers...


Got a quick question: Transfer domain to other hosting plan? iPage.com? Thanks for any answer. 2nd question I got is.. My "What's New" box on my oscommerce iPage site shows all of the products in my catalog, so when a customer wants to see only the new products (such as last 30 days, or whatever, they have to sort through all 1922 products instead of being able to see what's new..

Anyone know how to define what is "New"?.

Thanks in advance for your help!..

Comments (98)

Hmm... I need to find out myself. I don't know what is the answer to your question. I'll do some research and get back to you if I got an decent answer. You should email the people at iPage as they probably know..

Comment #1

There is an admin control that pics out of how many new products the box shows, but when they click the arrow to bring up products_new.php it still shows all of the products in the catalog...

Comment #2

I have this problem as well..

Anyone got a solution?.

Thanks.

Tim..

Comment #3

In products_new.php + what's new box + new_products.php - will include last two months but as you can see is configurable:.

$today = getdate();.

$temp_day = $today['mday'];.

If($temp_day <= 28).

{.

$this_day = $temp_day;.

}.

Else.

{.

$this_day = '28';.

}.

$temp_month = $today['mon'];.

If ($temp_month > 2).

{.

$this_month = $today['mon'] - 2;.

$this_year = $today['year'];.

}.

Else.

{.

$this_month = $today['mon'] + 10;.

$this_year = $today['year'] - 1;.

}.

Add the below into the where part of the query:.

And p.products_date_added > ('"$this_year"-"$this_month"-"$this_day."').

This post has been edited by.

Yesudo.com.

: 17 March 2004, 01:36..

Comment #4

Example:.

<?php.

/*.

$Id:.

Products_new.php.

,v 1.28 2003/07/13 11:08:51 project3000 Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

Require('includes/application_top.php');.

Require(DIR_WS_LANGUAGES$language'/'FILENAME_PRODUCTS_NEW);.

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW));.

?>.

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">.

<html <?php echo HTML_PARAMS; ?>>.

<head>.

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">.

<?php.

// BOF: WebMakers.com Changed: Header Tag Controller v1.0.

// Replaced by header_tags.php.

If ( file_exists(DIR_WS_INCLUDES'header_tags.php') ) {.

Require(DIR_WS_INCLUDES'header_tags.php');.

} else {.

?>.

<title><?php echo TITLE ?></title>.

<?php.

}.

// EOF: WebMakers.com Changed: Header Tag Controller v1.0.

?><base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER)DIR_WS_CATALOG; ?>">.

<link rel="stylesheet" type="text/css" href="stylesheet.css">.

</head>.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">.

<! header //>.

<?php require(DIR_WS_INCLUDES'header.php'); ?>.

<! header_eof //>.

<! body //>.

<table border="0" width="100%" cellspacing="3" cellpadding="3">.

<tr>.

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">.

<! left_navigation //>.

<?php require(DIR_WS_INCLUDES'column_left.php'); ?>.

<! left_navigation_eof //>.

</table></td>.

<! body_text //>.

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">.

<tr>.

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>.

<td class="pageHeading" align="right">.

<?php echo tep_image(DIR_WS_IMAGES'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?>.

</td>.

</tr>.

</table></td>.

</tr>.

<tr>.

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>.

</tr>.

<?php.

$today = getdate();.

$temp_day = $today['mday'];.

If($temp_day <= 28).

{.

$this_day = $temp_day;.

}.

Else.

{.

$this_day = '28';.

}.

$temp_month = $today['mon'];.

If ($temp_month > 2).

{.

$this_month = $today['mon'] - 2;.

$this_year = $today['year'] ;.

}.

Else.

{.

$this_month = $today['mon'] + 10;.

$this_year = $today['year'] - 1;.

}.

;.

$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 p.products_date_added > ('"$this_year"-"$this_month"-"$this_day."').

And pd.language_id = '"(int)$languages_id"' order by p.products_date_added desc";.

$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'))) {.

?>..

Comment #5

Yesudo.

Thanks, works a treat..

How come this isn't set up in the default OSC store though. I would have thought that you could could define the timescale for new products in admin..

Also, when I add this code to modules/new_products.php I still get the new products heading bar in index.php, even when there are no new products. Any idea how to remove this?.

Thanks.

Tim..

Comment #6

1) dunno to be honest - I expected it when I first started so was also surprised..

2) you would need to add an if clause around where the box is in index.php - if table empty don't show box - but I am not sure how you test for this. maybe someone else can advise ?

Comment #7

I have found a satisfactory solution to having empty New products boxes:.

In modules/new_products.php at line 64 (in my copy) you have:.

 new contentBox($info_box_contents);.

This can be replaced with:.

If ($info_box_contents[0][0] != '') {.

 new contentBox($info_box_contents);.

} else {.

   $info_box_contents[0][0] = array('align' => 'center',.

                                    'params' => 'class="smallText" width="33%" valign="top"',.

                                    'text' => BOX_INFORMATION_NEW_EMPTY);.

 new contentBox($info_box_contents);.

}.

Also in english.php (or other language file) add:.

//new products box.

Define ('BOX_INFORMATION_NEW_EMPTY', 'No new products in this category');.

This will still include the new products box, but if empty it will display a the defined message..

Tim..

Comment #8

Just thought, even better would be to set the timescale for new products to show to "since the last login of a given customer"..

If not logged in display products added within last 1 month or 2 months - whatever..

If logged in then display products that have been added since last login..

Anyone know how to do this. I may have a go at it when I have time..

Tim..

Comment #9

My "What's New" box on my oscommerce iPage site shows all of the products in my catalog, so when a customer wants to see only the new products (such as last 30 days, or whatever, they have to sort through all 1922 products instead of being able to see what's new..

Anyone know how to define what is "New"?.

Thanks in advance for your help!..

Comment #10

I believe there is a setting in the admin that restricts how many items should be shown...

Comment #11


This question was taken from a support group/message board and re-posted here so others can learn from it.