[ic] Matrix or Simple Options, Require customer to choose?

Mike Heins mike at perusion.com
Thu Jan 8 16:58:18 EST 2004


Quoting John Wolgamot (john at wolgamot.com):
> I have not posted in this list so I hope I use proper posting etiquette.
> 
> When there are simple or matrix options defined and when a customer
> clicks the BuyNow button, is there a way to have interchange require and
> notify a customer to choose an option before allowing them to continue?
> 
> Up to this point I'm simply making the default option
> SELECT COLOR or SELECT SIZE etc. so that when the order comes through,
> if the option in the order states SELECT SIZE then we know the customer
> forgot to select this option and we have to call to find out what they
> want.
> 
> I looked for a while in the lists however I had no luck locating a post
> which addresses my question. I hope I didn't give searching too soon.

This is a valid concern. It would be nice if the [item-options ..] tag
had an option to emit a blank setting for each; then all you would need
to do for matrix is add to the form:

	[set check_opt]
		mv_sku=mandatory
	[/set]
	<input type=hidden name=mv_form_profile value=check_opt>

For simple options, you could do:

	[set check_opt]
	    [query
		list=1
		sql="select distinct o_group from options where sku='[item-co de]'"
	    ][sql-code]=mandatory
	[/set]
	<input type=hidden name=mv_form_profile value=check_opt>

Putting it together:

   [if-item-field option_type eq Matrix]
	[set check_opt]
		mv_sku=mandatory
	[/set]
	<input type=hidden name=mv_form_profile value=check_opt>
   [/if-item-field]

   [if-item-field option_type eq Matrix]
	[set check_opt]
	    [query
		list=1
		sql="select distinct o_group from options where sku='[item-co de]'"
	    ][sql-code]=mandatory
	[/set]
	<input type=hidden name=mv_form_profile value=check_opt>
   [/if-item-field]

A competent consultant could set up a conditional based on the value of
the above options and make it work with the current code base.

This is a good enough point so that I will put it on my todo list
to handle in the next release.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295      <mike at perusion.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer


More information about the interchange-users mailing list