orchardcms / orchardcore.commerce Goto Github PK
View Code? Open in Web Editor NEWThe commerce module for Orchard Core.
License: MIT License
The commerce module for Orchard Core.
License: MIT License
Cloned the latest dev branch as of 5 hrs old. Latest commit d51903a.
I have VS for Mac version 8.0.9. See below for details.
Wait for all the packages to restore.
Make sure OrchardCore.Cms.Web is set as solution startup project.
Try and Run.
Get build failure with following output.
/Users/kevin/Projects/OrchardCMS/OrchardCore/src/OrchardCore.Cms.Web/CSC: Error CS0006: Metadata file '/Users/kevin/Projects/OrchardCMS/OrchardCore/src/OrchardCore.Modules/OrchardCore.OpenId/bin/Debug/netcoreapp2.2/OrchardCore.OpenId.dll' could not be found (CS0006) (OrchardCore.Cms.Web)
It seems to be using the wrong directory. I can build the OrchardCore.OpenId project separately and it produces bin\Debug\netstandard2.0\OrchardCore.OpenId.dll.
I've checked some other modules but OpenId doesn't seem any different, and there are no problems with them in the build, the output shows them building successfully.
I've kicked off a Build of Release config to see if there is a difference. Same error!
Might be an issue with the new version of Visual Studio!
Thoughts, anyone.
Regards,
Kevin
=== Visual Studio Community 2019 for Mac ===
Version 8.0.9 (build 5)
Installation UUID: d2bae2bd-b8e8-4cdf-955f-266907885e25
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.2 (d16-0 / 040682909)
Package version: 518010003
=== Mono Framework MDK ===
Runtime:
Mono 5.18.1.3 (2018-08/fdb26b0a445) (64-bit)
Package version: 518010003
=== NuGet ===
Version: 4.8.2.5835
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.2.4
2.2.3
2.1.9
2.1.8
2.1.7
2.1.2
2.1.1
2.0.5
2.0.0
1.1.1
1.0.4
1.0.0
1.0.0-rc2-3002702
SDK: /usr/local/share/dotnet/sdk/2.2.106/Sdks
SDK Versions:
2.2.106
2.2.105
2.1.505
2.1.504
2.1.503
2.1.302
2.1.301
2.1.4
2.0.0
1.0.3
1.0.0-preview2-003121
1.0.0-preview1-002702
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.9
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.2.1 (14490.122)
Build 10E1001
=== Xamarin.Mac ===
Version: 5.8.0.0 (Visual Studio Community)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400
=== Xamarin.iOS ===
Version: 12.8.0.2 (Visual Studio Community)
Hash: f2248ae6
Branch: d16-0
Build date: 2019-04-23 11:59:04-0400
=== Xamarin Designer ===
Version: 4.17.4.420
Hash: 0a2420845
Branch: remotes/origin/d16-0
Build date: 2019-05-23 23:40:02 UTC
=== Xamarin.Android ===
Version: 9.2.3.0 (Visual Studio Community)
Android SDK: /Users/kevin/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
4.4 (API level 19)
6.0 (API level 23)
SDK Tools Version:
SDK Platform Tools Version: 25.0.6
SDK Build Tools Version: 23.0.1
Build Information:
Mono: mono/mono@5ac37ccd385
Java.Interop: xamarin/java.interop@c987483
LibZipSharp: grendello/LibZipSharp/d16-1@44de300
LibZip: nih-at/libzip@b95cf3f
MXE: xamarin/mxe@b9cbb535
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@325e91a
Xamarin.Android Tools: xamarin/xamarin-android-tools@0a7edd6
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/kevin/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 1.2.0.14
Hash: 86df26f
Branch: remotes/origin/d16-0
Build date: 2019-05-28 18:18:20 UTC
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 800090005
Git revision: 72a44477dd706608c2300a568f71e5769f89f7ef
Build date: 2019-05-29 15:19:54+00
Build branch: release-8.0
Xamarin extensions: 3e94aa3836143b8f5a5b9151b61a80e2fd278d62
=== Operating System ===
Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
Thu Apr 25 23:16:27 PDT 2019
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
I have tried to isolate this down so here goes. If you add an Image Field (could be any field but I used an Image Field with a name of "Image" then go to add a new product (which has the PricePart and ImageField associated with the content type) it will crash as "LegacyAmountConverter" in "MoneyDataType" project is being called before the post back to the database has a chance to store the "Currency":
if (!Currency.IsKnownCurrency(currency.CurrencyIsoCode))
{
currency = new Currency(nativename, englishname, symbol, iso, dec.GetValueOrDefault(2));
}
"currency" is null so it will crash. I can't figure out why having a Field on it is causing this to fire off BEFORE the driver is updating the data... If I can figure out more, will let you know.
Payment services provide a method to charge the customer, and a flag to switch to simulation mode.
Getting a Value cannot be null. (Parameter 'key')
exception when adding a product item to shopping cart. This exception also occurs (silently if not debugging) when creating or viewing a product item.
Steps to reproduce:
System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null. (Parameter 'key')
Source=System.Private.CoreLib
StackTrace:
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Money.CurrencyProvider.GetCurrency(String isoSymbol) in C:\repos\OrchardCore.Commerce\MoneyDataType\CurrencyProvider.cs:line 20
at Money.Currency.FromISOCode(String code, IEnumerable`1 providers) in C:\repos\OrchardCore.Commerce\MoneyDataType\Currency.extra.cs:line 137
at OrchardCore.Commerce.Settings.CommerceSettingsCurrencySelector.get_CurrentDisplayCurrency() in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Settings\CommerceSettingsCurrencySelector.cs:line 16
at OrchardCore.Commerce.Services.MoneyService.get_CurrentDisplayCurrency() in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\MoneyService.cs:line 52
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.BuildViewModel(PricePartViewModel model, PricePart part) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 64
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.<>c__DisplayClass3_0.<Edit>b__0(PricePartViewModel m) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 38
at OrchardCore.DisplayManagement.Handlers.DisplayDriverBase.<>c__DisplayClass8_0`1.<Initialize>b__0(TModel shape) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Handlers\DisplayDriverBase.cs:line 62
at OrchardCore.DisplayManagement.ShapeFactoryExtensions.<CreateAsync>g__ShapeFactory|6_1[TModel](Func`2 init) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\IShapeFactory.cs:line 87
at OrchardCore.DisplayManagement.ShapeFactoryExtensions.<>c__DisplayClass6_0`1.<CreateAsync>b__2() in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\IShapeFactory.cs:line 95
at OrchardCore.DisplayManagement.Implementation.DefaultShapeFactory.<CreateAsync>d__10.MoveNext() in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultShapeFactory.cs:line 92
System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null. (Parameter 'key')
Source=System.Private.CoreLib
StackTrace:
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Money.CurrencyProvider.GetCurrency(String isoSymbol) in C:\repos\OrchardCore.Commerce\MoneyDataType\CurrencyProvider.cs:line 20
at Money.Currency.FromISOCode(String code, IEnumerable`1 providers) in C:\repos\OrchardCore.Commerce\MoneyDataType\Currency.extra.cs:line 137
at OrchardCore.Commerce.Settings.CommerceSettingsCurrencySelector.get_CurrentDisplayCurrency() in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Settings\CommerceSettingsCurrencySelector.cs:line 16
at OrchardCore.Commerce.Services.MoneyService.get_CurrentDisplayCurrency() in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\MoneyService.cs:line 52
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.BuildViewModel(PricePartViewModel model, PricePart part) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 64
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.<>c__DisplayClass2_0.<Display>b__0(PricePartViewModel m) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 27
at OrchardCore.DisplayManagement.Handlers.DisplayDriverBase.<>c__DisplayClass8_0`1.<Initialize>b__0(TModel shape) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Handlers\DisplayDriverBase.cs:line 62
at OrchardCore.DisplayManagement.ShapeFactoryExtensions.<CreateAsync>g__ShapeFactory|6_1[TModel](Func`2 init) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\IShapeFactory.cs:line 87
at OrchardCore.DisplayManagement.ShapeFactoryExtensions.<>c__DisplayClass6_0`1.<CreateAsync>b__2() in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\IShapeFactory.cs:line 95
at OrchardCore.DisplayManagement.Implementation.DefaultShapeFactory.<CreateAsync>d__10.MoveNext() in C:\projects\orchardcore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultShapeFactory.cs:line 92
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Money.CurrencyProvider.GetCurrency(String isoSymbol) in C:\repos\OrchardCore.Commerce\MoneyDataType\CurrencyProvider.cs:line 20
at Money.Currency.FromISOCode(String code, IEnumerable`1 providers) in C:\repos\OrchardCore.Commerce\MoneyDataType\Currency.extra.cs:line 137
at OrchardCore.Commerce.Settings.CommerceSettingsCurrencySelector.get_CurrentDisplayCurrency() in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Settings\CommerceSettingsCurrencySelector.cs:line 16
at OrchardCore.Commerce.Services.MoneyService.get_CurrentDisplayCurrency() in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\MoneyService.cs:line 52
at OrchardCore.Commerce.Services.PriceProvider.<>c__DisplayClass5_0.<AddPrices>b__3(PricePart pricePart) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\PriceProvider.cs:line 41
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at OrchardCore.Commerce.Models.ShoppingCartItem..ctor(Int32 quantity, String productSku, IEnumerable`1 attributes, IEnumerable`1 prices) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Models\ShoppingCartItem.cs:line 33
at OrchardCore.Commerce.Models.ShoppingCartItem.WithPrices(IEnumerable`1 prices) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Models\ShoppingCartItem.cs:line 64
at OrchardCore.Commerce.Services.PriceProvider.<>c__DisplayClass5_0.<AddPrices>b__1(ShoppingCartItem item) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\PriceProvider.cs:line 43
at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
at System.Linq.Set`1.UnionWith(IEnumerable`1 other)
at System.Linq.Enumerable.DistinctIterator`1.FillSet()
at System.Linq.Enumerable.DistinctIterator`1.ToArray()
at OrchardCore.Commerce.Services.PriceVariantProvider.AddPrices(IEnumerable`1 items) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\PriceVariantProvider.cs:line 29
at OrchardCore.Commerce.Services.PriceService.AddPrices(IEnumerable`1 items) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Services\PriceService.cs:line 25
at OrchardCore.Commerce.Controllers.ShoppingCartController.AddItem(ShoppingCartLineUpdateModel line, String shoppingCartId) in C:\repos\OrchardCore.Commerce\OrchardCore.Commerce\Controllers\ShoppingCartController.cs:line 105
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext() in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 36
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__1_1>d.MoveNext() in C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.ContentPreview\PreviewStartupFilter.cs:line 23
--- End of stack trace from previous location where exception was thrown ---
at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 63
at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute) in C:\projects\orchardcore\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 236
at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in C:\projects\orchardcore\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 59
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
We'll need to design product localization. The easy part is products themselves, as products are content items, and content items are localizable by Orchard. There are harder things such as product attribute settings localization, as some of those settings will make their way to the front-end.
I'm wondering if you can put together a roadmap with a list of issues for this project, so anyone interested can take part in the project. It is now seems to be moving too slow.
Product attributes (such as sizes, colors, dimensions, and other options) need to be baked early into the system, as their presence affects the signature of important APIs, not least among them shopping cart APIs.
Product attributes are variants of a product that the customer can choose when adding a product to the cart. They are of arbitrary types (one can imagine enums, measurements, or even text), and can affect pricing.
They share a lot of characteristics with Orchard fields, in that they are named, can be added an arbitrary number of times to a specific product type, and can be configured. The main difference is that the actual value is not attached to the product but to the shopping cart item. There is enough in common that attributes in Core Commerce will be built as new Orchard fields. The actual attribute values will be separate objects that travel alongside the product reference in the shopping cart. The field is what is used to configure the attribute.
Of course, this is extensible, and anybody can implement their own attribute field. One could imagine building whole configurators for example.
I don't see how Price Variants can work currently. In the PriceVariantService "GetPriceVariants" method, you have this:
return keys
.Where(key => part?.Variants?.ContainsKey(key) == true)
.ToDictionary(key => key, key => part.Variants[key]);
Since I can never get anything stored in part.Variants (because the editor will never load any variants due to this line) it seems like variants are unusable. Am I missing something?
Also, does PriceVariant require the use of PricePart? My module I am building for Price Books replaces PricePart with multiple pricing options via a Price Book approach. I just want to know if the expectation is that a "PricePart" is always present on a product. Thanks for feedback (will save me time requesting to merge later).
i have added this module to my project (not in OC source prj). but it doesn't appear in features to enable it.
these is my project config:
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OrchardCore.Application.Cms.Targets" Version="1.0.0-rc1-12962" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\module\OrchardCore.Commerce\OrchardCore.Commerce.csproj" />
<ProjectReference Include="..\Theme\ProfileTheme\ProfileTheme.csproj" />
</ItemGroup>
I try install Commerce module onto the current OrchardCore dev branch (later than stable master version) but cannot see its features.
Where should I look into to get it work?
Thanks All!
The goal would be to have a "Part" (i.e. RoleAssignmentPart) that you would add to a Product where the user would toggle which Role to assign to the purchaser at time of successful purchase.
At the time of successful purchase, this role would automatically be added to the user. As an alternative, it could be handled by a workflow but that would require the user to manually handle this themselves (or use a recipe go generate when feature is enabled).
As a related example of usage, I have used a similar concept to put the user into a role which gives them access to a page / download for 30 days. I have a secondary workflow (not related to this module) which removes the role automatically.
I really like the Amount class, however you will soon find you get rounding issues if you use float and double casting in the amount constructor. I would suggest you always only accept decimal types.
I created a money datatype a while back I thought I'd share as I did the currency slightly differently which you might want to have a look at. This technique doesn't require specific currency types but instead leverages culture/region info built into .Net standard.
I'd be interested in helping out if you'd like my help.
Here are the tests for the above project if needed.
Hi there
I'm just getting up to speed on this project and doing some testing.
I seem to have come across an issue where the cart isn't deserializing from the JSON stored in session, the json string is passed in however results in an empty ShoppingCart object. I've been through everything exhaustively and can't seem to get to the root of the problem.
Can anyone shed some light on this for me please?
Thanks!
inside class PriceProvider : IPriceProvider
how can I change
var pricePart = item.Product.As<PricePart>();
to
var pricePart = item.Product.As<IPrice>();
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Microsoft.AspNetCore.Antiforgery. Reference the package directly from the project to resolve this issue.
irandoctor24CMS -> OrchardCore.Application.Cms.Targets 1.0.0-beta3-70302 -> OrchardCore.Users 1.0.0-beta3-70302 -> OrchardCore.ContentManagement.Display 1.0.0-beta3-70302 -> OrchardCore.ContentManagement.Abstractions 1.0.0-beta3-70302 -> OrchardCore.Mvc.Core 1.0.0-beta3-70302 -> OrchardCore.DisplayManagement.Abstractions 1.0.0-beta3-70302 -> Microsoft.AspNetCore.Mvc.Razor 2.2.0 -> Microsoft.AspNetCore.Mvc.ViewFeatures 2.2.0 -> Microsoft.AspNetCore.Antiforgery (>= 2.2.0)
irandoctor24CMS -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.AspNetCore.Antiforgery (>= 2.1.1 && < 2.2.0).
i set:
< PropertyGroup>
< TargetFramework>netcoreapp2.1
</ PropertyGroup>
< ItemGroup>
< PackageReference Include="Microsoft.AspNetCore.App" />
< PackageReference Include="OrchardCore.Application.Cms.Targets" Version="1.0.0-beta3-" />
< PackageReference Include="OrchardCore.Application.Targets" Version="1.0.0-beta3-" />
< PackageReference Include="OrchardCore.Logging.NLog" Version="1.0.0-beta3-*" />
</ ItemGroup>
Those parts and fields implement the basic building blocks for products that can't be found in the core parts provided by Orchard Core itself. The parts should apply the single responsibility principle, for easier composition.
This is largely a marker part, used primarily to identify a content type as a product. Its only property is:
Represents a price, using the following properties:
Tracks the number of available items.
The work will focus at first on porting a minimum viable feature set:
Globalization should be taken into account at every step.
This issue exists so we can discuss what features should go into the minimum feature set that we build first. Discussion of the design of each of the features should happen in their respective issues (links above).
Allows for recommendation of products based on what a user currently has in their cart.
The recommendations can be administrator picked (i.e. recommend Product A if Product B is in the cart) or they can be semi-automated and driven by "others who bought this also bought". This would likely be most efficient using a search engine (e.g. Lucene Search) as opposed to a SQL query.
Le résultat de l'expression est toujours 'true', car une valeur de type 'Currency' n'est jamais égale à 'null' du type 'Currency?' [F:\Repositories\OrchardCore.Commerce\MoneyDataType\MoneyDataType.csproj]
Example of template that could be used to make an OC theme:
https://startbootstrap.com/previews/shop-homepage
This is on Windows. Maybe OS or culture specific.
[xUnit.net 00:00:01.42] OrchardCore.Commerce.Tests.MoneyServiceTests.EnsureCurrenciesAcrossAllProviders [FAIL]
Failed OrchardCore.Commerce.Tests.MoneyServiceTests.EnsureCurrenciesAcrossAllProviders [6 ms]
Error Message:
Assert.Equal() Failure
Expected: 115
Actual: 112
Stack Trace:
at OrchardCore.Commerce.Tests.MoneyServiceTests.EnsureCurrenciesAcrossAllProviders() in C:\Users\jeroe\source\repos\jhgbrt\OrchardCore.Commerce\OrchardCore.Commerce.Tests\MoneyServiceTests.cs:line 55
[xUnit.net 00:00:01.42] OrchardCore.Commerce.Tests.CurrencyTests.CurrenciesProperlyFormatAmounts(currency: ?, amount: 1234,56, expectedFormat: "¥1,235") [FAIL]
[xUnit.net 00:00:01.42] OrchardCore.Commerce.Tests.CurrencyTests.CurrenciesProperlyFormatAmounts(currency: ¥, amount: 1234,56, expectedFormat: "¥1,234.56") [FAIL]
I followed the instructions for setting up the dev environment but at step 5 I get this error:
Unable to find project information for 'C:\Working\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\MoneyDataType\MoneyDataType.csproj'. If you are using Visual Studio, this may be because the project is unloaded or not part of the current solution so run a restore from the command-line. Otherwise, the project file may be invalid or missing targets required for restore.
I would like to help work on this module in any way I can. I'm new to Orchard but have been doing .net development for 6 years and have been using .net core since it was first released.
How can you compare you OrchardCore.Commerce readiness to nopCommerce?
What advantages are of using OrchardCore.Commerce over nopCommerce + Orchard with a SSO (single sign on) module like LDAP, OpenAuth, FIDO2, etc. ?
We have built a presentational website for our client.
And now he wants a shopping cart with Visa/Mastercard payment.
User calculates a concrete blocks count https://betonera.ua/ua/calculator, adds the result to a shopping cart and does a check-out with ability to pay via card.
1 currency.
Is any one of contributors can complete required functionality of this module enough on commercial basis to implement our scenario?
We do not have developers qualified enough to do that. But they can be engaged and perform clearly defined tasks if you need.
Order management should rely on workflows, in order to allow rich configurability.
Orders are content items. The order part has the following properties:
Nwazet had a tracking URL on the order part, but that should be handled somewhere else, likely shipping: some orders may be split into several packages, each with its tracking URL.
Nwazet had an activity text field. This doesn't need to be built into the part, and can instead be a standard text field.
Currently, it seems like the module can't properly deal with this situation. It's unclear what the behavior should be.
Implementation should allow a user to checkout without a payment if their shopping cart totals no cost.
The shopping cart is an implementation of an IShoppingCart
abstraction.
Properties:
Methods:
TBD: how do we interface this with shipping? Nwazet stores country, zip code, and shipping option on the cart.
Note: some missing methods from Nwazet may be added back as needed. Some signatures simplified and some methods changed to properties. This is all subject to revision, of course.
Implementations of the shopping cart abstraction will have pluggable persistence (client storage, database, session, etc.). Details TBD.
The cart is rendered through a widget, which has a shopping cart part that is responsible for querying the shopping cart from the active implementation and generate a shape from it.
The checkout page will also interact with the shopping cart (in Nwazet, there's a checkout controller with its own views, we may or may not do things differently to allow for more flexibility; we may also introduce more workflow features).
Checkout is the process of transforming a shopping cart into an order.
The checkout experience should be based on workflows. The default checkout experience should be defined by a recipe that sets up a workflow, that can then be modified.
The following workflow activities will be necessary:
http://bootstrap-ecommerce.com/
I found this website where most of the different layout elements are already composed with Bootstrap 4.
First goal is to differentiate difference between a coupon and a discount - possible they can both just be called Discounts, though likely all could be handled through an IPromotion or IDiscount interface.
Coupons
That expression to me is a price adjustment provided to people who have a "code" to enter at time of checkout
Discounts
I see these as more of a price adjustment applied to target markets, no checkout "code" required
Coupons or Discounts
Both Coupons or Discounts should be able to be a percentage based price adjustment or a unit of currency based adjustment. They could be flagged as single use (globally or per user - per user would require an authenticated user for purchase though). They can be conditioned on products existing in the cart and can only apply to individual products as opposed to the full cart.
Do you have any ideas about how you will use the features provided by Orchard Core?
Some of them are new compared to Orchard 1.x.
Here is a list of some available features:
Recipes, Deployment steps, Import/Export
Global and custom Settings
Security:
Content parts and fields:
Media, Assets
GraphQL, JsonAPI
Navigation:
Theming:
Liquid:
Indexing, Search:
Layers, Widgets
Workflows
Historically, I have utilized a Free Shipping solution where a certain price point has been reached. If a logic flow could be passed off to a Workflow that would be a very interesting approach though too. Outside that, this feature taps into the shipping calculation and provides the user the option of free shipping based on a set of criteria (they may still elect to use a paid shipping if they want a faster delivery).
Even though I think Stripe should be the first payment gateway implemented, PayPal is still a popular solution. See if there is a PayPal gateway solution that would support payment tokenization (i.e. where a token can be stored by the website and used for future subscription payments).
Currently, the dev environment for the module is suboptimal, requiring a local clone of Orchard. Instead, we should reference Orchard Core NuGet packages, and make development as simple as cloning the repo and building.
I noticed this while stepping through the code in debug mode gathering details for issue #73. There are 2 places that use the ICurrency == and != operators and I think they should be using .Equals() instead because that method is overridden but the operators cannot be overridden in an interface.
Here are the 2 places the operators are used:
Here is a screenshot from debugging that shows the values:
and here is a screenshot after changing it to use the .Equals method:
The admin interface should allow for order creation, it doesn't need to take payments, but is nice to have available for posting orders which come in through offline sales.
Shipping is a very complex feature set, that may not be necessary in the minimum feature set, but is vital to many if not most businesses.
Dimensions
part that can be added to products and that is not implementation-specific.A generic implementation would likely be mostly manually operated, and would be a place to store external tracking links, shipping provider name, and simple pricing determination based on weight and volume intervals. It should not attempt to be too sophisticated, as that would likely imply specialization that should really live in provider-specialized extensions.
Note: there exist Stripe-like shipping broker services that could also be good first implementations or extensions to build.
Repro steps:
When you click on Add to Cart
, an exception occurs:
Unable to resolve service for type 'OrchardCore.Commerce.Abstractions.IShoppingCartPersistence' while attempting to activate 'OrchardCore.Commerce.Controllers.ShoppingCartController'
because the Session Cart storage module is not enabled.
Stack trace:
2019-05-25 23:32:25.7544|Default|80000024-0006-fe00-b63f-84710c7967bb||OrchardCore.ContentManagement.Display.ContentItemDisplayCoordinator|ERROR|IContentPartDisplayDriver thrown from OrchardCore.Commerce.Drivers.PricePartDisplayDriver by ArgumentOutOfRangeException System.ArgumentOutOfRangeException: Currency not found.
Parameter name: isoSymbol
at OrchardCore.Commerce.Services.MoneyService.GetCurrency(String isoSymbol) in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Services\MoneyService.cs:line 39
at OrchardCore.Commerce.Services.MoneyService.get_DefaultCurrency() in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Services\MoneyService.cs:line 29
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.BuildViewModel(PricePartViewModel model, PricePart part) in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 51
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.<>c__DisplayClass3_0.<Edit>b__0(PricePartViewModel m) in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 32
at OrchardCore.DisplayManagement.ShapeFactoryExtensions.<>c__DisplayClass6_0`1.<<CreateAsync>b__0>d.MoveNext() in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\IShapeFactory.cs:line 76
--- End of stack trace from previous location where exception was thrown ---
at OrchardCore.DisplayManagement.Implementation.DefaultShapeFactory.CreateAsync(String shapeType, Func`1 shapeFactory, Action`1 creating, Action`1 created) in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultShapeFactory.cs:line 91
at OrchardCore.DisplayManagement.Views.ShapeResult.ApplyImplementationAsync(BuildShapeContext context, String displayType) in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Views\ShapeResult.cs:line 106
at OrchardCore.ContentManagement.Display.ContentItemDisplayCoordinator.<>c__DisplayClass11_2.<<BuildEditorAsync>b__0>d.MoveNext() in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.ContentManagement.Display\ContentDisplay\ContentItemDisplayCoordinator.cs:line 203
--- End of stack trace from previous location where exception was thrown ---
at OrchardCore.Modules.InvokeExtensions.InvokeAsync[TEvents](IEnumerable`1 events, Func`2 dispatch, ILogger logger) in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.Abstractions\Modules\Extensions\InvokeExtensions.cs:line 78 at OrchardCore.Commerce.Services.MoneyService.GetCurrency(String isoSymbol) in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Services\MoneyService.cs:line 39
at OrchardCore.Commerce.Services.MoneyService.get_DefaultCurrency() in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Services\MoneyService.cs:line 29
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.BuildViewModel(PricePartViewModel model, PricePart part) in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 51
at OrchardCore.Commerce.Drivers.PricePartDisplayDriver.<>c__DisplayClass3_0.<Edit>b__0(PricePartViewModel m) in C:\Projects\OrchardCore\src\OrchardCore.Modules\OrchardCore.Commerce\Drivers\PricePartDisplayDriver.cs:line 32
at OrchardCore.DisplayManagement.ShapeFactoryExtensions.<>c__DisplayClass6_0`1.<<CreateAsync>b__0>d.MoveNext() in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\IShapeFactory.cs:line 76
--- End of stack trace from previous location where exception was thrown ---
at OrchardCore.DisplayManagement.Implementation.DefaultShapeFactory.CreateAsync(String shapeType, Func`1 shapeFactory, Action`1 creating, Action`1 created) in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Implementation\DefaultShapeFactory.cs:line 91
at OrchardCore.DisplayManagement.Views.ShapeResult.ApplyImplementationAsync(BuildShapeContext context, String displayType) in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.DisplayManagement\Views\ShapeResult.cs:line 106
at OrchardCore.ContentManagement.Display.ContentItemDisplayCoordinator.<>c__DisplayClass11_2.<<BuildEditorAsync>b__0>d.MoveNext() in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.ContentManagement.Display\ContentDisplay\ContentItemDisplayCoordinator.cs:line 203
--- End of stack trace from previous location where exception was thrown ---
at OrchardCore.Modules.InvokeExtensions.InvokeAsync[TEvents](IEnumerable`1 events, Func`2 dispatch, ILogger logger) in C:\Projects\OrchardCore\src\OrchardCore\OrchardCore.Abstractions\Modules\Extensions\InvokeExtensions.cs:line 78
Will you create a dev
branch at some point?
Then, is it possible to setup a CI (Travis, AppVeyor) in order to build the packages?
It would be great if dev
packages could be uploaded to a MyGet feed and master
to NuGet, as it is done in OC.
#4
In Nwazet I was working on a feature to match destinations for taxes and shipping. What we came up with was a tree of territories/regions. ContentItems could be created to represent some of those.
you can find a full discussion here: bleroy/Nwazet.Commerce#134
Provide themes supporting default Commerce types. Those themes can be an extension of default Orchard themes providing different alternatives for rendering UI related with e-commerce.
Subscription products / payments allow a product to be sold over time and should have ability to continue indefinitely, have a defined end date, or allow for canceling.
The subscription framework should be agnostic to the selected payment gateway while also recognizing only some payment gateways allow tokenization. There may be an interface that payment providers would implement to validate they support a tokenization payment model.
General architecture would be Subscription Plans and Subscription Products.
Subscription Plans
Subscription Product
By default, the Subscription simply continues on with the pricing as it was fixed in time at the Order, it does not recalculate pricing along the way.
it would be possible to sell digital file such book or files without sign up and required email address. and download after purchase from browser.
do you think it will ready as soon or just you want to start this shop?
Oh boy that's a tough one :D
Taxation is super-duper-complicated. It has lots of details, local subtleties, and unless you're selling very, very locally, you can't afford to ignore it.
In the MVP, we'll implement extensible infrastructure, enabling tax services to act on and modify an order. That's reasonably simple.
We'll also include a default implementation, that will also be fairly simple(istic), but will likely require more work for the shop administrator. It will likely involve a way to map customers to regions, and then regions to tax rates. Open questions include whether we should import data, under what format.
Two test failures formatting currencies. Maybe OS related (I'm on Windows):
JapaneseYen:
OrchardCore.Commerce.Tests.CurrencyTests.CurrenciesProperlyFormatAmounts(currency: ¥, amount: 1234,56, expectedFormat: "¥1,235")
Duration: 4 ms
Message:
Assert.Equal() Failure
↓ (pos 0)
Expected: ¥1,235
Actual: ¥1,235
↑ (pos 0)
Stack Trace:
CurrencyTests.CurrenciesProperlyFormatAmounts(ICurrency currency, Decimal amount, String expectedFormat) line 29
ChineseYuan:
OrchardCore.Commerce.Tests.CurrencyTests.CurrenciesProperlyFormatAmounts(currency: ¥, amount: 1234,56, expectedFormat: "¥1,234.56")
Duration: < 1 ms
Message:
Assert.Equal() Failure
↓ (pos 1)
Expected: ¥1,234.56
Actual: ¥ 1,234.56
↑ (pos 1)
Stack Trace:
CurrencyTests.CurrenciesProperlyFormatAmounts(ICurrency currency, Decimal amount, String expectedFormat) line 29
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.