Jump to content
Latest News: (loading..)
Sign in to follow this  
spooks

Product Listing Enhancements, Thumbnails & Manufacturer Headings

Recommended Posts

I assume that the thumbnails function to for the thumbnails view of product_listing. Is it possible to strip all of the thumbmail code out ? I don't require a thumbail view All I want is manufactuer list with graphical boarders.

 

 

Yes just remove the function entirely and to be safe change the line (291):

 

'text' => thumbnail($products, '',$column_list,$border,$borderend,$PHP_SELF));

 

To:

 

'text' => '';


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.

Share this post


Link to post
Share on other sites
Yes just remove the function entirely and to be safe change the line (291):

 

'text' => thumbnail($products, '',$column_list,$border,$borderend,$PHP_SELF));

 

To:

 

'text' => '';

 

 

That didn't work. But I've found somethig that does!! I removed the debug script (I think its the debug script) from the top of the file and it WORKS!!! I removed this:

 

$debug = 'no'; // set to 'yes' if there are any problems & report alert message in the forum.

$graphic_bord = 'no'; //  set to 'yes' if you have older 'graphic borders' and not 'easy graphic borders'.

$to='';
if ($debug == 'yes') {
error_reporting(E_ALL & ~E_NOTICE);
if (PRODUCT_THUMBNAIL_VIEW == 'PRODUCT_THUMBNAIL_VIEW') $to = 'PRODUCT_THUMBNAIL_VIEW not set\n';
if (PRODUCT_SHORT_DESC == 'PRODUCT_SHORT_DESC') $to .= 'PRODUCT_SHORT_DESC not set\n';
if (MANU_DESCRIPTION == 'MANU_DESCRIPTION') $to .= 'MANU_DESCRIPTION not set\n'; 
if (PRODUCT_IMAGE_WIDTH == 'PRODUCT_IMAGE_WIDTH') $to .= 'PRODUCT_IMAGE_WIDTH not set\n'; 
if (LISTING_BUTTON == 'LISTING_BUTTON') $to .= 'LISTING_BUTTON not set\n'; 
if (LISTING_HEADINGS == 'LISTING_HEADINGS') $to .= 'LISTING_HEADINGS not set\n'; 
$to .= 'PRODUCT_IMAGE_WIDTH set to: '.PRODUCT_IMAGE_WIDTH;
$to .= '\nPRODUCTS_PER_ROW set to: '.PRODUCTS_PER_ROW;
$to .= '\nPRODUCT_PRICE_SIZE set to: '.PRODUCT_PRICE_SIZE;
$to .= '\nPRODUCT_LIST_HEIGHT set to: '.PRODUCT_LIST_HEIGHT;
$to .= '\nPRODUCT_LIST_WIDTH set to: '.PRODUCT_LIST_WIDTH;

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

 }

 

now it all works flawlessly, search works and spilt page results. Thanks for all or time and patience spooks I really appreciate it. Although I’ll probably be asking more questions very soon as I've now got to add qty boxes to product listing and lots of other stuff. Thanks again.

Share this post


Link to post
Share on other sites

Me again :rolleyes:

 

I have qty boxes on my product listing and I'm trying to put an add to cart button at the begining middle (inbetween the info boxes) and end of the manufactuer listing view. Where what I have added and where:

 

while ($manufacturer = tep_db_fetch_array($filterlist_sql)) { 
			echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);	
			$info_box_heading = array();

and here:

 

if ($rows) new productListingBox($list_box_contents); 
echo $border2end . tep_draw_separator('pixel_trans.gif', '100%', '4');
echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

 

The result of this is one button at the begining and end (great) but two buttons in the middle (not so great). Also How do I align the buttons to the right hand side?

 

Thanks.

 

One more thing is how do remove the <big> tags from the following code without it crashing the whole thing? I want the heading to be normal size.

 

$info_box_heading[0] = array('text' => '<big>'.$manufacturer['manufacturers_name'].'</big><br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : ''));

Share this post


Link to post
Share on other sites
Me again :rolleyes:

 

I have qty boxes on my product listing and I'm trying to put an add to cart button at the begining middle (inbetween the info boxes) and end of the manufactuer listing view. Where what I have added and where:

 

while ($manufacturer = tep_db_fetch_array($filterlist_sql)) { 
			echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);	
			$info_box_heading = array();

and here:

 

if ($rows) new productListingBox($list_box_contents); 
echo $border2end . tep_draw_separator('pixel_trans.gif', '100%', '4');
echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

 

The result of this is one button at the begining and end (great) but two buttons in the middle (not so great). Also How do I align the buttons to the right hand side?

 

Thanks.

 

One more thing is how do remove the <big> tags from the following code without it crashing the whole thing? I want the heading to be normal size.

 

$info_box_heading[0] = array('text' => '<big>'.$manufacturer['manufacturers_name'].'</big><br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : ''));

 

If you move your first echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

to before the while, that should solve your double,

 

Just delete the big tags, wont upset anything


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.

Share this post


Link to post
Share on other sites
Great, looking good now. How do I align the buttons to teh right hand side though?

 

 

Just put

 

echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align="right"');

 

;)


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.

Share this post


Link to post
Share on other sites

Great contribution Sam/spooks !!!

 

I have installed the 1.4 vesion and have it working on my site. I have turn off price display right at the moment.

 

I am currently using the contribution 'separate_price_421a' and base on the login the user gets a different prices. When I select add to cart the price is correct in the cart and everything is good.

 

Which query do I need to change so that I can display pricing on the product_listing.php page.

 

A bit of infomation on separate price cont.

The user logs in and gets a group ID assigned that ID is in the database called product_groups

Fields in DB are

customer_group_id --- Assign to all users

customers_group_price --- the product price

product_id --- the product

 

Any help would greatly be appreciated in modifiying the queries !

 

// Larry

Share this post


Link to post
Share on other sites

The only query in this is to find manufaturers for applied category, the main query used is as defined in index.php & is unchanged, so you need to make your mods there.


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.

Share this post


Link to post
Share on other sites

Hi Spooks,

 

Currently I have Product Listing in Columns 2.2.7 installed, but I need a bit more control over the layout. For example I can have 3 or 4 columns no problem, but I would like them aligned centrally including the product name underneath. From what I have seen and read this should easily be achievable in Product Listing Enhancements, Thumbnails & Manufacturer Headings V1.4?

 

At the moment my product listings look like this: -

 

before.gif

 

And I'm looking for something like this: -

 

after.gif

 

I am also looking to get rid of the category links above the images as the don't really serve any purpose and I'm guessing that should be fairly straight forward.

 

The main question is do I have to uninstall Product Listing in Columns 2.2.7 first?

 

Oh, in case it's relevant - yes this is my first venture into osCommerce! I'm using 2.2 RC2 with the latest version of STS

 

Many thanks

Share this post


Link to post
Share on other sites

I have been trying all morning to download this and its url is 'not found' is it down for updates or is it just me LOL


Heather...

 

icon_baby_crawl-1.gifCrawling my way through pages of code with my fingers crossed and one eye on here. Grateful to many at the osCommerce Community. Thank YOU

 

Coding successes: GV & Coupons, UltraPics, FCK Editor, Product Listings Enhancement, Short Descriptions, Define Main Page, Text Box, Attribute Sets Plus, . PayPal WPP. UL Catagories. Dynamenu. Featured Products. Mailist Report 1.2. Easy Meta Tags (Now even I could have screwed that up) Sold Out but Displayed 0.3. Club osc Specials on Front Page. Order Editor. HTML Emails V2

Working on: SEO

 

 

Proud member of the Code Breakers Club

Share this post


Link to post
Share on other sites

Hi. Great Contrib if it would work.... :/

Older Version worked for me. When i want to include the versions since 4. Juli (v1.2) my shop just always says the folooing instead of displaying anything

 

Fatal error: Cannot use string offset as an array in /var/www/vhosts/*****/httpdocs/includes/functions/database.php on line 56

Share this post


Link to post
Share on other sites

Did you run the new setup with the latest version?


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.

Share this post


Link to post
Share on other sites

I cant be certain about 2.2.7 as I`ve never tried it, but as this mainly just replaces product_listings.php that should'nt be a problem.

 

I`m not sure how it may react with your template though.

 

If you make sure you backup your existing product_listings.php you can easily revert, as it wont affect anything else.


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.

Share this post


Link to post
Share on other sites

OK, sort of answered my own qustion! I tried an install over the top of Product Listing in Columns 2.2.7 which seemed to work, and I got the new options in the Configuration/Product Listing

 

However, the options did not change anything, but the options for Product Listing in Columns 2.2.7 did amend the layout

 

So, after a restore of mySQL and osC files I reinstalled Product Listing Enhancements, Thumbnails & Manufacturer Headings V1.4 and things looked good...until I clicked on a category and received multiple (the number of products in the category) errors: -

 

Warning: Division by zero in \includes\modules\product_listing_col.php on line 140

 

and 1 error: -

 

Warning: Division by zero in \includes\modules\product_listing_col.php on line 329

 

I double checked that the SQL import worked and I had made the correct changes (as far as I can see)

 

However, in response to another thread I found that a change to line 24 in 'includes/modules/product_listing_col.php' as follows works: -

 

if (PRODUCT_LIST_NUMCOL == 0) {

 

Not sure why and don't have time to find out. When I have finished 'playing' and learning I will do a completely fresh install of 2.2rc2a and Product Listing Enhancements, Thumbnails & Manufacturer Headings V1.4

Share this post


Link to post
Share on other sites

Sam/Spooks ...

 

the only change in the index.php file was the following below, and it has nothing to do with the product_group DB. The code listed below was in the contribution for Product Listing Enhance.

 

I have look for where the data would be coming from in the index file and having no luck. Any help in resolving this would be greatly appreciated !!!

 

Thanks in advance.

 

*******************************************

Open index.php

Around 170 after:

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

if you have the short desciption mod add:

$select_column_list .= 'pd.short_desc, ';

Around 252 find:

	echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);

replace with:

	echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']).(isset($_GET['list']) ? tep_draw_hidden_field('list', $HTTP_GET_VARS['list']) : '');

Note there is also a bug fix for this file below.

*******************************************

Share this post


Link to post
Share on other sites

Something strange here, as your refering to stuff that does'nt exist in poroduct_listing.php in 1.4

 

line 140 is:

 

}

 

no division!

 

line 329 is:

 

$list_box_contents[$cur_row] = list_box_data($listing, $column_list,$PHP_SELF);

 

no division!

 

line 29 is:

 

$to .= '\nPRODUCT_LIST_HEIGHT set to: '.PRODUCT_LIST_HEIGHT;

 

and:

 

if (PRODUCT_LIST_NUMCOL == 0) {

 

does not exist in the file


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.

Share this post


Link to post
Share on other sites

includes/modules/Product_Listing.php

 

Around line 56, adjust to reflect below.

Changing PRODUCT_IMAGE_WIDTH TO SMALL_IMAGE_WIDTH AND ADDING SMALL_IMAGE_HEIGHT :

 

$image = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $image, ($addimages ? ($selected_image['images_description'] ? $selected_image['images_description'] : ($selected_image['products_image_description'] ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>' . '<br><br>';

 

 

Now the product listing will be the same height as the small images (such as on the new arrivals area)

Share this post


Link to post
Share on other sites

includes/modules/Product_Listing.php

 

Around line 56, adjust to reflect below.

Changing PRODUCT_IMAGE_WIDTH TO SMALL_IMAGE_WIDTH AND ADDING SMALL_IMAGE_HEIGHT :

 

$image = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $image, ($addimages ? ($selected_image['images_description'] ? $selected_image['images_description'] : ($selected_image['products_image_description'] ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>' . '<br><br>';

 

 

Now the product listing will be the same height as the small images (such as on the new arrivals area)

Share this post


Link to post
Share on other sites
includes/modules/Product_Listing.php

 

Around line 56, adjust to reflect below.

Changing PRODUCT_IMAGE_WIDTH TO SMALL_IMAGE_WIDTH AND ADDING SMALL_IMAGE_HEIGHT :

 

$image = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $image, ($addimages ? ($selected_image['images_description'] ? $selected_image['images_description'] : ($selected_image['products_image_description'] ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '') . '</a>' . '<br><br>';

 

 

Now the product listing will be the same height as the small images (such as on the new arrivals area)

 

If you want to do this a simpler approach would be to set Product Listing Image Width the same as SMALL_IMAGE_WIDTH, I avoided including any setting of hieght to ensure correct image proportions are maintained.


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.

Share this post


Link to post
Share on other sites

Spooks, I have an apology! Did you spot the (deliberate?) mistake in my post?

 

I made the changes (i.e. uninstalled Product Listing in Columns 2.2.7) on my backup files and not the live ones, and I was therefore still using product_listing_col.php

 

A quick rename of directories and hey presto, all works fine. - many thanks for your help, and a great contribution.

 

If I may, just a couple of quick 'how do I's

 

When I click on a category that has sub-categories is it possible to not have the sub-categories appear in the product listing window. What would be good is if we could display some random images from the sub-categories or even the complete a-z grid of images (on multiple pages of course)

 

And lastly is it possible to separate the categories and the count with somethingother than -> and then right align the count?

 

Again, many thanks...

Share this post


Link to post
Share on other sites
When I click on a category that has sub-categories is it possible to not have the sub-categories appear in the product listing window.

 

 

Categories are'nt listed by product_listing.php (surprisingly!!) their done by index.php directly, you need to alter that.

 

 

is it possible to separate the categories and the count with somethingother than ->

 

Your talking on the categories info-box, another subject surely?

 

$categories_string .= '->';


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.

Share this post


Link to post
Share on other sites

Hi Spooks,

 

Sorry about the 2 last questions - a little bit off topic I agree. However, with the insight that you have given me I'm hoping to be able to resolve these myself without having to trouble you.

 

Again, many thanks for a great contribution and your help...

Share this post


Link to post
Share on other sites

Hi,

 

I've set up the Product Grid with a border around each product which works perfect for IE but on Mozilla / Firefox....no border whatsoever!

 

CSS used:

TD.infoBoxGrid {
 border: solid 1 #DB016E;
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px; 
 background-color: transparent;
}

 

Now, this might be a dummy-newbee-firefox question, not related to this topic at all in which case you'll probably let me know.....If not, some guidance is appreciated!

 

 

 

B.

Share this post


Link to post
Share on other sites

I'm not too sure about IE but I'm fairly certain that your border would need to have 'px' after the width of 1, so try: -

 

border: 1px solid #ff0000;

 

Hope that helps...

Share this post


Link to post
Share on other sites

Sam,

 

Replacing my existing file product_listing.php changes the $ value of the cost of the item. see photos below. The product_listing file was modified from another contribution Different price base, based on login.

 

this is what the site looked like befor the placement of the file.

 

before.jpg

 

Here is what the site looks like after replacing the product_listing.php with file that comes with your contribution.

 

after.jpg

 

Notice the prices are different, the file is not looking at the right table.

 

there is more information in previous post.

 

any help would be appreciated.

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  

×