Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Brian Sim Sort Order Contribution


lorax

Recommended Posts

Contrib: http://www.oscommerce.com/community/contributions,2541

 

Installed and working for the 1st page of any product listing within the catalog. As soon as I click to view the next page, the sorting falls to pieces. Click << previous and the 1st page no longer sorts correctly.

Apathy is a dominant gene - mutate.

Link to comment
Share on other sites

Ah ha.

 

Locate at about line 205 in catalog/index.php

 

case 'PRODUCT_LIST_NAME':

          $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');

 

and change to

 

case 'PRODUCT_LIST_NAME':

          $listing_sql .= "p.products_sort_order, pd.products_name " . ($sort_order == 'd' ? 'desc' : '');

Apathy is a dominant gene - mutate.

Link to comment
Share on other sites

Hi

 

I installed the contrib. but it does not run without error.

 

I have this error if I open a product (in the area where the select options normaly are)

 

1146 - Table 'testshop.TABLE_PRODUCTS_STOCK' doesn't exist    select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '2' AND products_stock_attributes REGEXP '(^|,)3-6(,|$)' AND products_stock_quantity > 0

 

I looked for any wrong thinks I made but I did not find any.

 

What can I do?

Link to comment
Share on other sites

Table products stock is not a default osc table and it's not from my contribution so it must be from another contribution! If the error says the table doesn't exist then it probably doesn't exist. Have you just installed another contri too????

Link to comment
Share on other sites

  • 6 months later...

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