[ic] Dealer simplo ptions prices WAS Dealer options prices
Brian Kosick
briank at nacs.net
Tue Jul 15 20:42:03 EDT 2003
OK here's what I did.
on the customerservice page (the page after log in) I placed the
following code
[if scratch dealer]
Is dealer
[profile dealer]
[perl]
$::Variable->{MV_OPTION_TABLE_MAP} = "price wholesale";
return;
[/perl]
[else]
[perl]
$::Variable->{MV_OPTION_TABLE_MAP} = "";
return;
[/perl]
[/else]
[/if]
in Data.pm I placed the following code
::logDebug("option_cost found enabled record");
my $fsel = $opt_map{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my @rf;
# Modded by BSK
if($::Variable->{MV_OPTION_TABLE_MAP})
{
$opt_remap = $::Variable->{MV_OPTION_TABLE_MAP};
$opt_remap =~ s/^\s+//;
$opt_remap =~ s/\s+$//;
my @tmp = split(/ /, $opt_remap);
if ( ($tmp[0] eq "price") && ($tmp[1] eq "wholesale") )
{
for(qw/o_group wholesale o_master/) {
push @rf, ($opt_map{$_} || $_);
}
} else {
for(qw/o_group price o_master/) {
push @rf, ($opt_map{$_} || $_);
}
}
} else {
for(qw/o_group price o_master/) {
push @rf, ($opt_map{$_} || $_);
}
}
# End mod by BSK
# Original
# for(qw/o_group price o_master/) {
# push @rf, ($opt_map{$_} || $_);
# }
this works with once small problem. On both the basket, and the
checkout my original issue still occurs (wholesale item price added to
option regular price) but if I click on refresh, it then adds the
wholesale item price to the option wholesale price. Which is what I
want it to do, I just can't figure out why I need to click on refresh
before it performs correctly.
Any Ideas?
More information about the interchange-users
mailing list