• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

birdsafe
#1 Posted : Wednesday, May 16, 2007 9:09:57 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

Is there a way to write a script that will change an image depending on the state of a customer's shopping cart? So that once they ad an item to their cart, a particular image area changes from one image to another?
Cliff
#2 Posted : Monday, May 21, 2007 5:30:08 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

Absolutely, just depends on what you're going for, because there are a few ways to do it, from vb.net/css class to vb.net/img tag to javascript, etc. For example, if it's something like a cart icon that you want to change to display as 'filled' when there are items in the cart, you might use a background image and tell the element to change the CssClass when the cart > 0. This way you could handle the rest via your stylesheet. Is that what you're wanting to do?
birdsafe
#3 Posted : Monday, May 21, 2007 8:31:31 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

Thanks Cliff -- didn't think about CSS -- I'll have to jump into that and see if that works -- Yes, that's exactly what I want to do -- I'm building my theme around a store "mascot" and one of the images involves the cart. I wasn't aware that you could call the cart contents from CSS.
Cliff
#4 Posted : Monday, May 21, 2007 8:45:25 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

You can't actually check for the cart contents via CSS, but if you use VB.Net in the code-behind to change the CssClass of the cart icon (or mascot) you can change the image via CSS more conveniently than in the code.

If I can find some time to play with it, I'll try to post an example.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012