[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: may be an actual bug.Revisited
****** message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com> ******
At 05:30 AM 6/4/99 , mediamob wrote:
>****** message to minivend-users from mediamob <mediamob@dnaco.net>
******
<snip>
>
>I have also tried numeric sorts on other fields ( new values for tf=) and
>do not get the server error. On the only other numeric field I use (time)
>the sort is even vaild. The only thing that sets it off is sorting on
>0.
>
>If there is no way to do this, I am soliciting workarounds - I have
>thought of two:
>
>1. A duplicate field in each record that matches the value of [code].
>Major Kludge which I would like to avoid.
>
>2. Manual sorting of products.asc so the "native" order is numeric on
>[code]. Preliminary tests seem to indicate that this order is preserved
>into the GDBM file, but I'd like confirmation before I start a manual sort
>on that assumption.
I'm fairly certain that it is.
>
>
>Thanks all for your time-
>
>Pat Santucci
>
>Here's the original message:
>
>Date: Sun, 30 May 1999 13:35:45 -0400 (EDT)
>From: mediamob <mediamob@dnaco.net>
>To: minivend-users <minivend-users@minivend.com>
>Subject: This should work - may be an actual bug.
>
>
>Greetings all-
>
>I recently posted to the list with a problem sorting a search based on the
>code. Mike replied that the sort was failing because code is not a named
>field, but rather the key, and offered a fix that looks much better than
>what I was doing. Here's the page with the fix in place:
>
>[loop search="ra=yes/tf=0/to=n/ml=100000"]
>[page href=browse1 arg=[loop-code]:1]<I>MediaMob# [loop-code]</I>  
><B>[loop-field Mobtitle]</B>
>[/page] arg to browse1 = [calc][loop-code][/calc]:1
>   
>[order [loop-code]]Add to cart[/order]
><B>[L]Our Price[/L] [loop-price]</B><p>
>[/loop]
My $0.02 .... I don't think you need to put [calc] around [loop-code]....
but that's not the problem. So, the idea here is to numerically sort all
the products, generate links to order the product or display the product
with 'browse1' (not the flypage?), and print the price.
Instead of loop search you may want to check into [tag each products]
Here's an untested attempt at doing the same as above:
[tag each products]
[sort products:code:n]
[page [loop-code]]<I>MediaMob# [loop-code]</I> <B>[loop-field
Mobtitle]</B>[/page] [order [loop-code]Add to
cart[/order]<B>[L]Our Price[/L] [loop-price]</B><p>
[/tag]
I would also make sure that your DB columns are correct, (is it Mobtitle or
mobtitle?)...
[loop search="ra=yes/tf=0/to=n/ml=100000"]
>[page href=browse1 arg=[loop-code]:1]<I>MediaMob# [loop-code]</I>  
><B>[loop-field Mobtitle]</B>
>[/page] arg to browse1 = [calc][loop-code][/calc]:1
>   
>[order [loop-code]]Add to cart[/order]
><B>[L]Our Price[/L] [loop-price]</B><p>
>[/loop]
>
>Here's what I see in the browser when I load the page:
>
>Internal Server Error
>
>The server encountered an internal error or misconfiguration and was
>unable to complete your request.
>
>Please contact the server administrator, @dnaco.net and inform them of the
>time the error occurred, and anything you
>might have done that may have caused the error.
>
>And here is the applicable section of error.log:
>
>pm3-1-6.dnaco.net nYaFg77d:LOCAL - [30/May/1999:13:22:31 -0400] mobtest
>/cgi-bin/mobtest/numberidx Runtime error: Bad sort routine:
>> sub {
>> my @a = (split / /, $a, 2)[];
>> my @b = (split / /, $b, 2)[];
>> my $r;
>> return 0
>> }
>>
>> syntax error at (eval 39) line 2, near "[]"
>> syntax error at (eval 39) line 3, near "[]"
>>
>
>DOes anyone know what to do? Mike?
>
>Would anyone be willing to try similar code on your server to see if it
>may be a local problem for me?
>
>Hopefully-
>
>Pat Santucci
>
>
>-
>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
>
Ryan Hertz tel 520-645-3812
Webmaster tel 800-645-BAIT
Advertising Director fax 520-645-2588
Gary Yamamoto Custom Baits, Inc. http://www.yamamoto.baits.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