Dynamic Pricing for Precious Metals Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 anos atrás
I've completed a new plugin that automatically calculates prices for products that contain precious metals like gold or silver by looking up current market rates from a web service.

If you sell coins or jewlery, this is very useful.  Check it under Downloads / Extensions.

Also, another developer from here is working on adding support for currency conversion and tier prices.  We are developing at codeplex and will post the updated module back here when done.


If you have some other need for dynamic pricing, check this out.  It can probably be modified for your purposes.

-Matt
12 anos atrás
Hi,

I'm 'the other' developer, and I've contributes some code as well for the plugin.
Now it support's multi currency, and it has a nice bulk edit and grid edit feature.
It also has better handling for Tier Pricing.

Kind regards
12 anos atrás
Cheers for this guys, I have been looking for something that does exactly this :)

One question, I am a compete novice when it comes to changing/adding code the source files. Can you please advise exactly where I should add the new tab as an iframe in "_CreateOrUpdate.cshtml"?

Maybe you could tell me at what line?

Many thanks in advance,

Glenn.
12 anos atrás
glennlawr wrote:
Can you please advise exactly where I should add the new tab as an iframe in "_CreateOrUpdate.cshtml"?


Sure.  Look towards the top.  You will see the existing tabs all starting with x.Add(), like this:


x.Add().Text(T("Admin.Catalog.Products.Variants.Info").Text).Content(TabInfo().ToHtmlString()).Selected(true);
x.Add().Text(T("Admin.Catalog.Products.Variants.TierPrices").Text).Content(TabTierPrices().ToHtmlString());
x.Add().Text(T("Admin.Catalog.Products.Variants.ProductVariantAttributes").Text).Content(TabProductVariantAttributes().ToHtmlString());
x.Add().Text(T("Admin.Catalog.Products.Variants.Discounts").Text).Content(TabDiscounts().ToHtmlString());


Simply add the new tab at the end. In nop 2.20, this would be a new line #14.  Copy the new line from the Notes.txt file.  You will notice that it still starts with x.Add(), but we use a different convention to get the tab content to be an iframe in a single line.

Feel free to "follow" us on the codeplex project site and start any discussions there if needed.

Cheers!
-Matt
12 anos atrás
Thanks for this Matt,

One more quick question if you don't mind:

I am stil brand new to nop plugins, what files from the zip do I need to put in my plugins folder, is it all of them?

packages.config
PreciousMetalsPricingProvider.cs
RouteProvider.cs
web.config
Controllers
Data
Domain
Models
Properties
Services
Views
DependencyRegistrar.cs
Description.txt
Enums.cs
Nop.Plugin.Pricing.PreciousMetals.csproj
Notes.txt

And do I need to upload my complete solution to my web server again after re-compiling, or just specific files?

Many thanks, and I will be sure to follow you on the codeplex project site, this is something I will really want to keep an eye on...!

Cheers
12 anos atrás
glennlawr wrote:
what files from the zip do I need to put in my plugins folder, is it all of them?


No, the list you gave is the entire source code.  Your Plugins/Pricing.PreciousMetals folder should only contain Nop.Plugin.Pricing.PreciousMetals.dll, Nop.Pricing.PreciousMetals.pdb and Description.txt.  This is nop's standard way of deploying plugins.  Check out some of the other plugins and you will understand.

glennlawr wrote:
And do I need to upload my complete solution to my web server again after re-compiling, or just specific files?


You should just be able to deploy to the plugins folder and then modify the one view to add the tab.  You don't need to recompile the entire solution, unless you are doing other custom stuff of course.

-Matt
12 anos atrás
Great,

I'll give it a try and see how I get on.

I may be back to you though :)

Many thanks...
12 anos atrás
Matt,

Sorry to bother you with this again but I am having trouble with my VWD when I am trying to load up my project, I get a message "Some of the properties associated with the solution could not be read." And when I compile I do not see the files you advised to put in my plugins folder.

I have tried loading up a fresh copy of my code and I still get this error. I always have some issue when I try to use VWD, probably doesn't help that I don't know much about it :(

Now to get to the point:

Is there any chance you could supply your built/compiled plugin files? I am just running a default installation of nopCom, no changes to code so I would imagine your files would work for me if I just replace my own with them.

Can you help please?
12 anos atrás
Sorry to hear you are having difficulties.  I'm not really in a position to support you on this, but perhaps others on the nop team can help.

I will repost the plugin with compiled binaries for the next version, which hopefully I can get tied up later this weekend.

I will update this thread when complete.
12 anos atrás
Cheers Matt, that sounds good.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.