Interchange Developer Resource
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

[ic] Re: Display Wholesale Price (In drop down box)



Success!

I finally got a chance to dive into this and spend the time needed to
track this down.

Seems the code in Interpolation.pm which does the creation of the SELECT
statements to make up the drop down box is "hard coded" to options:price.
(My programming skills are very limited so feel free to correct me, I can
take it :)

Mike's comments about after.cfg are required to make the rest of the
dealer pricing work properly but it does not force the drop down prices to
display the pricing from options:wholesale. I tried a "Variable
MV_OPTION_TABLE_MAP price wholesale" statement in after.cfg and that did
force the drop down to display the wholesale price field all the time. Not
exactly what was needed.

The following diff is against Interpolate.pm that comes with 4.8.6

1942a1943
>
2054c2055
<               for(qw/code o_enable o_group description price weight volume differential o_widget/) {
---
>               for(qw/code o_enable o_group description price weight volume differential o_widget wholesale/) {
2074c2075,2079
<                       $price->{$ref->[0]} = $ref->[4];
---
>                       if($Scratch->{dealer}) {
>                               $price->{$ref->[0]} = $ref->[9];
>                       } else {
>                               $price->{$ref->[0]} = $ref->[4];
>                       }


Here is a link to a working example of what this does. Clicking on the
link will bring up a product with a drop down list with normal pricing.
(Adding the product to your cart makes viewing the product easier after
the next step) Now login as a dealer (jdoe/test) and you will be able to
see that the drop down pricing now changes. (Would not change prior to the
above patch)

http://www.thestimulantpeople.com/cgi-bin/dnestore/B10034965.html

It doesn't appear that this breaks anything else but I would like to hear
from those more familiar with the code if this is a bad thing to do or not.

Thanks

John
-------------------------------------------------------------------------
NetRom Internet Services			973-208-1339 voice
john@netrom.com					973-208-0942 fax
http://www.netrom.com
-------------------------------------------------------------------------


On Mon, 22 Jul 2002, John Vozza wrote:

> I have spent the last few days trying to get the wholesale price to be
> displayed in the drop down options widget.
>
> I have searched the archives and found what should have been an answer
> from Mike Heins at
> http://interchange.redhat.com/pipermail/interchange-users/2002-January/016683.html
>
> I added the changes to after.cfg and restarted interchange (4.85) and
> while the pricing is correct on orders the drop down option box still
> shows the retail price.
>
> Can anyone point me in the right direction? One of the things Mike said
> was, "Remember this is all done in the foundation in etc/after.cfg, and is
> specific to the "tools" personality of foundation." I'm just not sure what
> this means or how I can correct this display issue.
>
> Thanks in advance
>
> John
> -------------------------------------------------------------------------
> NetRom Internet Services			973-208-1339 voice
> john@netrom.com					973-208-0942 fax
> http://www.netrom.com
> -------------------------------------------------------------------------
>
>
>



Search for: Sort by: