Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Listing Enhancements, Thumbnails & Manufacturer Headings


spooks

Recommended Posts

Have you run the setup file??

 

That must be PRODUCTS_PER_ROW set in admin Product Listing Per Row have you set that to 0!!

 

 

Yeh i found the problem, how can i be so silly, lol.

Link to comment
Share on other sites

Hello, hello?

 

 

Bonjour, Ca Va?

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

Sam,

 

Do you have any idea why I might be getting this sql error when I try to go to product listings:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&& language_id=1' at line 1

 

SELECT `products_description` FROM `products_description` WHERE products_id = && language_id=1

 

[TEP STOP]

 

I've searched for that query in the product_listings.php but can't find it. I'm stymied.

 

You got an idea on this one? I don't ever underestimate my ability to screw up code, but I don't think I touched this one....maybe came from my index.php?

Link to comment
Share on other sites

You got an idea on this one? I don't ever underestimate my ability to screw up code, but I don't think I touched this one....maybe came from my index.php?

 

 

The error is in your index.php somewhere, I think you may have deleted part of a query

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 all,

 

I installed the contrib and it is great¡

 

I have a question. When I display the list view the manufacturer name appears on the top by page, but if one manufacturer don't have products in this order results but yes in other page, appears the only the manufacturer name.

 

I don't know if I explained it well...

 

 

Regards,

Javier

Link to comment
Share on other sites

If you have selected a manufacturer and filtered by category & there are no products for that category you will only get the name, as the list is empty.

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

Okay, I figured it out. I was getting that error because I had check '2' on the "Number of Columns per row" option above the Product Listing options. Once I set it back to 1, all was okay.

 

I do have one more problem though (don't I always?) When I use the dropdowns to change the sort order, instead of actually changing the sort order, it shoots me right back to the index page. Any clues about this one? Or is this again a product of my idiocy?

Link to comment
Share on other sites

Okay, I figured it out. I was getting that error because I had check '2' on the "Number of Columns per row" option above the Product Listing options. Once I set it back to 1, all was okay.

 

I do have one more problem though (don't I always?) When I use the dropdowns to change the sort order, instead of actually changing the sort order, it shoots me right back to the index page. Any clues about this one? Or is this again a product of my idiocy?

 

 

Setting columns to 2 shouldent give any sql error, it doe'nt make any change to the query? Do you have a url?

 

Changeing sort order does redirect to the index, but with the listing settings within the $_GET so should return to list, in new order as before. Although its a drop down the change is exactly the same as clicking on the headings did. What PHP version do you have?

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

Setting columns to 2 shouldent give any sql error, it doe'nt make any change to the query? Do you have a url?

 

Changeing sort order does redirect to the index, but with the listing settings within the $_GET so should return to list, in new order as before. Although its a drop down the change is exactly the same as clicking on the headings did. What PHP version do you have?

PHP Version 4.4.7

 

This is on my test bed, url is http://2guysandablade.com/store

Let me know. I'm scratching my head on this.

Link to comment
Share on other sites

You know, I'm wondering if I don't have a problem on my testbed setup. I've screwed around so much on it, I'm just wondering if I've just messed it up so much that I can no longer get any valid results off of it. Maybe I should just do a clean reinstall and just track down all the contributions that have sql updates and put them in one folder for the database setup.

 

I may end up doing that this weekend.

Link to comment
Share on other sites

I`ve taken a look at the site, for some strange reason your looseing some of the $_GET, but only withing categories on index, within search its fine!!

 

Try this mod to product_listing.php

 

find (84)

 

$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_hide_session_id().'</form></td></tr></table>';

Replace with:

 

$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_hide_session_id().'</form></td></tr></table>';

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

Nope, still throwing me to the index page. *sigh*. It's probably the testbed Sam. I've got to run to work, so I'll start messing with it again tomorrow....I actually may just install it on adarkdesire tomorrow, what the hell.

Link to comment
Share on other sites

It could be due to the buggy Search Engine Friendly URL set to on, that can cause link problems.

 

If your testing, un-installing Product Listing Enhancements is just a matter of putting back your original product_listing 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.

Link to comment
Share on other sites

If you have selected a manufacturer and filtered by category & there are no products for that category you will only get the name, as the list is empty.

 

 

Thanks Spook.

 

Yes I get only the name, but a I have products for this manufacturer but in other page...

Link to comment
Share on other sites

I`ve done some tests on one of my test sites & have managed to re-create a similar error related to Search Engine Friendly URL set to on.

 

I`ve re-written this bit which will work with Search Engine Friendly URL set to on, but not off!! I'll try & find a solution for both states.

 

 

In product_listing.php

 

find (84)

 

$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_hide_session_id().'</form></td></tr></table>';

 

Replace with:

 

$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('max')), $request_type, false), 'get') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('sort')), $request_type, false), 'get') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td></tr></table>';

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

Back Again!!

 

I can't find a 'ideal' solution without debugging the errors with Search Engine Friendly URL's, I don't have time for that, so this change puts the file in one of two modes, depending on whether Search Engine Friendly URL is set to 'on' or 'off'.

 

In product_listing.php

 

find (84)

 

$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_hide_session_id().'</form></td></tr></table>';

 

Replace with:

 

$sefurl = SEARCH_ENGINE_FRIENDLY_URLS == 'true';
$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), ($sefurl ? tep_get_all_get_params(array('max')) : ''), $request_type, false), 'get') . (!$sefurl ? $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') : '') .  tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), ($sefurl ? tep_get_all_get_params(array('sort')) : ''), $request_type, false), 'get') . (!$sefurl ? $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') : '') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td></tr></table>';

 

That should put this bug to rest, for a while anyway.

 

;)

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

Back Again!!

 

I can't find a 'ideal' solution without debugging the errors with Search Engine Friendly URL's, I don't have time for that, so this change puts the file in one of two modes, depending on whether Search Engine Friendly URL is set to 'on' or 'off'.

 

In product_listing.php

 

find (84)

 

$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') .  tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_hide_session_id().'</form></td></tr></table>';

 

Replace with:

 

$sefurl = SEARCH_ENGINE_FRIENDLY_URLS == 'true';
$drop = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), ($sefurl ? tep_get_all_get_params(array('max')) : ''), $request_type, false), 'get') . (!$sefurl ? $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') : '') .  tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), ($sefurl ? tep_get_all_get_params(array('sort')) : ''), $request_type, false), 'get') . (!$sefurl ? $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') : '') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td></tr></table>';

 

That should put this bug to rest, for a while anyway.

 

;)

 

It worked!!!!! It worked!!!! EEEEEEHAAAAA!!! Thank you!!!!

Link to comment
Share on other sites

Oh no. the bugs did'nt sleep very long, another came up with the Search Engine Friendly URL set to on! Most of the $_GET don't get set! This is my 'fix':

 

In application_top.php

 

find near 90:

 

 

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
if (strlen(getenv('PATH_INFO')) > 1) {
  $GET_array = array();
  $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
	$vars = explode('/', substr(getenv('PATH_INFO'), 1));
  for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
	if (strpos($vars[$i], '[]')) {
	  $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
	} else {
	  $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
	}
	$i++;
  }

  if (sizeof($GET_array) > 0) {
	while (list($key, $value) = each($GET_array)) {
	  $HTTP_GET_VARS[$key] = $value;
	}
  }
}
 }

Replace with:

 

 

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
if (strlen(getenv('PATH_INFO')) > 1) {
  $GET_array = array();
  $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
  if (($PHP_SELF == '') || (strlen(trim($PHP_SELF)) == 0)) $PHP_SELF = rtrim(str_replace(array( getenv('PATH_INFO'),getenv('QUERY_STRING')) , '', $_SERVER['REQUEST_URI']), '?');
  $vars = explode('/', substr(getenv('PATH_INFO'), 1));
  for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
	if (strpos($vars[$i], '[]')) {
	  $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
	} else {
	  $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
	}
	$i++;
  }

  if (sizeof($GET_array) > 0) {
	while (list($key, $value) = each($GET_array)) {
	  $HTTP_GET_VARS[$key] = $value;
	}
  }
}
 reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if (!isset($_GET[$key])) $_GET[$key] = $value;
  }
}

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

Well, it's working on my live site just fine without it, but I'll add it if you think I should.

 

 

Unfortunatly you do have the problem, to see, get a long list, then change the results/page to 20 then click on next page, results/page reverts to 10!!

 

I`m looking at DarkDesire.

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

Unfortunatly you do have the problem, to see, get a long list, then change the results/page to 20 then click on next page, results/page reverts to 10!!

 

I`m looking at DarkDesire.

Well shit, okay, I'll change it.

Link to comment
Share on other sites

Okay, changes made. Seems good now.

 

PS: I believe I have a black leather thong just your size....:-) But it is an Irish thong....so you may have to sing the Irish Republican Anthem when you wear them ROFLMAO!

Edited by webbydeb
Link to comment
Share on other sites

Hi

 

Ive uploaded the files, could you tell where i could change the text size for the product listing, ive looked in the css file but not sure which part/parts to change, i had a go, but nothing changed so i put it back the way it was

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...