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.
Pages: 1
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
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-
} else { $sortfield = 'sortorder'; $sorttype = 'ASC'; } // End of if statement.
Change to this-
} else { $sortfield = 'sortorder'; $sorttype = 'DESC'; } // End of if statement.
Offline
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
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.
Offline
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
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
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
We were able to resolve the string length question with the help of https://forum.kryptronic.com/viewtopic.php?id=26489.
Offline
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
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
Pages: 1