Giter Club home page Giter Club logo

vc-module-core's Introduction

VirtoCommerce Core Module

Latest release Total downloads License

CI status Quality gate Reliability rating Security rating Sqale rating

Overview

Represents common eCommerce domain model and base abstractions, which can be used and implemented in derived modules. It also exposes some common eCommerce APIs for frontend security, SEO, fulfilment, payments and tax evaluation.

Installation

Installing the module:

  • Automatically: in VC Manager go to Configuration -> Modules -> Commerce core module -> Install
  • Manually: download module zip package from vc-module-core/releases. In VC Manager go to Configuration -> Modules -> Advanced -> upload module package -> Install.

Settings

  • VirtoCommerce.Core.General.TaxTypes - manually defined tax categories which can be assigned to eligible objects (category, product, etc.)
  • VirtoCommerce.Core.General.WeightUnits - mass units available for physical goods weighting
  • VirtoCommerce.Core.General.Languages - supported languages (culture names) (en-US, ru-RU, etc.)
  • VirtoCommerce.Core.FixedRateShippingMethod.Rate - amount (rate) for “Fixed rate” shipping method
  • VirtoCommerce.Core.FixedTaxRateProvider.Rate - percentage (rate) for “Fixed rate” tax provider

References

License

Copyright (c) Virto Solutions LTD. All rights reserved.

This software is licensed under the Virto Commerce Open Software License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://virtocommerce.com/opensourcelicense.

Unless required by the applicable law or agreed to in written form, the software distributed under the License is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

vc-module-core's People

Contributors

aartiomov avatar akak1977 avatar alivemen avatar andalexshap avatar andrew-orlov avatar artem-dudarev avatar asvishnyakov avatar basilkot avatar belyakovsergey avatar blazemachine avatar dmitry-virtoway avatar einlied753 avatar eugeneokhriemnko avatar kostyrin avatar krankenbro avatar ksavosteev avatar lnetrebskii avatar megafreeman avatar mvktsk avatar n2pro avatar olegoo avatar pav-el avatar t13ka avatar tatarincev avatar vanzegbroecke avatar vc-ci avatar vectorfield4 avatar wimvergouwe avatar woland2k avatar yecli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vc-module-core's Issues

Mark required properties as required in domain models

Problem:
Currently there is no way to determine which properties is required for object and which is not. It's very unuseful especially when you work with code generated by AutoRest or want to use power of code analysis tools like ReSharper.

Solution:
Need to find the way to mark required properties as required in domain models and generated AutoRest clients.

Add TaxDetails to TaxRate class

Cart and Order can store tax details, but TaxRate class which is used as a result of a tax calculation process doesn't have a field for tax details.

Add bulk operations for indexation

Sometime we need to reindex few products. We already have an ability to reindex single product and ability to reindex all products, but we need also ability to reindex few products only, for example a result of search.

Add Dynamic properties support for Shipment and Payment in Cart

Order's Shipment and Payment already has support dynamic properties. If we want to use them to allow users specific additional data for managers on platform, for example, and display in theme UI, then we should first pass this values to dynamic properties of Shipment or Payment of Cart. But they doesn't exist.

Change markdown dialog to split mode when maximized

@Woland2k commented on Wed Sep 20 2017

Currently when maximized, markdown view is displayed with tabs (markdown and preview) which need to be switched manually to see how content looks like:
image

Change this to split view instead when certain width is reached so there is no need to manually switched to preview mode when editing content (it is a setting of the control).

image

SEO info still used for routing even if disabled

Version info:

  • Browser version: Chrome 70
  • Platform version: 2.13.37
  • Module version: 2.25.17

Expected behavior

If seo disabled, it shouldn't be used for routing

Actual behavior

Seo used for routing even if disabled

Steps to reproduce

  1. Go to demo site
  2. Open any product
  3. Copy seo path
  4. Open demo.virtocommerce.com/product_seo_path
  5. Product page opens
  6. Remove seo for product
  7. Open demo.virtocommerce.com/product_seo_path
  8. 404 error page appear
  9. Open previously used product
  10. Add copied seo path
  11. Disable this SEO
  12. Open demo.virtocommerce.com/product_seo_path

Expected: 404 error should be returned
Actual: product page opens

Search indexation: Add the possibility of re-indexing without stopping the work of the old index

Client requirement:

We want to move our product/member index from azure elasticsearch to cloud elasticsearch.
But we have some limitations:

we can't change connection string and start REBUILD because at that time catalog on storefront will unavailable
we can't create new web app with another instance of VC admin with cloud elasticsearch connectionstring
What you can advice to us? Is it any plans for handle that kind of situation?

Currently, when the user selects "Rebuild with deletion," the old index deletes upon start of this operation, and the index becomes unavailable
Need will keep old search index intact during the rebuilding process and such as building out a new separate index and then transitioning to the new index.

Search should correctly handle "no search provider" situation

Version info:

  • Browser version: Chrome 66
  • Platform version: 2.13.26
  • Module version: 2.24.32

Expected behavior

If no search provider registered, or search provider from connection string not found, the appropriate exception should be thrown.

Actual behavior

img_18052018_141808_0

Steps to reproduce

Uninstall all search providers from fresh installation or set provider in connection string to different than module installed (i.e. provider=Elasticsearch while Lucene search installed).

Change icon for Indexation push notification

Client question:
In the notification panel when the system has a new "indexation process" the icon of it is a warning sign instead of a success sign. This is for me a bit strange. Can you explain to me why this is a warning sign?

image
Need to change notification icon for this type of push notification to something different.

Dummy search provider is not overridden by ElasticSearch provider

After the registration of DummySearchProvider in the commit 6690ea5#diff-a78924c769c19f425227f58548137828R127 , any other registrations of ISearchProvider are not respected. ElasticSearchProvider registration is ignored.

Version info:

  • Browser version: any
  • Platform version: 2.13.50
  • Module version: 2.25.29

Expected behavior

Specific search provider registration is respected by Unity.

Actual behavior

DummySearchProvider is resolved as the registered implementation of ISearchProvider.

Steps to reproduce

  1. Install ElasticSearch module
  2. Run application
  3. Try to resolve ISearchProvider in a service, e.g. ProductSearchService

Extend search syntax with boolean operators

Currently we support a limited number of operations on search field values, like AND (color:Black color:White) or OR (color:Black,White). Please, replace it with more formal syntax (and, or, not, xor keywords) and allow to do all of these operations on properties (currently I can't write query for color:Black OR brand:Microsoft). Also, allow to use parentheses.

Alternative is to allow write queries on search engine language, but I will prefer avoid it because it will complicate moving from one search engine to another: for example, in our current project we use Elastic Search but may move to Azure Search in near future.

Proposal: Refactor indexed *SearchService abstractions

Customer module and Catalog module has indexed *SearchService abstractions, which have similar structure:

  • SearchAsync
  • GetRequestBuilder
  • ConvertDocuments

Find Store module will has them too. Shouldn't we create special interface(s) (per module or in search domain model in Core module) and register this classes in Unity as implementations of this interface to allow override them?

Fulfillment centers list does not page or show correct total count

Version info:

  • Browser version: Chrome 66.0.3359.181
  • Platform version: 2.13.27
  • Module version: 2.25.2

Expected behavior

  • Fulfillment centers list pages after more than x items
  • Total count of fulfillment centers show in upper left

Actual behavior

  • Fulfillment centers list does not page (see screenshot below)
  • Total count is always 0 (see screenshot below)

Steps to reproduce

  1. Create more than 20 fulfillment centers.

Screenshot
image

@IgorisB

Violation of the order number generation sequence

Client question:
I've observed a strange behavior in the Order Numbers for our Customer, the sequence part of the Order number jumps sometimes, I know this happens if the application is restarted. But what we see is mixed sequences, see the attached image. The orders are ordered by creation:
image

Technical details:
This code responds for number generation
https://github.com/VirtoCommerce/vc-module-core/blob/master/VirtoCommerce.CoreModule.Data/Services/SequenceUniqueNumberGeneratorServiceImpl.cs

Allow to request specific fields from the search engine

Currently, when you send a request to the search engine, you get the whole indexed documents in the response, so the response is huge.

We need to extend the VirtoCommerce.Domain.Search.SearchRequest with a list of fields to be returned from the search engine. This will allow to significantly reduce the size of the response if you only need a few short text fields.

Indexation still continues in background when canceled

Expected behavior

Indexation should stop completely when canceled through the UI or when the job is deleted.

Actual behavior

Indexation process still continues, searchprovider still gets documents to index.

Steps to reproduce

  1. Start indexation in UI
  2. Cancel the indexation
  3. Look at logging

PS: tested with scaled-out indexation

Order Number is not sequence

Our server host on Azure with 2 instances, and our order-number field hasn't been sequence.

  • Order number template: CO{0:yyMMdd}-{1:D5}

Version info:

  • Browser version:
  • Platform version: 2.13.44
  • Module version: 2.25.18

Expected behavior

OrderNumber must be sequence.

Actual behavior

Order number wasn't

Steps to reproduce

  1. Commerce Manager: fixed 2 instances
  2. Login to Storefront and create orders with multiple users, browsers as the same time.

Reason:

  1. using InMemorySequenceList won't share memory between commerce instances.
  2. When we turn Off Cookies on Storefront, this issue will happen.

Make Member addresses extendable.

I am working with a system that needs custom address types attached to Members, the 3 provided in the AddressType enum are not enough, and do not represent the data we are storing. Also a dynamic properties field would be helpful as well.

SequenceUniqueNumberGeneratorServiceImpl should start at 1 not 0

Currently, Order reference number starts with 0 for a day (ex: HA171213-00000). Instead of starting the reference sequence number from 0, please change the settings to start with 1.

1 as is typical in everyday non-mathematical/non-programming circumstances.

Version info:

  • Module version:
    v2.24.20

Expected behavior

initial element of a sequence is assigned the 1

Actual behavior

initial element of a sequence is assigned the 0

Add missed polymorphic converter for Address model

Version info:

  • Module version: 2.24.23

Expected behavior

Web API should use overridden Address model instead of standard domain model

Actual behavior

It creates an instance of standard domain model

Add polymorphic converter to allow Web API use overridden Address model.

Search throw an exception when you open Fill properties blade in product clone process

Exception:

{  
   "message":"An error has occurred.",
   "exceptionMessage":"One or more errors occurred.",
   "exceptionType":"System.AggregateException",
   "stackTrace":"   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at VirtoCommerce.CatalogModule.Data.Services.CatalogSearchServiceImpl.Search(SearchCriteria criteria)\r\n   at VirtoCommerce.CatalogModule.Data.Services.CatalogSearchServiceDecorator.Search(SearchCriteria criteria)\r\n   at VirtoCommerce.Platform.Data.Common.CacheManagerExtension.Get[T](ICacheManager`1 cacheManager, String cacheKey, String region, TimeSpan expiration, ExpirationMode expirationMode, Func`1 getValueFunction, Boolean cacheNullValue)\r\n   at VirtoCommerce.Platform.Data.Common.CacheManagerExtension.Get[T](ICacheManager`1 cacheManager, String cacheKey, String region, TimeSpan expiration, Func`1 getValueFunction, Boolean cacheNullValue)\r\n   at VirtoCommerce.Platform.Data.Common.CacheManagerExtension.Get[T](ICacheManager`1 cacheManager, String cacheKey, String region, TimeSpan expiration, Func`1 getValueFunction)\r\n   at VirtoCommerce.CacheModule.Data.Decorators.CacheManagerAdaptor.Get[T](String cacheKey, String region, Func`1 getValueFunction)\r\n   at VirtoCommerce.CacheModule.Data.Decorators.CatalogServicesDecorator.Search(SearchCriteria criteria)\r\n   at VirtoCommerce.CatalogModule.Web.Controllers.Api.CatalogModuleListEntryController.ListItemsSearch(SearchCriteria criteria)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Cors.CorsMessageHandler.<HandleCorsRequestAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Cors.CorsMessageHandler.<SendAsync>d__0.MoveNext()",
   "innerException":{  
      "message":"An error has occurred.",
      "exceptionMessage":"Value cannot be null.\r\nParameter name: key",
      "exceptionType":"System.ArgumentNullException",
      "stackTrace":"   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)\r\n   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r\n   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)\r\n   at VirtoCommerce.CatalogModule.Data.Services.ItemServiceImpl.LoadDependencies(CatalogProduct[] products, Boolean processVariations)\r\n   at VirtoCommerce.CatalogModule.Data.Services.ItemServiceImpl.GetByIds(String[] itemIds, ItemResponseGroup respGroup, String catalogId)\r\n   at VirtoCommerce.CatalogModule.Data.Services.CatalogSearchServiceImpl.SearchItems(SearchCriteria criteria, SearchResult result)\r\n   at System.Threading.Tasks.Task.Execute()"
   }
}

How to reproduce:

  1. Open any product
  2. Click Clone
  3. Try to open Fill properties blade

500 error occurs

To fix problem, disable indexed search in catalog, restart platform and rebuild index with deletion.

Need to support sequential unique number generation

For example
RWS800000

I believe they just want them to be sequential starting from

RWS800001
RWS800002
RWS800003 etc…

It seems the current implementation for this template RWS8{1:D5} will produce not unique numbers.

Add "forgot username" option

Currently, user may reset password, but is not able to know username, even if he/she know email of account and have access to it.

Why RunIndexJobAsync is not async?

https://github.com/VirtoCommerce/vc-module-core/blob/master/VirtoCommerce.CoreModule.Web/BackgroundJobs/IndexingJobs.cs#L240-L283

I've refactored this method to be more readable and to have a single return, but it still has one issue.
There is a loop with a Wait() call which blocks current thread until the task has completed, making the entire indexing process synchronous.

foreach (var options in allOptions)
{
    indexationFunc(options, new JobCancellationTokenWrapper(cancellationToken)).Wait();
}

Can we change it to await indexationFunc(...);?
I didn't do this myself because of this comment:

// CAUTION: locking mechanism assumes single threaded execution.

Since async can continue on a different thread I decided to not touch this loop.

And one more confusing comment:

catch
{
    // TODO: Check wait in calling method
    _progressHandler.AlreadyInProgress();
}

What does it mean?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.