Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort Products By Dropdown


Recommended Posts

Hi everyone,

 

We were using this contribution successfully until we installed Ultimate SEO URLs and now the drop down really plays up and takes an age to sort the products. Does anyone know what code changes I would need to apply to get this working again. You can take a look at an example of what is happening by trying to re-sort the products at the link.

 

Thanks very much for your help in advance.

 

Regards,

Luke

Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 87
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

 

We are using Online Merchant v.2.2 RC2. Should this be working in this version ? I have run sql clause, still I can't find any settings in Admin side Configuration -> Product Listing (Product Recent Sales), also there comes this error in shop "1054 - Unknown column 'p.products_recent_sales' in 'field list'". I ran sql clause in phpMyAdmin, made all changes, but I can't get this working.

Could anyone help ?

Link to comment
Share on other sites

Hello,

 

We are using Online Merchant v.2.2 RC2. Should this be working in this version ? I have run sql clause, still I can't find any settings in Admin side Configuration -> Product Listing (Product Recent Sales), also there comes this error in shop "1054 - Unknown column 'p.products_recent_sales' in 'field list'". I ran sql clause in phpMyAdmin, made all changes, but I can't get this working.

Could anyone help ?

 

Forget this, I got this working, I ran sql in wrong database :)

Link to comment
Share on other sites

i just finished installing this contribution and it does what i want it to do. Yet their is a problem, after installing it, i go to the site to test it, click on a category, and there is a huge blank gap separating where the dropdown menu is and where my product's are displayed. I think it may be an easy fix, but i am no expert.

Link to comment
Share on other sites

Hello Community,

 

 

This contribution is working great except for advanced search result pages. The problem is that when we try to sort the results of a search it immediately takes us back to the homepage. We moved the product sort box from /index.php to /includes/modules/product_listing.php so that it gets displayed under the breadcrumb instead of on top of it. Could this be causing the problem? I can provide more code if needed. Thanks

Link to comment
Share on other sites

  • 7 months later...

Hi all,

 

just installed this and get a 1064 error when I try and select either of the sort by price options (the others work)

 

I've checked through the thread and made any fixes suggested regarding sort order but still have the problem

 

this is the error

 

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 'limit 0, 30' at line 1

select p.products_image, m.manufacturers_name, pd.products_name, p.products_recent_sales, p.products_id, p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status = '1' AND s.stores_id = '1', s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = '1' AND s.stores_id = '1', s.specials_new_products_price, p.products_price) as final_price from products_description pd, products_to_categories p2c, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id and s.stores_id = '1' INNER JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p2s.stores_id = '1' and p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '4437' order by limit 0, 30

[TEP STOP]

 

any ideas?

 

Thanks

 

Dave

Link to comment
Share on other sites

Just sorted it,

 

I had other contributions installed which meant that my product listing headings were not in the 'standard' osc sort order. I just rearranged these back to the default 'out of the box' sort order and it fixed my 1064 error.

 

This is what I have

 

Display Product Image 1

Display Product Manufaturer Name 2

Display Product Name 3

Display Product Price 4

Display Buy Now column 5

Product Recent Sales 7

 

Hope that helps someone

 

Dave

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

Hi, I getting problem when I trying to install the sort order fuction combin with specifictions filter. When my categories doesn't has any specifctions filter, it works fine. When the categories have specifcations filter, it will it will take the last value from the filter.

 

like this

index.php?cPath=98_104_111&sort=5a&filter_id=Zutano

 

the zutano is the last value from my specifcation value.

 

Has anyone notice that yet?

 

My other question is, has anyone knows how to may this addon work with SEO URL?

thank you

ken

Link to comment
Share on other sites

  • 2 weeks later...

I got accross a problem with this contrib, maybe the original author or someone else can help...

Contrib works fine on my store, but has one serious problem. If a product is not sold within the "MAX_DAYS_LOOKBACK_BESTSELLERS" period, the product won't be selected in the cron_update_bestsellers.php script so it will keep it's old value in recent_sales field. That's a problem, as the product is no bestseller any more.

For example, assuming 30 days lookback:

In June I sell 100x PRODUCT A and 10x PRODUCT B

In July I sell 0x PRODUCT A and 20x PRODUCT B

In August PRODUCT A would still be the best selling product, because the script didn't update PRODUCT A.

 

cron_update_bestsellers.php needs to be fixed so that if a product is not updated, the recent_sales field is set to 0.

Can someone fix that or has someone an idea?

Link to comment
Share on other sites

  • 1 year later...

Hi, hoping someone can help me as Im new to OSCommerce. Installed the Sort Products By Dropdown addon and when I select an option from the dropdownlist on the advanced search results , the page redirects to the home page of the website.

 

See here:

http://www.landmarkpc.co.za/store/advanced_search_result.php?keywords=SteelSeries+Apex+&x=10&y=13

 

It works on the rest of the site though.

 

How can I fix this?

Edited by sondavey
Link to comment
Share on other sites

change

 

// Additional Products Sort

echo '<td align="center" class="dynamicMain">' . tep_draw_form('sort', FILENAME_DEFAULT, 'get') . '<b>Sort by:</b>  ';

 

to

 

// Additional Products Sort

echo '<td align="center" class="dynamicMain">' . tep_draw_form('sort', FILENAME_ADVANCED_SEARCH_RESULT, 'get') . '<b>Sort by:</b>  ';

Edited by Tsimi
Link to comment
Share on other sites

  • 2 months later...

Hi, hoping someone can help me as Im new to OSCommerce. Installed the Sort Products By Dropdown addon and when I select an option from the dropdownlist on the advanced search results , the page redirects to the home page of the website.

 

See here:

http://www.landmarkpc.co.za/store/advanced_search_result.php?keywords=SteelSeries+Apex+&x=10&y=13

 

It works on the rest of the site though.

 

How can I fix this?

 

Your last post is already 2 months a go and i asume it is still not working (i took a look on your site), but i found an answer to this.

I don't know if its the "right way", although it works :blush: (i'm not a php-guru, idea's and changes are welcome).

 

Don't forget to change FILE_NAME mentiod in the above post (#87)!!!!!

 

I created a new function to store the parameters as a hidden field for the form (when i changed the sort order, i was send back to advanced_search.php with an error message)

 

Add to catalog/includes/funstions/general.php:

////
// Return all HTTP GET variables, except those passed as a parameter
 function tep_get_all_get_parameters() {
   global $HTTP_GET_VARS;
   $parameters = '';
   if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) {
  reset($HTTP_GET_VARS);
  while (list($key, $value) = each($HTTP_GET_VARS)) {
    if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && ($key != 'x') && ($key != 'y') && ($key != 'sort') ) {
	  $parameters .= tep_draw_hidden_field($key, $value);
    }
  }
   }
   return $parameters;
 }

(It is a edited version of the function tep_get_all_get_params)

 

Add code below in to the part where the form is created (asuming this will be advanced_search_result.php):

echo tep_get_all_get_parameters();

 

Hope this works for you, it does for me even with a second pulldown with a view selection (list or grid).

 

 

Greetz,

 

Werner T.

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