
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] dynamic profiles.order
On Sun, Nov 11, 2001 at 12:13:54AM -0800, Patrick J. Walsh wrote:
> I have an interesting problem and have exhausted the archives and the
> docs that I can find. Hopefully someone here will have a suggestion or
> pointer.
>
> Certain software products in our store require that the customer agree
> to a license agreement before purchasing. Each product that has a license
> generates a checkbox like so:
>
> <input type="checkbox" value="checked" name="license_[item-code]">
>
> with a label like so:
>
> [error name="license_[item-code]" std_label="I have read and agreed..."
> show_label=1 required=1]
>
> However, the "required=1" parameter is apparently not enough to force
> the user to check the box before checking out. This suggests that I need to
> have associated entries in etc/profiles.order. My problem is this: how do I
> make a dynamic profiles.order that adds the appropriate "required" lines
> depending on which products are being purchased? Or is there a way to
> require a field without putting an entry into profiles.order?
Something along these lines:
[set order_profile]
[perl]
$license=&license_number;
push @OUT,qq`$license=required That item requires a license.` if(&license_required);
return join "\n",@OUT;
[/perl]
[/set]
where license_number maps item_code to appropriate license and license_required
tests whether or not you need it. If you do this in basket, you need to iterate
for(@{$Vend::Items}) and will probably want to stuff the license into an
attribute for convenience; on product flypage, you have the [item tags].
It sounds like you want that profile on product flypage.
>
> Any pointers appreciated.
>
> Patrick Walsh
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
--
Christopher F. Miller, Publisher cfm@maine.com
MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039
1.207.657.5078 http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users