Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product listing on the homepage.


ely2c

Recommended Posts

Hi everyone,

 

I'm setting up a store that has only about 10 - 15 products max.

 

I don't have any categories or subcategories....

 

My question is How do I display the product listing on the home page and remove the "New Product for..." box?

 

Any help is much appreciated.

 

Cheers,

 

e

Link to comment
Share on other sites

Here's how you can remove the new product listing.

 

(1) Open up your catalog/index.php page.

 

(2) Somewhere in there (lines 80-130, somewhere; can't tell on mine 'cause I have so many contributions), you will see a snippet oif code that looks like this:

 

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); */ ?></td>

</tr>

 

Change it to this:

 

<tr>

<td><?php // include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); */ ?></td>

</tr>

 

(3) Save your file and upload it to the proper directory on your server, and those new products won't display anymore.

 

Regarding listing your products on your home page, I would just go to the Admin tool (www.yoursite.com/catalog/index/admin, or something like that) and then go to "languages" (under "localization"). Then highlight your default language (probably English), and click "details". Then click "index.php". There, you can do whatever you want. On that page, put something like this:

 

define('TEXT_MAIN', '

Put a little bit of text here if you'd like, like your company theme or motto, or whatever.<br>

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

<tr>

<td width="33%"><a href="link-to-product-1">Product 1<br>

<img src="catalog/images/product1.jpg">>/a></td>

<td width="33%"><a href="link-to-product-2">Product 1<br>

<img src="catalog/images/product2.jpg">>/a></td>

<td width="33%"><a href="link-to-product-3">Product 1<br>

<img src="catalog/images/product3.jpg">>/a></td>

</tr>

<tr>

<td width="33%"><a href="link-to-product-4">Product 1<br>

<img src="catalog/images/product4.jpg">>/a></td>

<td width="33%"><a href="link-to-product-5">Product 1<br>

<img src="catalog/images/product5.jpg">>/a></td>

<td width="33%"><a href="link-to-product-6">Product 1<br>

<img src="catalog/images/product6.jpg">>/a></td>

</tr>

<tr>

<td width="33%"><a href="link-to-product-7">Product 1<br>

<img src="catalog/images/product7.jpg">>/a></td>

<td width="33%"><a href="link-to-product-8">Product 1<br>

<img src="catalog/images/product8.jpg">>/a></td>

<td width="33%"><a href="link-to-product-9">Product 1<br>

<img src="catalog/images/product9.jpg">>/a></td>

</tr>

</table>

 

 

');

 

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

etc., etc., ....

 

Good luck. Hope this helped.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

I had my a tag pointing the wrong wya, but I figured you knew html, so that wouldn't be an issue. Anyway, you have to make the links and img's the way your site was designed. AND you have to upload your images to the catalog/images directory if you haven't uploaded them from your hard drive by adding them as products yet.

 

So you just have to use common sense, based on your own website intricacies. For instance, a snippet of code might look like this:

 

Instead of:

<td width="33%"><a href="link-to-product-2">Product 1<br>

<img src="catalog/images/product2.jpg">>/a></td>

 

You might have:

<td width="33%"><a href="catalog/product_info.php?cPath=5&products_id=24">Product 2<br>

<img src="catalog/images/product2.jpg">>/a></td>

 

And you would have to upload the image to your catalog/images directory if you haven't already done so by adding the product through the admin. But if you have a path to a product, I'm assuming you uploaded the image when you created the product in your admin, originally.

 

Every product has a ctegory path and a product ID. Your cpath is your category path, and your product ID is what it is. Go into your ADMIN tool -- http://www.yourwebsite.com/catalog/admin, or something like that, and click on "catalog". Hover your mouse over the yellow folder where your categories are listed, and note the cpath in your browser window. When you double click the category, do the same thing with the product to get the product ID. Make a note of the cpath and product ID, and construct your link as I mentioned above, in index.php within your admin / localization / languages / english / details section of your admin.

 

That's about all I can say; I hope this was clear to you and it helps.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

geez; made the same mistake again:

 

<td width="33%"><a href="catalog/product_info.php?cPath=5&products_id=24">Product 2<br>

<img src="catalog/images/product2.jpg"></a></td>

 

There. Make your links like that, or similar to them (if you want 3 columns of products displayed on the index page)

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

Hi Jason,

 

Thanks heaps for your help. I've managed to remove the "new products .." box.

 

What I didn't want to do though was to hand code the product listing.

 

I've already inserted the products into the system so i'd like to have it displayed dynamically,

just like how it normally displays when when you click on a category for example and it lists all the products under that category...

 

In this case though, I don't have any categories so I just want the products listed on the shop homepage..

 

Hope this makes sense.

 

Cheers,

 

e

Link to comment
Share on other sites

geez; made the same mistake again:

 

<td width="33%"><a href="catalog/product_info.php?cPath=5&products_id=24">Product 2<br>

<img src="catalog/images/product2.jpg"></a></td>

 

There. Make your links like that, or similar to them (if you want 3 columns of products displayed on the index page)

 

This will not keep the sessions.

 

they need to be like this -( or similar)

 

'<a href="' . tep_href_link(FILENAME_ALL_PRODUCTS) . '">

 

with the tep_href_link

Link to comment
Share on other sites

Yeah, if he wants ALL his products listed on the home page, that'll work. What if he has 100 products? I think that's what he's trying to figure out. But then he says he has no categories. I guess maybe he does wanna list all_products on the home page.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

'<a href="' . tep_href_link(FILENAME_ALL_PRODUCTS) . '">

 

 

the link name i put as an example is irrelevant

 

i posted that to show how to do href links in stores that will keep the sessions, doing a standard a href link will loose sessions for most stores

Link to comment
Share on other sites

I want to list all the products and I want to keep the sessions also.

 

So is there a way to do this without having to handcode the table with links to the products?

 

I just want to list it just like it would if it were in a category. know what I mean?

Link to comment
Share on other sites

See here..... http://www.solis.com.au/katies/index.php?cPath=21

 

At the moment I've just placed the products under a category called Products. When I click on the Products category I get this product list. Now if I go back to the main page by clicking on Catalogue, I get an empty page..

 

So I want this product listing on the main page. No categories needed.

 

 

Cheers,

 

e

Link to comment
Share on other sites

The file controlling the product display is the same as the home page. Kinda sucks, but you can get around it. Catalog/index.php renders the HTML code that you see dynamically, that means it changes depending on the category links you click on. Somehow you have to change it to not look for categories, but to look for top level products. But why not look for a way around it?

 

How about just renaming your new products box to whatever you want.

 

Then go to your catalog/includes/languages/english/index.php page and remove all the junk, so there's just a little text to define.

 

Then go to ADMIN tool -- yoursite.com/catalog/admin, yoursite.com/admin, whatever, and play with the configuration/maximum values there. That way, you can make it 10 or 20 products big; whatever you want.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

yeah, i was kinda thinking that before... kind of a dirty hack.

 

but it still wouldn't list the products the way is should.. like having it in rows with 'buy now' button and price and so on.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...