Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Listing Enhancements, Thumbnails & Manufacturer Headings


spooks

Recommended Posts

Product Listing Enhancements, Thumbnails & Manufacturer Headings

 

This contribution is a much changed version of Product Thumbnail Listing that I started only a short while ago, but as thumbnails is now only one part I felt it should be a new contribution.

 

I was requested to make a contribution to Group Product Listing By Manufacturer with a manufacturer short description. This does exactly that based around the original product listing, so the old admin controls apply along with some new ones.

 

The thumbnails part displays products with thumbnail images in a grid layout, you define how many boxes per line plus image & box sizes. It shows the product image in a box with product name, price, short description (if you have that) & buy now or details button. This also supports Additional Images (http://addons.oscommerce.com/info/1032) If you have this it will select the medium size image if it exists.

 

The customer can switch between thumbnails & manufacturer if you set default to either. If you change default you must select a new category to reset your display.

 

Extra setting are added to admin, additionally existing settings controling the display of Product Name & Price Are Honored.

The database query used is unchanged from the original, so order you set in admin etc will apply as before.

 

The style of the display is controlled by a new entry in your css, you can set there if you wish a background image, colours, borders etc.

 

Page views are included in the package so you can see the result.

 

Written on osC2.2 rc1 with PHP5 and has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals compatible.

 

Contribution can be found at: http://addons.oscommerce.com/info/6051

Edited by spooks

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

Hi,

 

Is there a sample of this mod any where?

 

I was hoping to do this:

 

Product thumbnail

Product Title

SKU (model #)

Price

BUY NOW | MORE INFO

 

And do that 3 or 4 accross.

 

 

thanks

Sincerely

Mike

Link to comment
Share on other sites

Hi,

 

Is there a sample of this mod any where?

 

I was hoping to do this:

 

Product thumbnail

Product Title

SKU (model #)

Price

BUY NOW | MORE INFO

 

And do that 3 or 4 accross.

 

 

thanks

 

It would be an easy mod to add the SKU & have BUY NOW | MORE INFO, you can have as many across as you like.

 

Page views are in the package.

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 have a quick question.. Since i have the product thumbnail listing in my site already, should i re-write all of the files and just do a clean install of this new one, or is there an easy way to update from the product listing thumbnails to this "newer" version (even though it is a different contribution.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hi,

 

The new product_listing_setup.php will check on your existing status and update accordingly, so just replace files as neccessary & run product_listing_setup.php.

 

I had though of getting the setup to tell you what it found first, but then descided it wasnt really worth the extra effort.

 

I hope you find the Manufacturers Description bit strait forward, I installed short description yonks ago, so don't remember it well, if its awkward perhaps it needs a rewrite.

 

 

;)

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

Hi Sam,

 

This is a great mod you got here. I ran into a slight problem however,

 

I am using the thumbnail setting, and when I go to view a category the thumbnail size settings are using the product image height and width from the settings in admin/configuration/images thus making the images very big.

 

I tried changing the settings from admin/configuration/product listing but there is no affect. Any help or suggestions is greatly appreciated.

Sincerely

Mike

Link to comment
Share on other sites

Have you run the setup file?, the setting in admin/configuration/product listing is Product Listing Image Width if that doesnt exist the image will be shown full size, whatever that is, it doesnt use any other settings.

 

The listing view use the SMALL_IMAGE_WIDTH / HEIGHT setiings if set to show a image.

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 sam. I will be doing this first thing when i get home!! i hate doing ANYTHING here on my work cpu because it really is SUPER slow.. it takes 15 minutes just to download the existing file so i have a back up copy..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Have you run the setup file?, the setting in admin/configuration/product listing is Product Listing Image Width if that doesnt exist the image will be shown full size, whatever that is, it doesnt use any other settings.

 

The listing view use the SMALL_IMAGE_WIDTH / HEIGHT setiings if set to show a image.

 

Yep ran the setup but to make sure I ran it again and got this message:

Enhanced Product Listing Setup

 

Enhanced Product Listing configuration appears to be set up already. Aborted Operation.

 

 

I tried changing the setting again from the product listing end with no luck than tried adjusting the small_image_width etc... from the /config/image

Sincerely

Mike

Link to comment
Share on other sites

Not sure whats happening there, the variable used is PRODUCT_IMAGE_WIDTH if you have set this up as a constant somewhere that could cause the problem, you could try manually setting the value at the start of product_listing.php to see if that has an effect, you could also check its value is as you`ve set in admin by adding

 $to = PRODUCT_IMAGE_WIDTH; print "<script>alert('$to');</script>";

at the start of product_listing.php & see what value gets displayed in the alert is the same as you set.

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

Not sure whats happening there, the variable used is PRODUCT_IMAGE_WIDTH if you have set this up as a constant somewhere that could cause the problem, you could try manually setting the value at the start of product_listing.php to see if that has an effect, you could also check its value is as you`ve set in admin by adding
 $to = PRODUCT_IMAGE_WIDTH; print "<script>alert('$to');</script>";

at the start of product_listing.php & see what value gets displayed in the alert is the same as you set.

 

Hi Sam

 

Thanks for the hand, when I change the product image from the "image" section it changes this way but the unfortunate part is it changes the size of the thumbnail on the product_info page.

 

My best bet is probably to change it manually on the file. Could I bug you for the line this is on?

 

 

thanks a bunch

Sincerely

Mike

Link to comment
Share on other sites

Hi Sam

 

Thanks for the hand, when I change the product image from the "image" section it changes this way but the unfortunate part is it changes the size of the thumbnail on the product_info page.

 

My best bet is probably to change it manually on the file. Could I bug you for the line this is on?

 

 

thanks a bunch

 

I found a way to fix it,

 

On line 197 it was: PRODUCT_IMAGE_WIDTH so I changed it to SMALL_IMAGE_WIDTH

Sincerely

Mike

Link to comment
Share on other sites

I found a way to fix it,

 

On line 197 it was: PRODUCT_IMAGE_WIDTH so I changed it to SMALL_IMAGE_WIDTH

 

Thats a way around your problem, something must be upsettiing the PRODUCT_IMAGE_WIDTH width variable though, does it show the correct value in admin/configuration/product listing in 'Product Listing Image Width' ?

 

Its possible there`s a minor corruption in the database, I came accross this during testing & wrote the setup file to avoid it, but I suppose it could creap in now & then. If the field is corrupted you can set it, but it always returns back to NULL value, the easy way to fix is with Total Configuration http://addons.oscommerce.com/info/5040, a very easy install.

 

You open Total Configuration select product listing from drop down, select 'Product Listing Image Width' / PRODUCT_IMAGE_WIDTH then select UNLOCK then edit field then save

 

That rewites the field to the database clearing any corruption.

Edited by spooks

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

Cheers for going to the effort... should be a great contribution

 

installed and everything fine in "listing" mode

 

Ideally i want to display products in the thumbnail view, three across

 

Unfortunately when i do this my products "spill" out so they are now off the monitor and the images seem to be random sizes (basically depending on the size of the original file)

 

There is also a lot of space between colums

 

Any ideas?

 

like i said though, in "listings" mode everything is working fine and looking beautiful

Link to comment
Share on other sites

Sounds like you have a similar problem to navyhost!! Frank reported the file was corrupt when he downloaded, although it seamed OK when I tested, anyway I`ll rezip & upload again in case thats the problem.

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

Just uploaded a new version, took a long time so I hope this ones OK!!

 

Minor change, modified the code so if manufacture list is selected, but no manufacturers exist for that category, the display will revert to standard listing rather than show blank display.

 

As some poeple have had setup errors, so I`ve added a debug option, if you have any trouble, find at the start of product_listing.php

$debug = 'no'; change this to $debug = 'yes'; then report the alert message here.

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

Great contribution spooks (as always). I'm having some issues getting to work as I would like because I have graphical borders contrib installed (http://addons.oscommerce.com/info/1702).

 

Is there anyway to separate product listing into multiple tables? So each manufacturer has its own table so I can put a border around each. At the moment I have a border around the whole thing (see screen shot below).

 

Also I have problems with the column widths, as you can see from the screen shot below. How do I make the product list coluwm wider and the others narrower?

 

screen.jpg

 

Thanks. :)

Link to comment
Share on other sites

I set all the columns the same width with: width="'.(100/sizeof($column_list)) as otherwise they wont match up between manufacturers, you could force one wider with an image ie:

 

line 167:

 

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . 
$listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br><span class="short">' . $listing['short_desc'] . '</span>' : '');}

 

change to:

 

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . 
$listing['products_id']) . '"><b>' . $listing['products_name'] . '</a></b>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br><span class="short">' . $listing['short_desc'] . '</span>' : '') . '<br>'.tep_draw_separator('pixel_trans.gif', '200', '1');}

 

set the 200 to whats needed

 

For your table style:

 

line 82 after:

 

if (tep_db_num_rows($filterlist_sql)) {

 

add:

 

 	$border2 = '<table class="infoBoxManu" cellpadding="4" width="100%"><tr><td>';
$border2end = '</td></tr></table>';

 

line 87:

 

echo tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1');

 

replace with:

 

echo $border2;

 

line 223:

 

if ($rows) new productListingBox($list_box_contents); 

}   // man loop;

replace with:

 

  if ($rows) new productListingBox($list_box_contents); 
echo $border2end;
}   // man loop;

 

Then set your css with infoBoxManu class

 

Let me know how it works out.

 

B)

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

when i am trying to download this addon from http://addons.oscommerce.com/info/6051 i am getting "404 File Not Found"

 

any pointers?

 

mrrht

 

Keep trying, the server gets overloaded sometimes, I just tried & it was fine.

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 added the code for the change to table style and it seems to have worked. But I need a way of adding these bits of code ink to put a border around each table.

 

// Graphical Borders
?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr>
<?php echo mws_header(''); ?>
  <td>

<?php
// Graphical Borders - end modification

 

and the closing of the border:

 

// Graphical Borders
?>
 </td>
<?php echo mws_footer(''); ?>
 </tr>
</table>
// Graphical Borders - end modification

 

I tried adding them in the place of

echo $border2;

but that didin't work. Any ideas?

Edited by Marker
Link to comment
Share on other sites

Hello Sam,

 

Thanks for this contribution and it really makes happy to my customer. After i followed your instructions in this contribution and installed successfully. I am able to see all the thumbnails and products in grid everything.

 

The serious problem after it installed is when i am clicking my first catalogues name(DreamCatchers) in the left menu the page is redirecting to some http://daddyuniv.com/catalog/index.php/cPath/21 which is not my site website and all the catalogue names changed to that website catalogue names like The Daddy bag, The Daddy Mommy.

 

You can check the problem which is in live site by clicking www.firstalberta.com/index.php

 

Please assist me and respond immediately as if it is on live site.

 

Thanks,

Kart.

 

Product Listing Enhancements, Thumbnails & Manufacturer Headings

 

This contribution is a much changed version of Product Thumbnail Listing that I started only a short while ago, but as thumbnails is now only one part I felt it should be a new contribution.

 

I was requested to make a contribution to Group Product Listing By Manufacturer with a manufacturer short description. This does exactly that based around the original product listing, so the old admin controls apply along with some new ones.

 

The thumbnails part displays products with thumbnail images in a grid layout, you define how many boxes per line plus image & box sizes. It shows the product image in a box with product name, price, short description (if you have that) & buy now or details button. This also supports Additional Images (http://addons.oscommerce.com/info/1032) If you have this it will select the medium size image if it exists.

 

The customer can switch between thumbnails & manufacturer if you set default to either. If you change default you must select a new category to reset your display.

 

Extra setting are added to admin, additionally existing settings controling the display of Product Name & Price Are Honored.

The database query used is unchanged from the original, so order you set in admin etc will apply as before.

 

The style of the display is controlled by a new entry in your css, you can set there if you wish a background image, colours, borders etc.

 

Page views are included in the package so you can see the result.

 

Written on osC2.2 rc1 with PHP5 and has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals compatible.

 

Contribution can be found at: http://addons.oscommerce.com/info/6051

Link to comment
Share on other sites

Hello Sam/Spooks,

 

I am very much happy and i did resolved my previous posted issue as i cleared the cache in admin :lol: and now it works fine.

 

I am very grateful for your contribution and really hats off for your work.

 

Can you let me know do you have any contributions about products display list, i mean nearly 150 products for each catagory and the list is displaying in one page with a long list of pages.

 

Is it anyway to display the thumbnail list of products for 30 per page and it continues to next next pages.

 

Please assist.

 

--

Thanks,

Kart.

Link to comment
Share on other sites

Hello Sam/Spooks,

 

I am very much happy and i did resolved my previous posted issue as i cleared the cache in admin :lol: and now it works fine.

 

I am very grateful for your contribution and really hats off for your work.

 

Can you let me know do you have any contributions about products display list, i mean nearly 150 products for each catagory and the list is displaying in one page with a long list of pages.

 

Is it anyway to display the thumbnail list of products for 30 per page and it continues to next next pages.

 

Please assist.

 

--

Thanks,

Kart.

 

 

You can adjust this in admin/configuration/product _listing

Sincerely

Mike

Link to comment
Share on other sites

You can adjust this in admin/configuration/product _listing

 

 

Hello Mike,

 

Thanks for immediate response.

 

I have checked it and not able to findout where it is in admin/configuration/Product Listing . Before installing this contribution i had this option like product listing max : 20 (or something like that) and now it was not there.

 

Now i have option like "Location of Prev/Next Navigation Bar (1-top, 2-bottom, 3-both) : 1" and even this also not working and i changed 2 and 3 but no one is working in this. You can check the live site at www.firstalberta.com/index.php

 

Please assist.

 

--

Thanks,

 

Kart.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...