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
How to sort cartlinks
Author Message
Reply with quote
Post How to sort cartlinks 
The question was asked in another post, but I don't think it was answered.

The files in the html sub-directory that are used to produce the cartlink names don't appear to be sorted by anything.

How do we change the sorting of cartlinks?

View user's profile Send private message Visit poster's website
Reply with quote
Post  
I'm not sure we ever truly got a solution on this.
I think it was more sorted by date the file was uploaded.


_________________
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  
Tried the upload order with no success.

Tried the modified time too.

Seems to depend on the order in which the server fetches the list of "*.htm?" files from the html subdirectory.

I guess I need a little code to parse and reorder the $cartlinks variable in the header file.

View user's profile Send private message Visit poster's website
Reply with quote
Post  
What version of AgoraCart are you 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  
Agoracart version 5.2.005

website: http://www.dkdancewear.com/agora/agora.cgi

Trying to match the clients website page order.

I have iframes as pages (I hear they may be problemmatic) in an attempt to be somewhat object oriented.


_________________
Jim Untershine
www.gndzerosrv.com
View user's profile Send private message Visit poster's website
Reply with quote
Post  
You will want to get rid of iframes as soon as you can. Not really a good reason to use them within AgoraCart.

Anyway, I did find something on the sort. It does require hacking a core file, so be careful and make backups *before* doing any editing:

agora.cgi file. near the bottom you will find the sub cartlinks. below that you'll find...
Code:

  opendir(PAGES,"./html")||die("Cannot open Directory!");
  @clinknames = readdir(PAGES);
  for $clinknames(@clinknames) {

just add "sort" to the array like so...
Code:

  opendir(PAGES,"./html")||die("Cannot open Directory!");
  @clinknames = readdir(PAGES);
  for $clinknames(sort @clinknames) {


I hope it works for you.


_________________
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  
Thanks scottcrew

To sort $cartlinks alphabetically, agora.cgi must be edited to include 'sort' in the code snippit below.

opendir(PAGES,"./html")||die("Cannot open Directory!");
@clinknames = readdir(PAGES);
for $clinknames(sort @clinknames) {


_________________
Jim Untershine
www.gndzerosrv.com
View user's profile Send private message Visit poster's website
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