Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Can I use an order profile to check attributes before adding item to cart?



******    message to minivend-users from Randy Moore <ramoore@axion-it.net>     ******

Hi All,

I'm trying to figure out how to use an order profile to verify an items 
attributes before allowing the item to be placed in the customers cart.

In this case, I'm selling a Gift Membership and have defined some 
attributes (account name, password, etc) as text fields that have to be 
filled in before the item can be purchased.

The idea is to use an order profile to make sure that the customer has 
properly filled in these attribute fields before adding the membership to 
the cart.

I'm using MV v4.04a.

Here is a simplified example of what I'm trying to do:

[set mv_UseModifier]gusername gpassword gemail[/set]

[set name=order_gift_profile]
mv_order_gusername=required
mv_order_gpassword=required
mv_order_gemail=required
mv_order_gemail=email
&fatal = yes
&set=mv_nextpage ord/basket
&set=mv_successpage ord/basket
&set=mv_todo submit
[/set]

     [if errors]
         There were errors in your form submission.
         <BLOCKQUOTE>
         [error all=1 show_var=1 show_error=1 joiner="<BR>"]
         </BLOCKQUOTE>
     [/if]


<form action="[process-target]" method=POST>
<INPUT TYPE=hidden  NAME="mv_doit" VALUE=submit>
<input type=hidden  name="mv_order_profile" value=order_gift_profile>
<input type=hidden  name="mv_order_item" value="MEMBERSHIPGIFT">
<input type=hidden  name="mv_order_quantity" value="1">
<INPUT TYPE=hidden  NAME="mv_nextpage"       VALUE=gift>

Enter username:
<input type=text    name="mv_order_gusername" value=""><BR>
Enter password:
<input type=text    name="mv_order_gpassword" value=""><BR>
Enter email address:
<input type=text    name="mv_order_gemail" value=""><BR>
<input type=image src="/images/button_purchase.gif">
</form>


In this case, the proper errors are returned if the fields are not filled 
out, but the product gets added to the shopping cart anyway.

Any suggestions would be greatly appreciated.


Randy Moore
Axion Information Technologies, Inc.

email     ramoore@axion-it.net
phone   301-408-1200
fax        301-445-3947
-
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


Search for: Match: Format: Sort by: