chrometweaks.org

How do I use iPage to build a website?

Click Here To View All Answers...


Quick question: How do I use iPage to build a website? Thanks in advance for any answer or 2. My other question... Is it possible to display new products for the month on the home page by specific category..

Simply, there are certain products that I do not want being shown on the front page..

Thanks..

Comments (158)

I would like to know the answer too. Anyone here know what is the answer to that question. I'll do some Googling and get back to you if I bump into an anything. You should email the people at iPage as they probably could give you help..

Comment #1

Thats exactly what I mean.. thank you.

The categories numbers are: cPath=32 and cPath=34_101 and cPath=34_113.

The whatsnew.php file is here:.

<?php.

/*.

$Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

If ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from "TABLE_PRODUCTS" where products_status = '1' order by products_date_added desc limit "MAX_RANDOM_SELECT_NEW)) {.

?>.

<! whats_new //>.

<tr>.

<td>.

<?php.

$random_product['products_name'] = tep_get_products_name($random_product['products_id']);.

$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);.

$info_box_contents = array();.

$info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);.

New infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW), $column_location);.

If (tep_not_null($random_product['specials_new_products_price'])) {.

$whats_new_price = '<s>'$currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']))'</s><br>';.

$whats_new_price .= '<span class="productSpecialPrice">'$currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id']))'</span>';.

} else {.

$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));.

}.

$info_box_contents = array();.

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

'text' => '<a href="'tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$random_product['products_id'])'">'tep_image(DIR_WS_IMAGES$random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)'</a><br><a href="'tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$random_product['products_id'])'">'$random_product['products_name']'</a><br>'$whats_new_price);.

New infoBox($info_box_contents, $column_location);.

?>.

</td>.

</tr>.

<! whats_new_eof //>.

<?php.

}.

?>..

Comment #2

Replace:.

If ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from "TABLE_PRODUCTS" where products_status = '1' order by products_date_added desc limit "MAX_RANDOM_SELECT_NEW)).

With:.

If ($random_product = tep_random_select("select p2c.categories_id, p.products_id, p.products_image, p.products_tax_class_id, p.products_price from "TABLE_PRODUCTS" p, "TABLE_PRODUCTS_TO_CATEGORIES" p2c where p.products_id = p2c.products_id and ((p2c.categories_id = 32) or (p2c.categories_id = 101) or (p2c.categories_id = 113)) and products_status = '1' order by products_date_added desc limit "MAX_RANDOM_SELECT_NEW))..

Comment #3

Thanks for giving it a go.....

I get this error message:.

Parse error: parse error, unexpected '}' in /home/domian/public_html/catalog/includes/boxes/whats_new.php on line 44..

Comment #4

Sorry for the delay...

OK I see this has change the What's New? box on left rather than the main New Products For May box on the Home Page..

Sorry maybe I wasnt clear.. I need the main New Products For May box on the home page to display products from certain Categories..

Hope you can help..

Comment #5

Has anyone been able to get this to work?..

Comment #6

The issue is that you posted the code for the whats_new.php for.

Yesudo.

To work on when you should have posted the file for the box that you wanted the change which is the new products box this file is in catalog/includes/modules/new_products.php.

If you post that file.

Emmett.

Will probably pop back and do an edit for you..

This post has been edited by.

241.

: 24 May 2004, 13:35..

Comment #7

I'm not Gomez so I haven't posted or not posted anything.

If the code is needed it is:..

Comment #8

Ok if you look at the code changes that.

Emmett.

Made and transfer that code change to the code that.

THX.

Has just posted then you should have what you want...

Comment #9

Hello apologise for the delay again.. I have been away on business...

This code that THX kindly written:.

Needs to replace which piece of code within catalog/includes/modules/new_products.php..

Comment #10

Seems to have been some confusion, the code I posted is the original code. I was posting this so someone could review it and post the necessary code change to allow what gomez wants to happen...

Comment #11

Featured Products Contribution.

< lets you pick what you.

Do.

Want to show on the main page..

Comment #12

Ahhh, Ive just made a contrubition.

My Contribition.

Its easy to install, and it will allow you to add a new box or delite the new products box.

Let me know what you think.

Dave..

Comment #13

Your contribution works gorn but it does not recurse the sub categories so if I select category 1 which has 5 categories beneath it all filled with products, I only get products in the root category 1 nothing from the 5 below it...

Comment #14

Hi All,.

I found this thread looking for the same thing..

I wanted to display only selected items from a particular category. I have two boxes on the homepage - e.g. 1 box for "flowers", the other for "flowerpots"..

I only wanted one of each category in each box....

The MySQL replacement statement in this thread seemed to have a few issues, but I used it with success after fixing up the ",p" and a few other bits..

On line 15 of the whats_new.php , I corrected it to read as below (my Category product number happens to be 26, so change this to whatever your category is)..

If ($random_product = tep_random_select("select products_to_categories.categories_id, products.products_id, products.products_image, products.products_tax_class_id, products.products_price from "TABLE_PRODUCTS ." , "TABLE_PRODUCTS_TO_CATEGORIES" where products.products_id = products_to_categories.products_id and products_to_categories.categories_id = 26 and products_status = '1' order by products_date_added desc limit "MAX_RANDOM_SELECT_NEW)) {.

I love Open-Source... who needs big corps. to empty your bank when we can all help each other....

Paul :.

This post has been edited by.

Atombomb.

: 23 June 2004, 10:58..

Comment #15

Is it possible to display new products for the month on the home page by specific category..

Simply, there are certain products that I do not want being shown on the front page..

Thanks..

Comment #16

If the products you want to show are only in specific categories then you can change the query in the existing new product box to only look in those cats..

Is that what you want ? .

Post the page here if it is and i'll have a look - also need the cat numbers...

Comment #17


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