| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How TO Order Products List By Field | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
The sort mechanism is already built by xcart just they haven't switched it on.
Just add a link to the top of the products.tpl Sort this list by Price And amend the navigation.tpl as shown Then amend products.php by adding the assign to smarty code at the bottom. You dont need to amend the sql query in any way.
__________________
ex x-cart guru |
|||||||
#12
|
|||||||
|
|||||||
Thanks Funkydunk for being so helpfull!
Forgot to mention that I did this aswell. I kept the SQL query as it was initially brought by XCart. Then I amended the products.tpl with (like you proposed earlier) Code:
which is basically the same as amending : Code:
When clicking; the list remains in the same sequence. So probably in my version sorting by price isn't switched on.... Where can I do that...? |
|||||||
#13
|
|||||||
|
|||||||
Sorry my mistake forgot what I did now... it was a while back
Code for func.php search for the func_search_products and replace the first line of that function declaration with Code:
__________________
ex x-cart guru |
|||||||
#14
|
|||||||
|
|||||||
we are dealing here with a persistent little bastard.....
Amending the func.php, will result in: Warning: Missing argument 6 for func_search_products() in c:\program files\apache group\apache\htdocs\shop\include\func.php on line 977 Warning: Missing argument 6 for func_search_products() in c:\program files\apache group\apache\htdocs\shop\include\func.php on line 977 However, changing the passage into: Code:
Makes sure that every single category is sorted by price (ascending) by default! YEAHAAAAAAAAAAA! This is what I initially wanted.... Thank you funkydunk! Other amendmends are not necessary anymore. However when you want the customer to choose his own sorting method, there is still one error as mentioned above. Anyway...Funkydunk, you made a sunnyday out of myday today! |
|||||||
#15
|
|||||||
|
|||||||
I replaced the code
Code:
in func.php and my products are sorted by price DESCENDING when I really want them ascending. How come yours are ascending and mine are descending?! By the way this is in v3.4.5 |
|||||||
#16
|
|||||||
|
|||||||
Have you tried ticking or unticking the list products in reverse order in admin?
__________________
ex x-cart guru |
|||||||
#17
|
|||||||
|
|||||||
That works now, thanks Funkydunk
Should have spotted that one
__________________
xcartmods.co.uk |
|||||||
#18
|
|||||||
|
|||||||
__________________
ex x-cart guru |
|||||||
#19
|
|||||||
|
|||||||
How would you sort by alphabetized in version 3.5.0
you had talked about being able to list the items via alphabetizing them from the data base instead of placing positions next to each item. what code do you have to implement and where?
I also need to do this for the items, but also for a subcatagories of names. I have artists first and last names and want them to show up alphabetized. Do I have to list them with their last name first or with a comma between first and last in order for this to work? |
|||||||
#20
|
|||||||
|
|||||||
In version 3.5 the facility exists in admin to change the order of the products on the page by going into general settings.
The categories will need to be put into order by using the position field unless you want to list them all by last name then first name. hth
__________________
ex x-cart guru |
|||||||
|
|||
X-Cart forums © 2001-2020
|