Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-16-2010 14:55:47

Foto8Leo
Member
From: Pittsburgh PA USA
Registered: 05-27-2010
Posts: 42
Website

How to change Product Sort Order display in shop from ASC to DESC?

Hi,

We would like to change the default product sort order in our shop to be Descending rather than Ascending.  I had a look at this: https://forum.kryptronic.com/viewtopic.php?id=26052 so I'm guessing it can be done pretty easily but would appreciate if someone could please direct me to the appropriate table and place.

Also, we have 10 digit sort order #s in my ecom_prod table that we carried over from CCP5.1 but when I create a new product in CCP7 it only allows me to enter 5 digits.  How can I change this field to allow 10 digit strings of numbers?

(The reason for all of this is that we enter our products in a yyyymmddxx format and want the most recent additions to appear at the top of the default display in each category.)

Any assistance is very much appreciated!

Leo

Offline

 

#2 08-16-2010 22:57:36

KryptoJim
Member
Registered: 07-08-2010
Posts: 455

Re: How to change Product Sort Order display in shop from ASC to DESC?

Foto8Leo wrote:

Hi,

We would like to change the default product sort order in our shop to be Descending rather than Ascending.  I had a look at this: https://forum.kryptronic.com/viewtopic.php?id=26052 so I'm guessing it can be done pretty easily but would appreciate if someone could please direct me to the appropriate table and place.

Also, we have 10 digit sort order #s in my ecom_prod table that we carried over from CCP5.1 but when I create a new product in CCP7 it only allows me to enter 5 digits.  How can I change this field to allow 10 digit strings of numbers?

(The reason for all of this is that we enter our products in a yyyymmddxx format and want the most recent additions to appear at the top of the default display in each category.)

Any assistance is very much appreciated!

Leo

Look in
{private}/apps/ecom/ECOM_Prod/ECOM_Prod.php

Lines 142-147 look like this-

Code:

} else {

     $sortfield = 'sortorder';
     $sorttype  = 'ASC';

} // End of if statement.

Change to this-

Code:

} else {

     $sortfield = 'sortorder';
     $sorttype  = 'DESC';

} // End of if statement.

Offline

 

#3 08-16-2010 23:00:13

KryptoJim
Member
Registered: 07-08-2010
Posts: 455

Re: How to change Product Sort Order display in shop from ASC to DESC?

Foto8Leo wrote:

Also, we have 10 digit sort order #s in my ecom_prod table that we carried over from CCP5.1 but when I create a new product in CCP7 it only allows me to enter 5 digits.  How can I change this field to allow 10 digit strings of numbers?

Backup the DB and try this-


alter table ecom_prod modify sortorder VARCHAR(10) NOT NULL;

Offline

 

#4 08-24-2010 08:49:21

mia
Member
Registered: 02-19-2005
Posts: 30
Website

Re: How to change Product Sort Order display in shop from ASC to DESC?

Thanks.

The fix for the first item seems good. 

The limit on 5 characters however is simply down to a maxchars="5" attribute on the input field, the field in the DB is a bigint(20) so more than able to take 10 digits.  Can you point me in the direction of the HTML or PHP file to edit to alter that charachter limit?

Thanks.


Jon Levy
foto8.com

Offline

 

#5 08-24-2010 16:25:32

Foto8Leo
Member
From: Pittsburgh PA USA
Registered: 05-27-2010
Posts: 42
Website

Re: How to change Product Sort Order display in shop from ASC to DESC?

Sorry, I wasn't clear about the first request.  We want the product listings in the public-facing category displays to have a descending order, not the admin display.  How can we have the default display of products in a category on the public side list by product sort order value descending?

Thanks

Leo

Offline

 

#6 08-27-2010 13:00:36

KryptoJim
Member
Registered: 07-08-2010
Posts: 455

Re: How to change Product Sort Order display in shop from ASC to DESC?

Foto8Leo wrote:

Sorry, I wasn't clear about the first request.  We want the product listings in the public-facing category displays to have a descending order, not the admin display.  How can we have the default display of products in a category on the public side list by product sort order value descending?

Thanks

Leo

Clear your cookies and try...this should work unless the user already has a preferred sort order defined within their session.

Offline

 

#7 08-27-2010 16:50:53

Foto8Leo
Member
From: Pittsburgh PA USA
Registered: 05-27-2010
Posts: 42
Website

Re: How to change Product Sort Order display in shop from ASC to DESC?

kryptsupport wrote:

Foto8Leo wrote:

Also, we have 10 digit sort order #s in my ecom_prod table that we carried over from CCP5.1 but when I create a new product in CCP7 it only allows me to enter 5 digits.  How can I change this field to allow 10 digit strings of numbers?

Backup the DB and try this-


alter table ecom_prod modify sortorder VARCHAR(10) NOT NULL;

Hi- Is this an SQL statement or do you meant that I should go into the ecom_prod table and change the text?  And if it's the latter, is that something I do through the directory or through the raw database admin, as I'm not finding it in either place.  Where and how do I make this change?

By the way, the ASC > DESC change works fine.

Thanks!

Leo

Offline

 

#8 08-31-2010 13:18:46

Foto8Leo
Member
From: Pittsburgh PA USA
Registered: 05-27-2010
Posts: 42
Website

Re: How to change Product Sort Order display in shop from ASC to DESC?

We were able to resolve the string length question with the help of https://forum.kryptronic.com/viewtopic.php?id=26489.

Offline

 

#9 09-01-2010 00:56:11

KryptoJim
Member
Registered: 07-08-2010
Posts: 455

Re: How to change Product Sort Order display in shop from ASC to DESC?

Foto8Leo wrote:

kryptsupport wrote:

Foto8Leo wrote:

Also, we have 10 digit sort order #s in my ecom_prod table that we carried over from CCP5.1 but when I create a new product in CCP7 it only allows me to enter 5 digits.  How can I change this field to allow 10 digit strings of numbers?

Backup the DB and try this-


alter table ecom_prod modify sortorder VARCHAR(10) NOT NULL;

Hi- Is this an SQL statement or do you meant that I should go into the ecom_prod table and change the text?  And if it's the latter, is that something I do through the directory or through the raw database admin, as I'm not finding it in either place.  Where and how do I make this change?

By the way, the ASC > DESC change works fine.

Thanks!

Leo

That's a raw sql statement.

Offline

 

#10 09-05-2010 23:17:37

Foto8Leo
Member
From: Pittsburgh PA USA
Registered: 05-27-2010
Posts: 42
Website

Re: How to change Product Sort Order display in shop from ASC to DESC?

Thanks!

Offline

 

#11 04-18-2011 19:42:54

Foto8Leo
Member
From: Pittsburgh PA USA
Registered: 05-27-2010
Posts: 42
Website

Re: How to change Product Sort Order display in shop from ASC to DESC?

If anyone is looking for this, changing the product sort order field from 5 characters to 10 characters is accomplished (at least in part?) by going to raw database admin: cms_columndefs, then to ecom_prod.sortorder (on p.11).  There change cnumeric from 5 to 10.

Again, this link is helpful: https://forum.kryptronic.com/viewtopic.php?id=26489.

Offline

 

Board footer