Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Business School scripting

Lecturer Grantham
Registered User
Join date: 26 Feb 2009
Posts: 3
03-03-2009 12:09
Hi,

One of the departments in our institution (marketing/retail) would like to see if it is possible to build a 'virtual shop' to demonstrate the value of product placement.

The idea is a student could come in pick up a basket and browse shelves of objects, choose the ones they like and then add them to a virtual 'shopping basket'. They don't physically have to move - but we'd like to keep track of what items the students like.

I'm not really used to scripting outside of the simple presentation stuff we have done in SL but I figure in pseudo code it would be something like:

AddItem{
If Avatar has basket
Then Add ItemName, ItemKey to ShoppingArray
}

BuyItems{
If Avatar has basket
Read ShoppingArray
If !Empty
Send Items... UserDetails to Server X
Clear ShoppingArray
}

But I'm not sure how to manage an instance of a shopping array for a particular user. The basket attachment really isn't that necessary but being able to track what the users would like to 'buy' is the general gist. Sorry for the long first post.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-03-2009 13:07
Very doable. While you could certainly do this all from just SL scripts, the most robust way to do it would PROBABLY be for small in-world scripts to work essentially as a UI for a web application on an external web server. That would allow each resident to have their list of selected products in a stable off-world database and would allow in-world objects to manage each user's list: adding and removing items, querying the whole list, doing check-out, clearing the list, etc.

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llHTTPRequest
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
03-03-2009 15:02
You might also want to hop over to the Particle Laboratory and see what Jopsy did with the particles he sells. Pretty neat system of dropping the ones you want in a shopping bag. It keeps track of buy so many and get one free items and then you buy the bag and it gives you the contents.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
03-03-2009 15:12
From: Jesse Barnett
You might also want to hop over to the Particle Laboratory and see what Jopsy did with the particles he sells. Pretty neat system of dropping the ones you want in a shopping bag. It keeps track of buy so many and get one free items and then you buy the bag and it gives you the contents.


That sounds like a stroke of genius, I think I will go have a look too. Would be a perfect way to get Supermarkets interested in SL, and most of them have an on-line shopping section. What a pleasure if I don't have to logout to go buy the grocery's for supper :)
Lecturer Grantham
Registered User
Join date: 26 Feb 2009
Posts: 3
03-03-2009 15:19
thanks for the replies guys, I'll take a look into the suggestions :)
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
03-04-2009 01:43
LOL I was just talking about this exact thing about a week and a half ago with a friend..It's a neat concept, and you're right, the only place I've seen something similar to it is at the Particle Lab, his is pretty slick!
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
03-04-2009 13:27
Thanks! I had a blast designing that vendomat system. The essential requirement was to see the particles "in motion" to get a taste for them in use.

The first pass was to have an actual shopping cart that would follow the user around the store. (Which I abandoned at the time because I was offering 'no-copy/transfer' items of the same name as the 'copy/no-transfer' items and didn't want to deal with the disambiguation problem. =)

I was also concerned that the shopping cart might be a little much effort to figure out for someone that only wanted to buy one texture.

It seems about 50% of the customers use the "Buy One" feature on my current vendomats, the other 50% use the cart/shopping-bag aspect.

Still needs a little refinement but it's slick enough that I may offer the vendomat as a for-sale product at some point. I'd be happy to keep track of anyone interested in an early release =)
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources.
Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas.
-
Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
Lily Cicerone
Registered User
Join date: 25 Jan 2007
Posts: 30
03-04-2009 13:37
From: Hewee Zetkin
Very doable. While you could certainly do this all from just SL scripts, the most robust way to do it would PROBABLY be for small in-world scripts to work essentially as a UI for a web application on an external web server. That would allow each resident to have their list of selected products in a stable off-world database and would allow in-world objects to manage each user's list: adding and removing items, querying the whole list, doing check-out, clearing the list, etc.

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llHTTPRequest


The external web server option would also make tracking sales data infinitely simpler for a better end result. If you can handle it, it would definitely be worth a go.
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
03-04-2009 13:41
Also, for anyone dealing with vendomats... and all the paranoid headaches associated with requiring PERMISSION_DEBIT, please
take a peek at
"Safe" DEBIT_PERMISSION"

http://jira.secondlife.com/browse/VWR-3387

And consider bumping it with a vote. Thanks!
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources.
Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas.
-
Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
HatHead Rickenbacker
Registered Loser
Join date: 6 Nov 2006
Posts: 133
03-04-2009 15:00
@ Lecturer. If are you most interested in the response of the participants to product placement then you might not really need the added complication of a shopping basket. You could just have the participants touch the objects they would be interested in and capture this reporting - do they really need to go through a simulated check-out process or is the after-the-fact with regards to product placement?
Lecturer Grantham
Registered User
Join date: 26 Feb 2009
Posts: 3
03-04-2009 15:57
We had thought of just tracking the clicks on the objects, at the moment that is the system I have implemented. Touch object sends avatar details + object details to a webserver where the data can be processed. Really the basket attachment was an attempt to mimic real life behaviour in some way. We aren't looking at physically moving objects into a basket at the minute just conceptually adding them.

I must admit the shopping basket does seem to pose some problems for my limited experience. My first approach to it was to rez a basket and then use its key to identify a shopping session, detroying the basket at checkout.

In order to do this I was thinking of passing the product key (target object ID) and the basket key (attachment object ID) to the webserver on a touch event. I can get the product key easily because the script that does the http stuff is embedded in that object (llgetkey) but I'm confused as to how I can pass the key from my avatar's attached basket to the script contained in the product I am touching. I did try a rudimentary handshake using listeners but I ended up confusing myself

Any ideas? I should point out that at the moment we are just trying to demo what sort of stuff SL can do rather than building a really robust system to deal with hundreds of visitors.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-04-2009 18:52
Have the basket register itself as the wearer's on attach. Then when a resident touches, assign to the basket currently registered to that resident (if that resident doesn't have a basket registered, either make it a no-op or create some kind of temporary--"basketless"--session). A new "session" will start when a new basket (including the same one that has been detached, since attachments get a new key each time they are rezzed for attachment) is attached.