[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] products database
Hi Jerry,
do you remember the email below? Well, everything works fine except one
thing: I get an error message in the logs:
"process profile VK2 (default) non-existant"
VK2 is the profile I switch to by logging in as a specific user. I think
it has something to do with shipping (as shipping price disappears) but
I'm not sure. what else could it be?
thanks,
andreas
On Tue, 2002-02-26 at 16:44, Jerry wrote:
> We use LOCALE to set the price for each type of customer.
> In the userdb we added a column called "rate" which defines
> what type of customer. This, for us, is either empty or contains "wsale" or
> "dsale"
> indicating wholesale or distributor buyer.
>
> We setup a empty 3 column locate.txt database with:
> code wsale dsale
>
> In catalog.cfg we added or modified the locale setup wtih these lines.
> Note this would be for US currency. You might need to modify the picture
> stuff.
>
> PriceField price
> Locale en_US PriceField price
> Locale wsale PriceField wholesale
> Locale dsale PriceField distributor
> Locale en_US price_picture "$ ###,###,###.##"
> Locale wsale price_picture "$ ###,###,###.##"
> Locale dsale price_picture "$ ###,###,###.##"
>
>
> # Locale en_US LC_CTYPE C
> LocaleDatabase locale
>
> Now, in the products database, add columns for your
> wholesale and distributor prices. We called ours
> wholesale and distributor. These contain the proper prices
> for those buyers.
>
> Lastly, when a user logs in, they are forwarded to a page
> that contains the following code to setup their pricing.
> This, I'm sure, could be cleaned up a bit, but it works
> for us.
>
> [if session logged_in]
> [set name="proper_pricing" interpolate=1][data base="userdb" field="rate"
> key="[data session username]"][/set]
> [set name="proper_locale" interpolate=1][data base="userdb" field="rate"
> key="[data session username]"][/set]
> [else]
> [set proper_pricing]en_US[/set]
> [set proper_locale]en_US[/set]
> [/else]
> [/if]
> [if type=explicit
> compare="[calc] '[scratch mv_currency]' ne '[scratch proper_locale]'[/calc]"
> ]
> [setlocale locale="[scratch proper_pricing]" currency="[scratch
> proper_pricing]" persist=1]
>
> That's it. You could have as many as you wanted, just expand this.
> Hope this helps...
>
> Jerry Uphoff
>
>
>
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
>