
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
RE: [ic] Size based shipping (almost got it)
Ok I almost have this working. Every thing works but the if statement.
Here is my user tag now:
#Shipping user tag
UserTag ship Routine <<EOF
sub{
package Vend::Interpolate;
my $total =0;
for(@$Items) {
#if {$Tag->accessories('size') =~ /^s/i} {$total += $_->{quantity} * 8.95;}
if {$Tag->accessories{'Size'} =~ /^m/i} {$total += $_->{quantity} * 9.95;}
#if {$Tag->accessories('size') =~ /^l/i} {$total += $_->{quantity} * 10.95;}
#if {$Tag->accessories('size') =~ /^xl/i} {$total += $_->{quantity} *
11.95;}
}
return $total;}
EOF
I just can not figure out how to do the "$Tag->accessories{Size}" part. I
need it to find the option "size" I have set up for the item. Once i get
this I am done. How should this be done?
My option.txt is:
AP212 1 AP212 Size 1 Size m=Medium*,^Ml=Large select
m==32.95,l==49.95
Thank you all for the help,
Rick
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users