changing Primary store currency at runtime

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
I'm not sure if you can use VWD...

Are you using PayPal standard??? If so I have uploaded the modified DLL to http://agentx.info/Nop.Payment.PayPal.dll

I suggest you first test this locally and verifiy it works the way you want it to.  After you are happy take a copy of the live one and backup it up.  The replace with this version.

Thanks,
Matthew

EDIT: USE AT YOUR OWN RISK
14 years ago
Thank you so much Skiltz!  I can't ever thank you enough.  I will be trying out that dll very soon.

Would you possibly know of a link where I can learn to compile this kind of stuff myself so that I will not have to ask somebody else to do it always?

Thank you so much again!

Oh, and yes, I am using PayPal Standard, so that is perfect!  Thank you!

Edit: Use at my own risk = in case there is a compiling error, or because I should never trust anybody on the internet?
14 years ago
You might be able to do it with Visual Web Developer just never used it as I use Visual Studio 2008.  Try and open the solution file with Visual Web Developer and see how you go.

If the solution opens then just right click on the projectin the "Solution Explorer" click "Build".
14 years ago
Defintely never trust anybody :)  But in all serious I just changed one line then recompiled.... just saying use at your own risk incase it doesn't work properly. i.e its a different base version or something! TEST TEST TEST and when you are happy send it live.
14 years ago
Thanks for the answer.  It does open in VWD, but I get this error when I right-click and say "Build Web Site".  

Error  1  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.  C:\Path\web.config  87  

I guess it probably does not work from VWD?  I tried with Visual Studio 2008 Express, but was not even able to open it.  It said something about the type .csproj not being supported.  Same thing with C++, VB 2008 express.

Edit: I just saw your other post.  Thank you.  I will test it over and over again before putting it live.
14 years ago
When you installed visual studio you probably choose not to install c# :)
14 years ago
Sorry, I forgot to try C#.  How could I be so foolish?  csproj of course stands for C Sharp PROJect!

I just tried that, and it seemed to work fine.  Now I just have to figure out which file I am supposed to retrieve.  I suppose it would be the Nop.Payment.PayPal.dll in the /bin/Debug directory?

Edit or should it be the one in the /obj/Debug directory?

Thank you again for all your help!

Last edit for today: Thank you Skiltz for all the time you have put in for me.  I guess it sounds a bit strange if you're in New Zealand (a beautiful place, I know), but I'm going to go to bed.  I'm GMT -05:00 (EST) here.  It's 10pm. :) I suppose it is about 3pm there (if my math is correct)?
14 years ago
Thanks Skiltz, for all of your help!  It is now working nearly perfectly in my live environment.

The thing I forgot to check in the local environment is my nopCommerce Administration Panel.  In the Sales > Orders section, it reads $5.00 CAD instead of $5.00 USD.  Everywhere else it seems to be correct (example in the order details of the user, and even in the "order notes" section of the Order Details in the Admin Panel).

Other than that little issue, everything works fine.  If you know where to find that issue, please be so kind as to tell me.  I'll let you know if I find it first.

Thank you again!
14 years ago
\NopCommerceStore\Administration\Modules\Orders.ascx line 111

change

<ItemTemplate>
             <%#Server.HtmlEncode(PriceHelper.FormatPrice(Convert.ToDecimal(Eval("OrderTotal")), true, false))%>
</ItemTemplate>

to

   <ItemTemplate>
                <%#Server.HtmlEncode(PriceHelper.FormatPrice(Convert.ToDecimal(Eval("OrderTotal")), false, false))%>
                (<%#Eval("CustomerCurrencyCode")%>)
            </ItemTemplate>
14 years ago
Thank you Skiltz for the reply.  I came across that line of code, but could not figure out how to change it.  I was trying the following:

<%#Server.HtmlEncode(PriceHelper.FormatPrice(Convert.ToDecimal(Eval("OrderTotal")), true, NopContext.Current.WorkingCurrency))%>

as well as NopContext.Current.User.Currency

but it did not work.

Thank you so much for the solution!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.