Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reversed Alphabetic order?


jack_frost

Recommended Posts

Posted

Hi!, ill make it short

 

On my site i have some items, wich name is in blue, this is done in Html. wich makes them come as the first items shown, since there name starts with a Symbol.

As Shown here

 

The problem is, theese items are lesser priority for me, and i would very much like them to be in the bottom of the page, instead of the top.

 

Can this be done?, and how?.

 

Best Regards.

 

- Jesper

Posted

Try

 

$listing_sql .= " order by pd.products_name DESC";

 

in index.php

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
Try

 

$listing_sql .= " order by pd.products_name DESC";

 

in index.php

 

Geoffrey You are a Genious!!

 

Worked Like a Charm! :D

 

Thx!.

 

- Jesper

Posted

Delusions of grandeur strike again.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

  • 5 months later...
Posted

Ehm, I just noticed, That when i have two sites of procucts, and you press "Next site" it Re-reverse the alphabet, given you the same products you just saw! :S

 

Any ideas on how to fix this?

 

Example here

Posted

Ive fixed it, so that the error is gone, now though, im back to normal Alphabet.

 

Anyone who can help me reverse the alphabet, without the befor mentioned bug?.

Posted
Ive fixed it, so that the error is gone, now though, im back to normal Alphabet.

 

Anyone who can help me reverse the alphabet, without the befor mentioned bug?.

Apart from the change Geoffrey suggested you also need to change the default sorting in index.php from a (ascending) to d:

	if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'd'; // change a to d here
	  $listing_sql .= " order by pd.products_name";

Posted

On a related question, I noticed that Jesper said he'd made his product names blue, using HTML. I have found that if I put any HTML in my product names, the code is passed to my financial gateway when there is a transaction, and it causes a "Bad XML" error to be returned (and the sale is not processed). Thus I am stuck with plain, clumsy-looking product names.

 

Is there any work-around for this?

 

Thanks,

Wendy

Posted
Apart from the change Geoffrey suggested you also need to change the default sorting in index.php from a (ascending) to d:

	if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'd'; // change a to d here
	  $listing_sql .= " order by pd.products_name";

 

 

Oh how i love Easy Fixes! n____n

Thanks A Bundle!

 

On a related question, I noticed that Jesper said he'd made his product names blue, using HTML. I have found that if I put any HTML in my product names, the code is passed to my financial gateway when there is a transaction, and it causes a "Bad XML" error to be returned (and the sale is not processed). Thus I am stuck with plain, clumsy-looking product names.

 

Is there any work-around for this?

 

Thanks,

Wendy

 

 

I have no such problem with that, the only problem i had, was that the HTML string takes up 80% of the Text field for the product name -___-'

So my product names have to be really short.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...