Latest News: (loading..)
Sign in to follow this  
Followers 0
spooks

Product Listing Enhancements, Thumbnails & Manufacturer Headings

1,892 posts in this topic

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
Joe234 and arash.najafi like this

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

 

 

;)

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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..

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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. :)

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0