Akopia Akopia Services

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

Re: [mv] Showing 1 product from the whole database



******    message to minivend-users from Handytman@aol.com     ******

Chris,
I had to solve this problem. I never did figure out a quick way to randomly 
select a product from an ever-changing products database. However, My 
solution  works (for us) a bit better, since we control which products 
"randomly" display, and when they show up.
First, I add a field to products.asc called "days" which is populated with 
the number(s) of the day upon which this product should be displayed. (1 for 
the first of the month, 2 for the second, etc.)
Then, on the first page of the catalog (catalog.html) do an in-page search, 
based upon the current day, in that new database field. If you limit the 
number of search returns to one, it will return the first product in 
products.asc which contains today's date (the day of the month) in the "days" 
field.
Here's how it looks on my page:

[loop search="
 se=[calc]@timelist = localtime;$mday = $timelist[3];return $mday;[/calc]
 su=yes
 sf=days
 ml=1
 "]
In the Spotlight...
[loop-description]
[page href="[loop-code]" send=1]More Information[/page]
[/loop]

Not exactly what you asked for, but it works for me!
-Rob Maurer

In a message dated 2/8/00 10:31:24 AM Eastern Standard Time, 
minivend@cmehler.de writes:

> Hi!
>  
>  Following Prob:
>  On the first page of my shop I'd like to show only 1 product from my
>  products database and every time the site is loaded it should be a
>  different one. It should be like the browse-page in the simple demo, but
>  only 1 product should be shown.
>  Can anybody help me ??
>  
>  Thanx
>  Chris
-
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: