The Official Website of AgoraCart and Agora.cgi
AgoraCart.com Demos Download AgoraCart User Manuals & Wiki Gold Members Forum Go Gold Now! Gold Version Memberships

AgoraCart.com

About
Features
Download
Payment Gateways
Send a Donation
Founders Club
BLOG: News & Updates

Showcases & Demos

AgoraCart Demos
Shop Live Stores

Downloads & Add-ons

Gold Version Downloads
DBwizz Database Mgr.
AgoraCart.com Store

Help & Support

User Manuals
Gold Version Users Forum
Gold Version Chat
Tech Support
Certified Agora Pros
Certified Designers
Hire a Freelancer

Gold Version Members

Member Benefits
Join Today!
Gold Members Home
Gold Version Users Forum
Gold Version Chat Rooms
Gold Version Downloads

For Store Owners

Merchant Accounts
Cool Resources
Advertise Here
"Powered by" Logos
Web Hosting Search

Misc.

Contact Us
MEET's Talking Guide
The Ancient Greek Agora






AgoraCart Free User Forums

This is the official FAQ and Cool Tips guide For the AgoraCart shopping Cart software


Official Sponsors of the AgoraCart Project:

       


RegisterSearchFAQLog in
Reply to topic Page 1 of 1
Sorting the items before displaying
Author Message
Reply with quote
Post Sorting the items before displaying 
Is they a way to sort the items by the description before they get displayed?

View user's profile Send private message
Reply with quote
Post  
Products are sorted according to the product ID.
What version of the cart are ou using?


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post Sorting the items before displaying 
I'm using version 4.0K-4b. I have made many modifications so I do not want to update. If you give me the module and/or line number that does the sort I can make the modification myself. It seems to be whatever the cart is loaded in the database?

View user's profile Send private message
Reply with quote
Post  
There is a "Sort your way" hack available for v4.0k-4b, but it is only available to pro members.


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
I don't need the hack but if you tell me where in what module it should go, I'll write it.

View user's profile Send private message
Reply with quote
Post  
Sorry, since there is a hack to do this and it is for pro members, I can't discuss it.


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
scottcrew wrote:
There is a "Sort your way" hack available for v4.0k-4b, but it is only available to pro members.


how about version 5?

View user's profile Send private message
Reply with quote
Post  
Nope no such sorting available... The best way to sort would be to plan your product Id's accordingly.


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
what id love to do is have my products displayed in reverse order (most recent product ids shown first) - thanx tho

View user's profile Send private message
Reply with quote
Post  
i think i remember seeing someplace that perl has a reverse sort. not sure but the store/library/agora_db_lib.pl file is what you need. what i would do is refer to this file and submit_a_query sub and either use the freeform logic for the hack or add a library file in the custom folder. but then again hacking core files with appropriate comments is ok too.
d

Reply with quote
Post  
Dan wrote:
...the store/library/agora_db_lib.pl file is what you need. what i would do is refer to this file and submit_a_query sub and either use the freeform logic for the hack or add a library file in the custom folder. but then again hacking core files with appropriate comments is ok too.
d


thanx, i'd love to try this out - and i apologize for this - but 'step by step instructions' would probably be MOST helpful for me since i'm really new to how this all works.

i can somewhat understand lines of code - but lets just assume i dont. if you can help, itd be GREATLY APPRECIATED!

View user's profile Send private message
Reply with quote
Post  
not sure if it will work. backup your agora_db_lib.pl file!!!!!!
for agora 4.0k-4b

line 396 should be...
@database_rows = sort(@database_rows);

pound out that line and add the following...

@database_rows = reverse sort(@database_rows);

so the two lines will look like...

# @database_rows = sort(@database_rows);
@database_rows = reverse sort(@database_rows);

upload and download in ascii only. edit in a plain text editor only. if the change breaks the store or displays stuff in an unexpected manner then remove the new line and take out the "#" for the commented original line and upload.

this is untested so it may or may not work. assuming it works the only thing this will do is reverse the order of products displayed and will be global meaning viewcart and other instances will be reversed as well.

you must download the original file and place it in a safe place. then make a copy to another folder and use the copy as the working file. if you need to restore to original then you can try undoing what you did and uploading. if that fails then upload the backup file in ascii only to overwrite the live file.

let me know how it goes. you must test every aspect of the store... options, pricing quantities more than one and any other thingies you have to manipulate a products such as discounts.

it's possible that sorting will have to be changed elsewhere as well so this may not be a complete solution.

d

Reply with quote
Post  
i have version 5 - does this still apply?

View user's profile Send private message
Reply with quote
Post  
It should... Make sure that you make comments in the file and just after the file version number so that if there is an upgrade to the file at a later date, you will know that you had edited the file and would need to reapply your edit after the update.

HTH!


_________________
God Bless!
Bonnie - AgoraCart Moderator

Get a Gold Membership
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post  
worked perfectly - testing out my site, but seems ok so far! thanx!!!!

View user's profile Send private message
Reply with quote
Post  
cool beans. you're welcome.
d

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum