Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] v3.12 - [sort] not working with [loop args]



******    message to minivend-users from Ed LaFrance <edlafrance@printexusa.com>     ******

Hello all -

I was working on a page which used a [loop] list and was attempting to sort 
it when I came across this problem.  I ended up using some inline Perl to 
solve the problem, because I could not get things to work in accordance 
with the docs!

I was trying to sort a short delimited list in a scratch variable, and the 
sort was just not happening.  The docs are quite clear on how to use the 
[sort] tag with loops, after a couple variations I got suspicious.  I 
copied this code snip directly from the docs, pasted it into a page by 
itself and called it:

[loop 4 3 2 1]
	[sort -2 +2]
	[loop-code]
[/loop]

...nothing!  The page was blank.  I also tried:

[loop 4 3 2 1]
	[loop-code]
[/loop]

...still a blank page.  I changed it as follows:

[loop arg="4 3 2 1"]
	[sort -2 +2]
	[loop-code]
[/loop]

...and...

[loop arg="4 3 2 1"]
	[sort =2-3]
	[loop-code]
[/loop]

...still a blank page!  Finally I tried:

[loop arg="4 3 2 1"]
	[sort]
	[loop-code]
[/loop]

...and...

[loop arg="4 3 2 1"]
	[loop-code]
[/loop]

At last the args were listed on the page, but they were not sorted in the 
instance where the [sort] tag was included.

So, it appears that:

1). [loop arg arg arg] does not work at all, though the docs say it is 
legal; [loop arg="arg arg arg"] must be used instead;

2). [sort] does not work at all in this context.  I have used [sort 
database::fieldname] with [tag each database] and [loop search], so I know 
those work, but when the loop data is supplied as a literal argument or 
variable string and/or the sort is based on the loop data itself (instead 
of a related database field), the sort tag appears to be broken.

I know I am talking "old" stuff here - v3.1x - but since there are 
thousands of carts running on this version out there, can anyone 
corroborate my findings?

- Ed L.
Printex Marking Technologies
12113 Kirkham Rd.
Poway, CA  92064  U.S.A.
858-513-2418
800-982-1928
858-513-2419 FAX
http://www.printexusa.com

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: