[ic] converted saved carts to light box

Paul Jordan interchange-users@interchange.redhat.com
Thu Dec 20 11:54:00 2001


OK, laugh if you want but I am not an expert in perl and IC. We needed to
have a light box or "favorites" for images for logged in client. So seeing
as we were never going to use the "saved carts and recurring carts" feature,
I converted that. Basically on a FLYPAGE I added:
------------------------
[set Save Cart]
mv_todo=return
mv_nextpage=saved_carts
save_cart=none
[save_cart nickname="[item-code]"]
[/set]
<FORM ACTION="[process-target]" METHOD=POST>
<INPUT TYPE=hidden NAME="c_nickname" VALUE="[item-code]">
<INPUT TYPE=HIDDEN NAME="save_cart" VALUE="cart">
<INPUT TYPE=HIDDEN NAME="mv_todo" VALUE="return">
<INPUT TYPE=HIDDEN NAME="mv_check" VALUE="Save Cart">
<INPUT TYPE=image src="http://www.imagemogul.com/buttons/addtolb.gif"
VALUE="Save Image">
</form>
-----------------------------

Now on the saved_carts.html page I really did a number. The gist is, I am
able to display the sku (because I used it as the c_nickname above) and I
can show a delete button and a thumbnail image next to it, like we wanted.

Here is the problem, if people start putting alot of images in their light
box "favorites", they may select the same image twice, IC appends the
nickname for like items with ,1  ,2  ,3 etc. As you can guess, this now
makes referencing thumbnails and flypages from the saved_carts.html very
hard.

So basically it works great for unique entries, but kinda breaks with like
entries. Please don't flame me for my altering of saved_carts, it will go on
to serve us well in a new life as the light box!!

Also, is there a bug with IC that doesn't let you delete ALL the saved carts
in saved_carts.html? I can delete all but one, but when you leave the
saved_carts.html and come back in, the last one will in fact be gone...???

IC 4.8.1
Thank you

PS, I read, in the archives about someone trying to write a book or tutorial
about IC. You know I personally would spend quite a bit for purchasable
resources, like books, classes, or plugin-like alterations. If someone is
writing a book, put me down for a gross!  :)