[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Randomly picking a product
you know it has occured to me.. YOu could always write a perl script
that randomly pics items and puts them into the appropriate files.
You know tell the script to pick 2 random items and then ut them in
random1.html and then 2 more and they go in random2.html
Then once it's written, setup a crontab to do it everday at like 3
am. Could also make the script restart minivend after this (unless
you have minivend restart nightly)
Should be simple, though logging of the banners (hits, clickthrus)
would be hard to track.
>****** message to minivend-users from Handytman@aol.com ******
>
>Sorry!
>I meant to always post my 'solutions'. :-)
>In this case, I really can't claim to have solved the problem. I
>don't want to count throught the products each time a page is served
>(too resource-consuming) and I couldn't think of another way to
>randomly select a product, so here's what I did:
>
>My objective was to have, on my home page, a changing "Featured
>Product" display. I have accomplished this, only it isn't random. I
>added a field, 'days', to products.asc. This field can contain
>numbers (1 to 31) separated by spaces, or it can be blank. You
>guessed it- the numbers determine which days of the month a
>particular product will be featured on my home page. Then, on my
>page, I place an in-page search as follows:
>
>[loop search="
> se=[calc]@timelist = localtime;$mday = $timelist[3];return $mday;[/calc]
> su=yes
> sf=days
> ml=1
> "]
>[loop-description]
>[page href="[loop-code]" send=1]More Information</a>[/loop]
>
>That's all I did! It accomplished my purpose- showing a different
>display every day- and it can be configured in advance. One caveat-
>make sure that *every* day of the month is somewhere in a 'days'
>field in products.asc. Otherwise, on that forgotten day, the page
>sure will look funny (empty).
>
>HTH,
>Rob Maurer
>
>*****************************************
>Hello minivend-users,
>
>the question was announced a few days ago by Rob Maurer (23.10.) as I found
>in the archive. But I did'nt see a solution.
>
>Rob, if you read this, did you solve your problem yourself? I would be very
>interested in that solution.
>
>Or is there anyone else with an idea?
>
>Sincerely
>
> Holger Matschinski
>
>-
>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
Ven's News: http://www.pragakhan.com/news.html
Experimental VenCam: http://www.expandyourhead.com/vencam
HEAVEN IS AN ORGASM is Rereleased
http://lordsofacid.pragakhan.com/heavenisanorgasm
Ven (ven@pragakhan.com) _________________ http://ven.pragakhan.com __
AOL: WebmstrVen Praga Khan's Official Website ICQ: 8321393
http://www.pragakhan.com
Lords of Acid Official Website
http://www.lordsofacid.com