[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: text input on browse page?
****** message to minivend-users from Larry Leszczynski <larryl@furph.com> ******
Hello Roddy -
> i'd even be satisfied with a text-input field on the shopping-basket
> page. but am told that's not possible either.
Repeat after me: Anything is possible with MiniVend. Anything is
possible with MiniVend. Anything is possible with MiniVend. :-)
I've got a client site that allows clothing items to be imprinted with
custom text, and a text input field on the basket page is supplied for
each item that is imprintable. It's at:
http://www.brodysonline.com/cgi-bin/brodys
(Note: It loads pretty slow, but they *love* those FrontPage mouseover
buttons and won't let me change them - go figure...)
Steps:
1) In catalog.cfg:
UseModifier color size imprinttext
^^^^^^^^^^^
This allows the "imprinttext" attribute to be attached to items in the
cart and not be discarded when the cart is updated, etc.
2) In products.asc:
Add a field called "imprintable". Set it to "yes" for items that can
be imprinted, leave blank otherwise.
3) In ord/basket.html, within the [item-list]:
[item-accessories size]
[item-accessories color]
[if-field imprintable]
Imprint: <input type=text name=[modifier-name imprinttext]
value="
[perl interpolate=1]
my $value = q{[item-modifier imprinttext]};
$value =~ s/"/"/g;
$value;
[/perl]
">
[/if-field]
The whole [if-field]...[/if-field] is actually on one line of text, I
split it up here for clarity. The extra [perl] bit in the the value
part allows for the user to type quotation marks within the specified
text. I suppose you could also filter out invalid chars, trim to a max
length, etc. I suppose that [perl] tag could actually be a [calc] for
sake of speed, now that I think about it...
4) In ord/checkout.html, ord/receipt.html, ord/report.html, within the
[item-list]:
[if-modifier color]
([item-accessories color, display])
[/if-modifier]
[if-modifier size]
([item-accessories size, display])
[/if-modifier]
[if-modifier imprinttext]
(Imprint: <b>[item-modifier imprinttext]</b>)
[/if-modifier]
Larry Leszczynski
larryl@furph.com
--
furph, Inc. WWW/Unix/Windows Solutions 734-513-7763 (voice)
info@furph.com http://www.furph.com 734-513-7759 (FAX)
-
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