bleroy / Nwazet.Commerce

Idiomatic commerce module for Orchard CMS.
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Enhancement/bundles localization pr #118

Closed MatteoPiovanelli-Laser closed 7 years ago

MatteoPiovanelli-Laser commented 7 years ago

Taking care of #114

The PR as is now does not have the complete feature, but what's there works and can be reviewed.

I refactored the BundleService, Moving the interface declaration to its own file, and creating an abstract class with the default implementations, so there si no need to reimplement everything in other IBundleService implementations.

I changed a thing in the abstract implementation of BuildEditorViewModel, adding the Where clause. In the default BundleService that is always true, but I override it in the IBundleService from the feature to conditionally filter out some products from being shown in the UI.

I also added the culture notation "(culture)" to the display text of the ProductEntry objects, because it's there already, instead of through an alternate.

There is an additional BundlePart driver, that currently does nothing, but that I created there for later use (I was planning to use it already, and I still might as I finish implementing the whole feature.)

MatteoPiovanelli-Laser commented 7 years ago

In a moment I'll push an update to the PR with the complete feature. The following settings control the behaviour of the localization:

bleroy commented 7 years ago

This looks fine, thanks.