Jump to content
Sign in to follow this  
spooks

Product Listing Enhancements, Thumbnails & Manufacturer Headings

Recommended Posts

sir.. this is my homepage looks like its the whats new products..

 

listings in block mode home page.

listinblocks.jpg

categories

categoriesy.jpg

 

 

 

thumbnail in grid mode home page.

installed.jpg

i have done all what i can do i have changed the images sizes with same width and height i have deleted the spaces between the prices and the product name but the looks of thumbnail in grid i have changed the sizes of the boxes still not good i even have problems in categories section of thumbnail in grid because when the name is short the buttons will go up too? how can i make the buttons stick at the bottom and not aligned with the text. so it wont move when the title is short?

 

how can i just make my home page looks like listings in block mode in categories section its the best option..

Share this post


Link to post
Share on other sites

To add the switch above the listing:

 

after:

$data_ok = ($listing_split->number_of_rows > 0);

add:

$thumbnail_view = (isset($_GET['list']) ? $_GET['list'] : PRODUCT_THUMBNAIL_VIEW);
if (LISTING_SWITCH != 'false' && $data_ok) echo '<br /><span class="smalltext"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('list')). 'list='.(strstr($thumbnail_view, 'thumbnails') ? 'manufacturer' : 'thumbnails')) . '">' . (strstr($thumbnail_view, 'thumbnails') ? LIST_VIEW : THUMB_VIEW).'</a></span><br />';

 

Thank you very much Spooks. This was just what I was looking for. I was grabbing the wrong code and putting it there which was causing it to say thumbview when I was in thumb view. :blush:

Share this post


Link to post
Share on other sites

Hi Charles

 

I am sorry if my post caused you any offence. It was not intended.

 

I was just pointing out that deleting ALL the <br>’s my have an adverse affect on the other styles especially if you allow the user to change the listing view.

 

I have recently upgraded my old CRT monitor to a new wide screen LCD and I now think that the grid view looked better with the <br>’s left in place. It was only when I wanted to put them back that I made a note of the line numbers to change and posted them here in case it helped.

 

Jayson. Thanks, I’m pleased that someone found my post useful.

 

Regards

 

Ken

Share this post


Link to post
Share on other sites

 

 

For the new products module to use the listing module (so same display) you will have to wait for the next update.

 

PS you seem to have an error in your index.php, I suspect you missed the line $select_column_list .= 'p.products_quantity, '; wink.gif


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 Charles

 

I am sorry if my post caused you any offence. It was not intended.

 

I was just pointing out that deleting ALL the <br>’s my have an adverse affect on the other styles especially if you allow the user to change the listing view.

 

I have recently upgraded my old CRT monitor to a new wide screen LCD and I now think that the grid view looked better with the <br>’s left in place. It was only when I wanted to put them back that I made a note of the line numbers to change and posted them here in case it helped.

 

Jayson. Thanks, I’m pleased that someone found my post useful.

 

Regards

 

Ken

 

Apology accepted, thanks for explaining. B)

--------------------------

In addition to the <br/> 's that you had posted to remove, I found on my cart that to remove the gap between price and quantity I had to also remove the break here as well:

 

$display .= $borderend . $form . '<br />' . (PRODUCT_LIST_OPTIONS == 'true' ? attribute_drop($products['products_id'],$products['products_tax_class_id']) . $button : $button) . ($multi_add ? '' : '</form>');

// thumb built

 

Did you find this to be true on your cart as well?

Share this post


Link to post
Share on other sites

Did you find this to be true on your cart as well?

 

Hi Charles

 

The only ones I removed were the ones I posted. But you are correct that extra <br> In the code you posted will remove all the space between the price and the top of the buttons.

 

I did also remove the ‘pipe spacer’ between the info and buy buttons.

 

Regards

 

Ken

Share this post


Link to post
Share on other sites

The image below demonstrates how i'm trying to get the 'Stock = products_id ' to display ONLY for the products that customers have Previously Ordered. Instead the products_id is looping through and showing for all products after the previously ordered ones ( green checkmarks ). The red checkmarks in image below indicate where the stock = products_id should not be. You can also see how the same product_id is carried on for the next products too. :(

 

example.jpg

 

 

CODE IS HERE :

---------------

// build thumb
	$man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '');	
	$link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : ''))) . '"' . ($man_id  || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>';
..........

$orders_query = tep_db_query("select distinct op.products_id, op.orders_id, o.orders_id from " . TABLE_ORDERS_PRODUCTS . " op LEFT JOIN " .             TABLE_ORDERS . " o on op.orders_id = o.orders_id where op.products_id = '".(int)$products['products_id']."' and o.customers_id = '" . (int)$customer_id . "'");

while ($orders = tep_db_fetch_array($orders_query)) {


$cust = ($orders['products_id'] ? 'Stock = '.$products['products_id'] : 'Out of Stock').'<br />';

}
       $udc = (tep_image_button($products['UDC_design'])) . '<br />';


	$manfact = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $products['manufacturers_id']) . '">' . $products['manufacturers_name'] . '</a><br>';
	$display = $border;
	for ($disp=0, $n=sizeof($column_list); $disp<$n; $disp++) {
       switch ($column_list[$disp]) {
         case 'PRODUCT_LIST_IMAGE':
$display .= '<table summary="" width="100%" ><tr><td style="text-align:center;" valign="top" height="'.PRODUCT_IMAGE_VSPACE.'" >'.$image.'</td></tr></table>';
           break;
case 'PRODUCT_LIST_NAME':
           $display .= '<table summary="" width="100%" ><tr><td class="thumbcontent" height="'.PRODUCT_NAME_VSPACE.'" >'.$name.'</td></tr></table>';
           break;
	      case 'PRODUCT_LIST_MODEL':
           $display .= $model;
           break;
            case 'PRODUCT_LIST_UDC':
           $display .= $udc;
           break;
           case 'PRODUCT_LIST_CUSTDESIGN':
            $display = $cust;
     break;
		.........

    case 'PRODUCT_LIST_WEIGHT':
           $display .= $weight;
           break;	
				}
	}
	$display .= $borderend . $button . $cust;
			// thumb built	

 

hopefully someone can help :) thanks.

Edited by mac2me

Share this post


Link to post
Share on other sites

For the new products module to use the listing module (so same display) you will have to wait for the next update.

 

PS you seem to have an error in your index.php, I suspect you missed the line $select_column_list .= 'p.products_quantity, '; wink.gif

 

hello tnx for the reply sir.. cant wait for the new updates. can you also make a border selection like you can turn off or on rounded borders.. thank you very much..

 

 

$select_column_list .= 'p.products_quantity, '; 

is this for showing the products quantity will it affect my site?

Share this post


Link to post
Share on other sites

hello tnx for the reply sir.. cant wait for the new updates. can you also make a border selection like you can turn off or on rounded borders.. thank you very much..

 

 

$select_column_list .= 'p.products_quantity, '; 

is this for showing the products quantity will it affect my site?

 

For borders look at graphical borders.

 

I think I was wrong with that line I gave, its smthg else thats missing, your not showing any prices, I would suspect the price is missing from the query, you can check what query your presenting, at the end of the listing file fine:

 

//echo '<hr>' . $listing_sql . '<hr>';

 

just un-comment that & it will be displayed.

 

The next version is uploaded, just waiting approval. smile.gif


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 Charles

 

The only ones I removed were the ones I posted. But you are correct that extra <br> In the code you posted will remove all the space between the price and the top of the buttons.

 

I did also remove the ‘pipe spacer’ between the info and buy buttons.

 

Regards

 

Ken

 

I will have to remove the pipe spacer and see what it does for mine as well.

Share this post


Link to post
Share on other sites

Hi Mr. Sam . i have two questions :rolleyes: second one is not related to your contribution but i think you may halp me :(

1- how to reduce the size of manufacturer FONT in product listing?

2- which code should we placed in column_right.php to have best_sellers box only when user has entered a category ant not showing it in home page?

tnx alot

Share this post


Link to post
Share on other sites

Hi Mr. Sam . i have two questions rolleyes.gif second one is not related to your contribution but i think you may halp me sad.gif

1- how to reduce the size of manufacturer FONT in product listing?

2- which code should we placed in column_right.php to have best_sellers box only when user has entered a category ant not showing it in home page?

tnx alot

 

 

1. its a infobox, download firefox and its web developer & firebug plugins, then use that to find the css of any element on a page. wink.gif

 

2. file is a module, has no control over outside elements. huh.gif


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

 

Uploaded Version 2.6

  • Complete re-write of the doc!!.
  • Added price to global title option.
  • Modified new_products.php module to always use product listing module, so create more consistant look to site.
  • Modified products_new.php file to always use product listing module, so create more consistant look to site.
  • Added option to position mode switch.
  • Fixed quantity box bug.
  • Moved many in file settings to admin settings.
  • Created SQL un-install file.
  • Removed product_listing_setup.php file (too much hastle to update) you must make all SQL changes manually with phpMyAdmin now, sorry.
     
    Changed files: product_listing.php, new_products.php, products_new.php, SQL files.

Note, though its uploaded it has not appeared in the download yet!! sad.gif

 

 


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

It means there is other stuff you missed on the install as well, when you get these issues always triple check the install, 99% of times you have missed stuff or not followed instructions exactly. cool.gif

 

In this case you have failed to complete the changes to the language files, but best go over it all again, there could be more you missed!! smile.gif

 

Hello Sam!

I have a question, how can I erase "Sort Order:" It is not working correctly on my website and I prefer to erase it. The other day you were trying to help me but I couldn't find the problem.

Thank you for your help!!

Share this post


Link to post
Share on other sites

I am not sure where my issue lies but I noticed that under the original default categories such as software, the subcategory images show in the product listing.

 

However, when creating a new category, its' subcategory images do not show in the listing area at all. Any idea what would cause this to work for the default subs and not the new ones I created?

 

Charles

Share this post


Link to post
Share on other sites

I am not sure where my issue lies but I noticed that under the original default categories such as software, the subcategory images show in the product listing.

 

However, when creating a new category, its' subcategory images do not show in the listing area at all. Any idea what would cause this to work for the default subs and not the new ones I created?

 

Charles

Sorry about this post. I had a major brain freeze and would have deleted it if forum would have let me. Basically my error is that in the main cat I had products so the subcat images were not showing. :'( :blush:

Share this post


Link to post
Share on other sites

HI,

 

I just did a checkout test and although all the rest of my cart seems to be functioning properly, I noticed on Checkout it gives this error:

 

Fatal error: Call to undefined method shoppingCart::get_content_type() in /public_html/web.com/catalog2/includes/classes/order.php on line 136

 

 

Line 136 in order.php is:

$this->content_type = $cart->get_content_type();

 

I only noticed this after installing the contrib. Any idea what the solution and cause is?

 

Your help is appreciated. :blush:

Edited by fan4chevy

Share this post


Link to post
Share on other sites

HI,

 

I just did a checkout test and although all the rest of my cart seems to be functioning properly, I noticed on Checkout it gives this error:

 

Fatal error: Call to undefined method shoppingCart::get_content_type() in /public_html/web.com/catalog2/includes/classes/order.php on line 136

 

 

Line 136 in order.php is:

$this->content_type = $cart->get_content_type();

 

I only noticed this after installing the contrib. Any idea what the solution and cause is?

 

Your help is appreciated. blush.gif

 

Not related to this, none of that code is changed by this, clearly your error is co-incidental. wink.gif


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

Uploaded Version 2.6

  • Complete re-write of the doc!!.
  • Added price to global title option.
  • Modified new_products.php module to always use product listing module, so create more consistant look to site.
  • Modified products_new.php file to always use product listing module, so create more consistant look to site.
  • Added option to position mode switch.
  • Fixed quantity box bug.
  • Moved many in file settings to admin settings.
  • Created SQL un-install file.
  • Removed product_listing_setup.php file (too much hastle to update) you must make all SQL changes manually with phpMyAdmin now, sorry.
     
    Changed files: product_listing.php, new_products.php, products_new.php, SQL files.

Note, though its uploaded it has not appeared in the download yet!! sad.gif

 

Hi Sam

 

Thank you for this nice contrib.

Unfortunately, since v2.6 there is an error in my new_products module:

 

1054 - Unknown column 'm.manufacturers_name' in 'field list'

 

Any Ideas?

Many thanks for your excellent contrib and support

 

regards

Harry

Edited by 2fix4u

Share this post


Link to post
Share on other sites

Not related to this, none of that code is changed by this, clearly your error is co-incidental. wink.gif

 

 

Thanks Sam,

 

Perhaps an upload corruption. Do you know what causes and error like this?

Share this post


Link to post
Share on other sites

SQL query error in new_products module

1054 - Unknown column 'm.manufacturers_name' in 'field list'

 

Any Ideas?

 

 

Sorry, when you make a big update there can always be stuff you miss in packages this size blush.gif

 

find the query

 

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = "select " . $select_column_list . "p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_quantity from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_date_added > '".$date."' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc";
} else {
$new_products_query = "select distinct " . $select_column_list . "p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_quantity from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_date_added > '".$date."' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc";
}

 

replace with:

 

  if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = "select " . $select_column_list . "p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_quantity from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_date_added > '".$date."' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc";
 } else {
$new_products_query = "select distinct " . $select_column_list . "p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_quantity from " . TABLE_PRODUCTS . " p  left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_date_added > '".$date."' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc";
 }

 

Surprised no-ones spotted the other bug (not in that file) blush.gif

 

 

 

An addition to the next update will be thumbnails with rounded corners, I think a few may like that biggrin.gif

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.

Share this post


Link to post
Share on other sites

 

Surprised no-ones spotted the other bug (not in that file) blush.gif

 

 

Thank you very much all works perfect, i think :blush:

What other bugs do you mean? :'(

 

 

An addition to the next update will be thumbnails with rounded corners, I think a few may like that biggrin.gif

 

Rounded Corners would be very gratifying :rolleyes:

 

regards

Harry

Share this post


Link to post
Share on other sites

Hello Spooks

 

For me everything worked fine, I really enjoyed the look and options but only in product_listing.php, I would like to use Product_new and New_product.php but they only show the two new products added to the store, other modules work well but its only has 2 products. Neither set sizes 3 to show in each column and only show 2 by custom.

 

Thank

Shazam

São Paulo-Brasil :thumbsup:

Share this post


Link to post
Share on other sites

date limiting function

Product_new and New_product.php but they only show the two new products added to the store

 

 

As detailed, both those files have a date limiting function, perhaps you want your new products older than 60 days?

 

 

function is commented in the files.


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

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  

×