Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change product listing order?


Recommended Posts

Hello all,

I actually have a few questions regarding product attributes..

 

First, I noticed when I add a new product it's listed at the bottom of that category listing page. So the older products are at the top of the page, and the newly added are at the bottom. I'd like to know how to reverse this order..

 

Second, is it possible to have the products listed in rows (3) and columns (3) without the name and prices? I would like to have it sort of look like a gallery layout and when a pic is clicked, the shopper is then taken to the description/price.

 

And lastly, on the product info pages, is there a way to make the thumbnail larger (about 300x300)? I want to do this without changing the thumbnail sizes of the product listing pics..

 

I know I'm asking a lot LOL ..any help is much appreciated!!! thanks!

Link to comment
Share on other sites

First, I noticed when I add a new product it's listed at the bottom of that category listing page. So the older products are at the top of the page, and the newly added are at the bottom. I'd like to know how to reverse this order..

 

I delt with that in this thread Products http://www.oscommerce.com/forums/index.php?sho...=306310&hl=

 

NB to reverse order add DESC

 

Second, is it possible to have the products listed in rows (3) and columns (3) without the name and prices? I would like to have it sort of look like a gallery layout and when a pic is clicked, the shopper is then taken to the description/price.

 

I`ve done a contrib that might suit Product Thumbnail Listing http://addons.oscommerce.com/info/6027

 

And lastly, on the product info pages, is there a way to make the thumbnail larger (about 300x300)? I want to do this without changing the thumbnail sizes of the product listing pics..

 

Size is set by altering SMALL_IMAGE_WIDTH & SMALL_IMAGE_HEIGHT

 

Or you can idet the file directly

 

Around 120:

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

Change SMALL_IMAGE_WIDTH to 300, and SMALL_IMAGE_HEIGHT to '' so the browser can set corrrectly & you don't mess the ratio

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

thanks so much for your help sam! ..i've managed to fix my first problem, and i'm going to give your addon a try ;) however, i still cant figure out the last problem. I've changed the SMALL_IMAGE_WIDTH & SMALL_IMAGE_HEIGHT but then I get an error when using the " for the image height. So I tried using a number and then i was back to square one.. still a small thumbnail. i'm supposed to be editing product_info.php, right?

Link to comment
Share on other sites

thanks so much for your help sam! ..i've managed to fix my first problem, and i'm going to give your addon a try ;) however, i still cant figure out the last problem. I've changed the SMALL_IMAGE_WIDTH & SMALL_IMAGE_HEIGHT but then I get an error when using the " for the image height. So I tried using a number and then i was back to square one.. still a small thumbnail. i'm supposed to be editing product_info.php, right?

 

Yes its product_info.php, but your using the wrong quote marks, your using a single double quote: " it should be two single quotes ''

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Ah I see.. thanks! Ok one last thing.. promise LOL I've installed the contrib and now the products aren't listed in the order I've set in index.php.. i dont see where the coding for this is in the modules/product_listing.php file. So i solved one issue while bringing back another LOL :) Any help is much appreciated.. thanks so much!

Link to comment
Share on other sites

Ah I see.. thanks! Ok one last thing.. promise LOL I've installed the contrib and now the products aren't listed in the order I've set in index.php.. i dont see where the coding for this is in the modules/product_listing.php file. So i solved one issue while bringing back another LOL :) Any help is much appreciated.. thanks so much!

 

Thats add, the new product_listing.php uses the same query as the old, can you say exactly what mod you did and if you have product name enabled.

 

What do you see if you set in admin to use the old style listing.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I do not have the product name enabled.. just the pictures.. no prices or anything. I did exactly what the directions in the addon instructed, starting with uploading the new product_listing.php. Since the script that calls for the listing order is in the index.php, I'm not sure if this caused the error, after I've added:

 

case 'PRODUCT_LIST_WEIGHT':
         $select_column_list .= 'p.products_weight, ';
         break;
     }
   }

add:

$select_column_list .= 'p.products_image, ';

or if you have the short desciption mod add:

$select_column_list .= 'p.products_image, pd.short_desc, ';

 

In the admin panel, I don't see the option to set back to the old listing style, only a different "list" view ?? lmk if you need more info than this... thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...