How to override CurrencyService and IDependencyRegistrar processing order

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 yıl önce
Hi Dave

Thats really interesting how do I add the second price to a product variant in Euroland [GBP].

If it's that simple I'll definatly use that method as it'll also cover any future currencies the client may wish to add.

Cheers
Jon
11 yıl önce
webmonger wrote:
Hi Dave

Thats really interesting how do I add the second price to a product variant in Euroland [GBP].

If it's that simple I'll definatly use that method as it'll also cover any future currencies the client may wish to add.

Cheers
Jon


Number of ways of doing that. But seems to me you'd want to store the alternate prices in a new table rather than add loads of new properties to the PV

Id (PK)
ProductVariantId (FK)
CurrencyId (FK)
Price
OldPrice
CreatedOnUtc
UpdatedOnUtc

Then change the get:set for Price/Oldprice in Nop.Core.Domain.Catalog.ProductVariant.cs ?

You should be able to pick up the users currency from NopContext ?

Something like that.

HTH
11 yıl önce
Right cool, I wondered if you had a way to do it without editing the database/controllers etc...

I'll see how I get on

Cheers
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.