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.
It seems strange that I have to manually index my categories when the code could easily do this for me.
Is there a way that I can have my main menu categories auto alpha-sorted rather than having to specify a numerical index for each one?
I tried setting all to an index of 0 thinking that it would alpha sort matching values but it still comes out in a random order.
Nick if you read this I remember seeing you mention that the automatic menu's are only provided for people that couldn't edit the skins themselves. Was it your intention that I should add the categories into my template manually as well?
Offline
If you number them all the same I believe the program will list them in the sequence they are in the database. You could rearrange them in ClickCartPro > Catalog: Categories, Products and Options>Manage Online Store Products or it may be easier to export the ccp0_prod table and arrange it the way you want and import it back. I haven't done this so I'm not sure if it's easier to do or not, but it's an option.
Last edited by grcauto (03-24-2007 15:44:21)
Offline
rtpHarry wrote:
Is there a way that I can have my main menu categories auto alpha-sorted rather than having to specify a numerical index for each one?
There is but you'll have to edit a couple of core files and they are subject to being updated. In {private}/apps/{app}/CCP_Cat/CCP_Cat.php around line 403 look for
$result = $this->KHXC_DB->sql_do(array('sql' => $sql,
'table' => $table,
'order' => array('sortorder' => 'ASC')));Change the 'sortorder' in that statement to 'name' and your categories should be sorted by name on the store home page.
$result = $this->KHXC_DB->sql_do(array('sql' => $sql,
'table' => $table,
'order' => array('name' => 'ASC')));To change the order in the menu on the left side you'll need to edit {private}/apps/{app}/CCP/ext/femenus.php and make the same change at line 567. When done it should look like this:
$result = $this->KHXC_DB->sql_do(array('sql' => $sql,
'table' => $table,
'order' => array('name' => 'ASC')));Offline
Can anyone help. My sort has stopped working. I removed the web map line under the menu bar and removed the sort heading. I'm really not sure where to go from hear. I need my products to be listed in order. I've tried the identifiers and entered the product sort code, but it makes no difference. the products are just listing in any order.
Offline
e.j.groves wrote:
I removed the web map line under the menu bar and removed the sort heading.
What's a web map line? Removing the header line with the sorting options shouldn't affect anything.
e.j.groves wrote:
I'm really not sure where to go from hear. I need my products to be listed in order. I've tried the identifiers and entered the product sort code, but it makes no difference. the products are just listing in any order.
Have you attempted any of the code changes outlined earlier in this thread?
Offline
sortorder*
Column Metadata:
BIGINT(20) DEFAULT '0' NOT NULL
how to chang the BIGINT(20) to 50
Offline
There's no need/reason to change it. A big integer field may hold a value into the trillions and I sincerely hope you have fewer than that products in your store.
Offline
i have 50 category, sortorder only 20, so i want change it to 50
Offline
That number is not related to the values that may be stored in the column. The field is BIGINT which may hold a value into the trillions. The 20 is only a hint at how many digits to display and does not restrict the values that may be stored in the column. You don't need to change it.
Offline
where to edit this file {private}/apps/{app}/CCP_Cat/CCP_Cat.php
Offline
where to edit this file {private}/apps/{app}/CCP_Cat/CCP_Cat.php
i would like to change the sortorder
Code:
$result = $this->KHXC_DB->sql_do(array('sql' => $sql,
'table' => $table,
'order' => array('sortorder' => 'ASC')));
Offline