[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] combine values to generate product sku and place in basket
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Scott Benson (scott@rant.tzo.com):
>
> so now what is the best way to get "[value style][value color][value
> size]" as the product's sku pushed into the cart (basket.html)?
>
MV4.x/Interchange's ActionMap allows you to override or create an action
-- there is an example in the Interchange "barry" demo:
# Here we override Interchange's normal order routine
ActionMap order <<EOR
sub {
#Log('in order action');
if($CGI->{mv_nextpage} ne 'order') {
# Do nothing
}
elsif($Values->{no_basket}) {
$CGI->{mv_nextpage} = 'ord/nobasket';
}
else {
$CGI->{mv_nextpage} = '__ORDER_STYLE__/basket';
}
if($CGI->{style}) {
$CGI->{mv_order_item} = $CGI->{style} . $CGI->{color} . $CGI->{size};
Log("ordering $CGI->{mv_order_item}");
}
elsif ( ! $CGI->{mv_order_item}) {
$CGI->{mv_order_item} = $CGI->{mv_arg} || undef;
}
$Tag->update('values');
return 1;
}
EOR
Probably better is to do "ActionMap style_order" and let
the normal routine stay, though.
Now:
[page href=style_order
form="
style=somestyle
color=somecolor
size=somesize
"]Order it</A>
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>
Be patient. God isn't finished with me yet. -- unknown
-
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