Giter Site home page Giter Site logo

nwazet.commerce's Introduction

Hi there 👋

  • 🔭 I’m currently working on Azure cognitive Search for work, but on my free time, I work on a bunch of personal open source projects that you can find below...

GitHub stats

nwazet.commerce's People

Contributors

attilah avatar bleroy avatar dpomt avatar giuseppemusso-laser avatar hermessbicego-laser avatar jeffolmstead avatar jonvee avatar joshberry avatar lfurzewaddock avatar lorenzofrediani-laser avatar matteopiovanelli-laser avatar strongus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

nwazet.commerce's Issues

Discount Part Driver Won't Effectively Update Discount

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


With the switch in place, the DiscountPartDriver.cs line 74 updates the part.Record.Discount to whatever you provide via the interface (and the database does properly reflects this). However the DiscountPart.cs Model uses Retrieve to fetch the discount value. This means it will first use Infoset and get the discount value from the Content Item rather than the Record and the Content Item is never updated. This effectively means there is no way to update a Discount.

Here is the code segment I have implemented to fix this. It gets used in DiscountPartDriver.cs Editor method.

Existing Code to replace:

#!c#
part.Record.Discount = model.Discount;

New Code

#!c#
string discountString = model.Discount;
double percent;
double discount;
if (!String.IsNullOrEmpty(discountString)) {
    if (discountString.Trim().EndsWith("%")) {
        if (double.TryParse(discountString.Substring(0, discountString.Length - 1), out percent)) {
            part.DiscountPercent = percent;
        }
    }
    else {
        if (double.TryParse(discountString, out discount)) {
            part.Discount = discount;
        }
    }
}

Update to 1.7

Originally reported by: Anonymous


Hello,
It seems that nwazet.commerce version 1.6 does not work well with Orchard 1.7 - after installing the nwazet.commerce module from gallery(http://gallery.orchardproject.net/List/Modules/Orchard.Module.Nwazet.Commerce) no Commerce tab is shown in admin panel. Is there any plan to update nwazet.commerce in orchard modules gallery so that it works OK with Orchard 1.7?
Or maybe you can expose the updated package to upload it in orchard manually?
Thanks!


Workflow Iterate Over Order Products

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


Scenario: I have products that contain a registration URL field. I would like to use a workflow and send out the registration URL on the product for each product that was ordered.

Dilemma: There doesn't appear to be a way to iterate over the Order IEnumerable items within a Workflow.

Ideally: I would be able to iterate over products, expand them using something like Order.Items:1.Product.Fields.Foo.Bar to snag a field value send off one (or multiple) emails with further information around the product that was just purchased. Of course this would assume I actually know how many products are in the cart (and is thus not a perfect solution).

I have looked at C# Scripting module and am getting no where that way. Any chance anyone has ever had to do this? Any alternative approaches that work?


shoppingcart.js mini cart ajax bug

Originally reported by: manudea (Bitbucket: manudea, GitHub: manudea)


Scenario:

  • put a cart widget in a page
  • add product to cart
  • when cart is empty all is ok

if you click add again

  • expected behavior is "another product is added to cart"
  • but instead no product is added, and if you refresh page you see that all product are removed from cart

reproduce live here:
http://jacopo.cms.duemetri.com/product-categories/category-1

Reason:

on first call is called

Nwazet.Commerce/ShoppingCart/Add/{product}

all is ok

on second call is called

/Nwazet.Commerce/ShoppingCart/AjaxUpdate

inspecting the ajax call you see that the second product has missing product id

I have narrowed the problem to this row of shopping cart

shoppingcart.js, row 77: productId = addForm.data("productid"),

it is null....


Module Nwazet.Commerce for Orchard 1.7 cannot run

Originally reported by: leo tran (Bitbucket: leotran, GitHub: leotran)


Hi,

I install Orchard 1.7 and download module Nwazet.Commerce from bitbucket (on Orchard gallery is version 1.6).
But when i enable module then retrieve error message :

The assembly reference 'Orchard.MediaPicker' could not be loaded for module 'nwazet.commerce'.

Is module is ready for Orchard 1.7?
I have heard BertrandLeroy normal installation on his site, i missing something?

Thank you.


ShippingService.cs .Net Framework 4.0

Originally reported by: Anonymous


Hi Bertrand, i tried to set Target Framework to .Net 4.0, on the project, but i get errors, on ShippingService.cs where you invoke the methods MachineKey.Protect and MachineKey.Unprotect those are not available on .Net 4.0.
Can you help me by giving some direction on the best way to solve this.
My clients hosting company doesn´t support .Net 4.5 just .Net 4.0.

Thanks.


Shopping Cart Widget when Product does not exist

Originally reported by: Daniel Higgins (Bitbucket: daniel23, GitHub: daniel23)


Hi Bertrand,

After recooking orchard I noticed that if there is an item in the localStorage cart (client-side javascript) that does not correspond to a product in the database (by product Id), the shopping cart widget fails to load properly when the javascript tries to load the shopping cart. If the cart it gets from the server is empty (NakedCart action, I believe), it will try to load the cart from localStorage. Here it picks up the offending item. The script onCartLoad will then post this to the AjaxUpdate action and pass it the offending item. AjaxUpdate will return a server error, and the cart widget fails to load properly.

You can reproduce this by running the following line in the java script. This will create the phantom item.

    localStorage["nwazet.cart"] = '{ "Country": "United States", "ZipCode": "02459", "items[0].ProductId": "6660666", "items[0].Quantity": "1" }';


After than, any page with the cart widget will get a server failure error from the AjaxUpdate action. The ShoppingCart.GetProducts throws a "Sequence contains no matching element" exception with the following call stack:

#!c#

nwazet.commerce.dll!Nwazet.Commerce.Models.ShoppingCart.GetProducts() Line 119 + 0x9a bytes C#

nwazet.commerce.dll!Nwazet.Commerce.Controllers.ShoppingCartController.BuildCartShape(bool isSummary = true, string country = "United States", string zipCode = "02459", Nwazet.Commerce.Models.ShippingOption shippingOption = null) Line 103 + 0x58 bytes C#
    nwazet.commerce.dll!Nwazet.Commerce.Controllers.ShoppingCartController.AjaxUpdate(Nwazet.Commerce.ViewModels.UpdateShoppingCartItemViewModel[] items = {Nwazet.Commerce.ViewModels.UpdateShoppingCartItemViewModel[1]}, string country = "United States", string zipCode = "02459") Line 206 + 0x26c bytes  C#


Implementing non-credit card checkout service

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


I need to add a checkout option that does not use credit cards. In this particular case, it's payment based on department codes, but I could see other non-credit card payment options being useful in certain cases as well (COD for example).

For the most part, this has been a relatively easy exercise. I've implemented my own ICheckoutService and a custom controller to handle the collection of shipping and payment details. I've been able to do all this in my own module.

The issue I'm running into is that the OrderService (and StripeService) expects to deal with a CreditCardCharge object but my payment information doesn't fit that mold. I've played around with extracting a common interface that could serve additional charge types and it's working so far. Here's what it looks like:

#!c#

public interface ICharge : IDependency {
    string TransactionId { get; set; }
    string ChargeText { get; set; }
    string TransactionUrl { get; set; }
    CheckoutError Error { get; set; }
}

The biggest change is that the charge description (ChargeText is what I called it) is generated by the checkout service upfront instead of being dynamically built from the credit card details when an order is retrieved. You lose the ability to access credit card details separately, but as far as I can tell, the only time they were ever used was to construct the charge description anyway.

I'm interested in your thoughts on this approach. Is there a better or alternative way to do it? Also, is this something you would consider as a pull request? I'd really like to keep my implementation as close to the official repo as possible.

The only other option I came up with would be to stuff my payment details into the CreditCardCharge class. This does work, but seems ugly and I'd probably have to hack at the order views so the payment details displayed in a reasonable way to customers.


Support for Stripe Subscriptions

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


I am in need of support for Stripe Subscriptions. This likely means I will be building it but before spending time on it was wondering if anyone had already started down this road. Info on Subscriptions can be found here: https://stripe.com/docs/api#subscriptions

Does Nwazet.Commerce currently support this? Any desire to or should I build this into my Rework.CommerceExtensions module?


Retrieving discounted prices without HttpContext (from background task)

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


I'm just looking for ideas here, this isn't necessarily an issue with the module. Hopefully that's OK.

I'm trying to create an IScheduledTaskHandler that run periodically and generates some files that need to include the discounted price for particular products.

The problem I'm running into is that the Applies method in Discount.cs relies on having an accessible HttpContext to instantiate a URLHelper to get the products path, which in normal situations would be the current requested page.

Since I'm doing this in a background service I don't have an HttpContext and the call to Applies throws an exception. Any ideas on how I could possibly work around that? I'd be fine with making some modification to my instance of the module if necessary.


Shopping cart not being cleared after checkout

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


Items in the shopping cart remain after completing the checkout process. I would typically expect the cart to be cleared after checkout. Is this by design?

I'm looking at how to clear the cart on checkout and it appears I'll need to add a method to IShoppingCartStorage to remove them from session state and clear them from localStorage as well. Any suggestions on the best way/place to do this? Are there existing hooks I'm missing?


Bug in ShoppingCart.cshtml and related/suimilar views when more than 1 attribute

Originally reported by: Christian Surieux (Bitbucket: csurieux, GitHub: csurieux)


var attributeNamePrefix = propertyNamePrefix + string.Format(".AttributeIdsToValues[{0}]", attrIndex);
foreach (KeyValuePair<int, string> attribute in item.ProductAttributes) {

shoudl be

foreach (KeyValuePair<int, string> attribute in item.ProductAttributes) {
    var attributeNamePrefix = propertyNamePrefix + string.Format(".AttributeIdsToValues[{0}]", attrIndex);

Unable to compile

Originally reported by: Balderdash Codswallop (Bitbucket: Balderdash, GitHub: Balderdash)


New to Orchard so sorry in advance, if this is NOT the place to poste my issue.
Here is what I did:

Downloaded Orchard 1.7.2
Open in VS 2012 Ultimate with Update 3 and compiled and execute the code
F5 in VS and setup the new Orchard site using default recipe
Added the Module Nwazet.Commerce and enabled all feature
Nothing Appears on the dashbord menu :-( even if I sign out and sign in

stopped VS debugging
Noticed the Module download was not included in the solution Modules folder so included it
Compilation now gave this error:

The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
D:\Projects\OrchardTest\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs 71 37 Nwazet.Commerce

Can see this bug already listed on this site where you suggest to download the correct version from the branch for the CMS being used.

I therefore downloaded the latest version ( https://bitbucket.org/bleroy/nwazet.commerce/get/0b1de3326ff0.zip) and replaced the modules\Nwazet.Commerce in my VS solution

Now I gets lots of error like this:

'Nwazet.Commerce.Models.StripeSettingsPart' does not contain a definition for 'Retrieve' and no extension method 'Retrieve' accepting a first argument of type 'Nwazet.Commerce.Models.StripeSettingsPart' could be found (are you missing a using directive or an assembly reference?) D:\Projects\OrchardTest\src\Orchard.Web\Modules\Nwazet.Commerce\Models\StripeSettingsPart.cs 10 31 Nwazet.Commerce

Obviously as I am new to Orchard I am doing someone wrong, so can someone point me the right direction so I can make this Module compile and work.


Tier pricing based on quantity

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


I have a requirement to provide different pricing levels based on the quantity of a Product ordered. I can definitely achieve this by setting up a series of Discounts for each Product but it's a clunky solution for the admin when most Products need tier pricing.

If I developed a more convenient solution to this problem, would that be something you'd be interested in pulling into the module?

Also, do you have any tips on the best way to develop the solution? I'm considering modifying the ProductPart to allow for multiple prices (although this could have a ripple effect into quite a few other areas) or maybe just reusing the Discount functionality and providing a convenient way to automatically create all the necessary Discounts from the Product editor. Haven't dug into it too much yet so I figured I'd see if you had any guidance.

Thanks for this great module and all your contributions to Orchard!


Empty ShoppingCartWidget in infinite loop flooding AjaxUpdate

Originally reported by: Xeevis (Bitbucket: Xeevis, GitHub: Xeevis)


When I first added this widget on a projection page, I got huge flood of AjaxUpdate (like 20 requests per second and it continued over 500 requests when Firebug stopped tracking it). I tried to move it to disabled layer to verify it's indeed this widget causing it and flooding stopped. Then moved it to different visible layer and flooding started again on that layer. So I added product into a cart to verify if it does only for empty cart and it stopped for good and I can no longer reproduce the issue.

I'm sorry that I can't give more info, but maybe someone else encountered this or at least has an idea what caused it.


Specified cast is not valid exception

Originally reported by: Robert Greyling (Bitbucket: RobertTheGrey, GitHub: RobertTheGrey)


I have products that include the product part in their definition (so I never use the raw Product content type) and in v1.6 it worked fine, but now in Orchard 1.7.1, every time I add an item to the cart I get the following exception:

Specified cast is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

See attachment

I have tried running the site from v1.7.1 source in VS and debugged (break on all exceptions) and it never hits the code. Even though the exception looks like it's related to MVC, I can't get it to break into any of the Nwazet Controllers or Drivers before this exception occurs, so I can't see the cause.

As I said, this was working 1.6 just fine for other projects - this is not an upgrade, but a clean 1.7.1 project from scratch.
Any help tracking this down is much appreciated.


Control ordering and labeling of attributes

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


I'm working on some changes so we can control both the order in which attribute drop-down lists are rendered on the page and the order of attribute options within the each drop-down. In our case, this is needed because there is a logical order in which the user would want to choose certain attributes and some attribute options have a logical order as well. Think t-shirts where the sizes (small, medium, large, x-large) seem awkward in alpha order (large, medium, small, x-large).

I'm also adding a secondary display text value for attributes so the label of the drop-down shown to the user can be different from the attribute's title. This is useful for us because we may have several attributes that we want to display to the user with the same label, but on the back-end we want to easily identify them as being different. Apparel is good example, we may have a bunch of different products where we want the user to select "Size", but on the back-end we want to title the attributes as "T-Shirt size", "Sweater Size", etc.

Do you think these would be useful additions to the module? Would you consider this as a pull request? I have quite a bit of the work done and so far the changes are fairly simple and isolated.


Javascript not working with dynamic ajax loading for shoppingcart.js

Originally reported by: Christian Surieux (Bitbucket: csurieux, GitHub: csurieux)


Suggested correction (this editor is clumsy)

jQuery(function ($) {
var setQuantityToZero = function(parentTag) {
return function(button) {
return button.parents(parentTag + ":first")
.find("input.quantity").val(0)
.parents("form");
};
},
miniLoad = function(form) {
mini.load(form.attr("action"), form.serializeArray(), onload);
return false;
},
onload = function(text) {
mini.parent().toggle(text.trim().length > 0);
$(".minicart .delete").on("click", function () {
$(this).trigger("nwazet.removefromcart");
return miniLoad(setQuantityToZero("li")($(this)));
});
$(".minicart .update-button").on("click", function () {
$(this).trigger("nwazet.addtocart");
return miniLoad($(this).parents("form"));
});
$(this).trigger("nwazet.cartupdated");
},
mini = $(".minicart");

mini.load(mini.data("url"), onload)
    .parent().hide();

$(".shoppingcart .delete").on("click", function () {
    $(this).trigger("nwazet.removefromcart");
    setQuantityToZero("tr")($(this)).submit();
});

$(".addtocart-button").on("click", function () {
    $(this).trigger("nwazet.addtocart");
    return miniLoad($(this).parents("form"));
});

});


Attribute price adjustments

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


I have a requirement to adjust product prices based on the attributes the customer selects when adding a product to the cart. Would you be interested in pulling this into the official module if I come up with a nice solution for it?

I have an initial implementation I'm working on and it only required a few adjustments to the ProductAttributePart (to collect and store price adjustments) and a small change to the PriceService to actually adjust the price when necessary.

Here's what the feature looks like at the moment:

Attribute selection

attribute selection

Attribute administration

attribute admin

Please let me know if this is something you're interested in. Thanks for sharing such a great module.


Pricing settings being incorrectly overridden when saving site settings

Originally reported by: Josh Berry (Bitbucket: joshberry, GitHub: joshberry)


When saving general site settings, the Pricing settings used by the Tiered Pricing feature are being incorrectly overridden.

Steps to repro:

  1. Enable the Tiered Pricing feature.
  2. Go to the Pricing settings page and update the settings.
  3. Go to the Settings page and click save.
  4. Go back to the Pricing settings page - the updates made in step 2 are lost.

This is happening because the ProductSettingsPartDriver is being called when the general site settings are saved but the call to TryUpdateModel in the driver's Editor method fails to update the ProductSettingsViewModel with the previously saved values.

I can see a few ways to fix this. I could refactor the pricing settings to eliminate the use of the driver but that would be a big change. Another option would be to simply add a test in the driver to check if the update initiated from the Pricing settings page and only update the part in that case. The best way I can think of to do this is check if the updater object is of type ProductSettingsAdminController. Any thoughts or suggestions?

The exact same issue exists in the Orchard.Search core module. I logged a bug for it on codeplex: https://orchard.codeplex.com/workitem/20494


Error on ShoppingCart.cshtml

Originally reported by: nduarte (Bitbucket: nduarte, GitHub: nduarte)


Hello Bertrand and Sipke ,
I´m starting to use your module a i get this error when trying to view the cart or on checkout, can you give me any clues on what can i do do fix this.
Thanks,
Nuno.

Server Error in '/' Application.

The best overloaded method match for 'string.IsNullOrWhiteSpace(string)' has some invalid arguments

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'string.IsNullOrWhiteSpace(string)' has some invalid arguments

Source Error:

Line 108:
Line 109:
Line 110: @if (String.IsNullOrWhiteSpace(Model.Country) &&
Line 111: String.IsNullOrWhiteSpace(Model.ZipCode)) {
Line 112: @Display.ShippingInfoForm()

Source File: e:\VS Projects\Orchard_Nwazet\src\Orchard.Web\Modules\Nwazet.Commerce\Views\ShoppingCart.cshtml Line: 110

Stack Trace:

[RuntimeBinderException: The best overloaded method match for 'string.IsNullOrWhiteSpace(string)' has some invalid arguments]
CallSite.Target(Closure , CallSite , Type , Object ) +202
System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +685
ASP._Page_Modules_Nwazet_Commerce_Views_ShoppingCart_cshtml.Execute() in e:\VS Projects\Orchard_Nwazet\src\Orchard.Web\Modules\Nwazet.Commerce\Views\ShoppingCart.cshtml:110
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +119
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +759
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +382
System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +470
System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +155
System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model) +93
Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) +267
Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.b__15(DisplayContext displayContext) +160
Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.b__2(DisplayContext displayContext) +134
Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) +220
Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) +1817
Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) +204
Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable1 parameters) +205 Orchard.DisplayManagement.Implementation.DisplayHelperBehavior.InvokeMember(Func1 proceed, Object target, String name, INamedEnumerable1 args) +99 ClaySharp.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29 ClaySharp.ClayBehaviorCollection.Execute(Func1 proceed, Func3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13 ClaySharp.ClayBehaviorCollection.InvokeMember(Func1 proceed, Object self, String name, INamedEnumerable1 args) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29 ASP._Page_Core_Shapes_Views_ShapeResult_Display_cshtml.Execute() in e:\VS Projects\Orchard_Nwazet\src\Orchard.Web\Core\Shapes\Views\ShapeResult\Display.cshtml:1 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +119 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +759 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +382 Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) +238 Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutView.Render(ViewContext viewContext, TextWriter writer) +99 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +429 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39 System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +74 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388
System.Web.Mvc.<>c__DisplayClass1c.b__19() +72
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388
System.Web.Mvc.<>c__DisplayClass1c.b__19() +72
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388
System.Web.Mvc.<>c__DisplayClass1c.b__19() +72
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388
System.Web.Mvc.<>c__DisplayClass1c.b__19() +72
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388
System.Web.Mvc.<>c__DisplayClass1c.b__19() +72
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388
System.Web.Mvc.<>c__DisplayClass1c.b__19() +72
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +388 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +303
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +844
System.Web.Mvc.<>c__DisplayClass1d.b__19() +71
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +44
System.Web.Mvc.Async.<>c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +42 System.Web.Mvc.Async.WrappedAsyncResult1.End() +151
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +68
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +47
System.Web.Mvc.Async.WrappedAsyncResult1.End() +151 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +65 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +39 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +45 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +47 System.Web.Mvc.Async.WrappedAsyncResult1.End() +151
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +66
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) +47
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9628700
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


Track Discount Codes on Order

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


My Coupon module utilized the Discount framework. I would like to be able to offer Single Use coupons. The only way to do this is to keep track of the coupon the user utilizes. Unfortunately, I believe the Discount Codes (and thus my coupon codes) are not recorded anywhere with the order. So I have the following thoughts:

  1. I could expand the Orders (xml) to record the Discount Code(s) that were used with the order
  2. I could build a database table to capture these orders

I don't believe there is any way of doing either of the above without blending back into the native Nwazet.Commerce module (i.e. there are not extension points I can think of that expose this to allow a third party module to handle). So the questions are:

  1. Do you know of any touch point where I could collect the discount codes?
  2. If not, does it make sense for core Nwazet.Commerce to capture discount codes utilized?
  3. Querying old Orders (via XML) won't be fast to query but I hate to throw up an extra table just to track discount codes used with a user, any other possibilities? Do you think XML would slow things down?

Commerce Link not showing in Admin Panel

Originally reported by: Anonymous


Hi,
I have installed & enabled Nwzet Commerce module onto Orchard 1.7.2.

The Commerce link is not showing in the Admin Panel.

Any help please?

Here is some exceptions I am getting:
2013-12-05 22:34:51,935 [13] Orchard.Environment.DefaultBuildManager - Error when compiling assembly under ~/Modules/Nwazet.Commerce/Nwazet.Commerce.csproj.
System.Web.HttpCompileException (0x80004005): c:\TO_BE_DELETED\Orchard\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs(71): error CS0246: The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
at Orchard.Environment.DefaultBuildManager.GetCompiledAssembly(String virtualPath) in c:\TO_BE_DELETED\Orchard\src\Orchard\Environment\IBuildManager.cs:line 53
2013-12-05 22:34:52,012 [13] Orchard.Environment.DefaultBuildManager - Error when compiling assembly under ~/Modules/Nwazet.Commerce/Nwazet.Commerce.csproj.
System.Web.HttpCompileException (0x80004005): c:\TO_BE_DELETED\Orchard\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs(71): error CS0246: The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
at Orchard.Environment.DefaultBuildManager.GetCompiledAssembly(String virtualPath) in c:\TO_BE_DELETED\Orchard\src\Orchard\Environment\IBuildManager.cs:line 53
2013-12-05 22:34:52,083 [13] Orchard.Environment.DefaultBuildManager - Error when compiling assembly under ~/Modules/Nwazet.Commerce/Nwazet.Commerce.csproj.
System.Web.HttpCompileException (0x80004005): c:\TO_BE_DELETED\Orchard\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs(71): error CS0246: The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
at Orchard.Environment.DefaultBuildManager.GetCompiledAssembly(String virtualPath) in c:\TO_BE_DELETED\Orchard\src\Orchard\Environment\IBuildManager.cs:line 53
2013-12-05 22:34:52,142 [13] Orchard.Environment.DefaultBuildManager - Error when compiling assembly under ~/Modules/Nwazet.Commerce/Nwazet.Commerce.csproj.
System.Web.HttpCompileException (0x80004005): c:\TO_BE_DELETED\Orchard\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs(71): error CS0246: The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
at Orchard.Environment.DefaultBuildManager.GetCompiledAssembly(String virtualPath) in c:\TO_BE_DELETED\Orchard\src\Orchard\Environment\IBuildManager.cs:line 53
2013-12-05 22:34:52,199 [13] Orchard.Environment.DefaultBuildManager - Error when compiling assembly under ~/Modules/Nwazet.Commerce/Nwazet.Commerce.csproj.
System.Web.HttpCompileException (0x80004005): c:\TO_BE_DELETED\Orchard\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs(71): error CS0246: The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
at Orchard.Environment.DefaultBuildManager.GetCompiledAssembly(String virtualPath) in c:\TO_BE_DELETED\Orchard\src\Orchard\Environment\IBuildManager.cs:line 53
2013-12-05 22:34:52,264 [13] Orchard.Environment.DefaultBuildManager - Error when compiling assembly under ~/Modules/Nwazet.Commerce/Nwazet.Commerce.csproj.
System.Web.HttpCompileException (0x80004005): c:\TO_BE_DELETED\Orchard\src\Orchard.Web\Modules\Nwazet.Commerce\Controllers\ShoppingCartController.cs(71): error CS0246: The type or namespace name 'MediaPickerField' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Bool


MediaPicker field pb with Nwazet.Commerce

Originally reported by: Christian Surieux (Bitbucket: csurieux, GitHub: csurieux)


I think that the MediaPickerProductImageSummaryAdmin.cshtml when installed by the ecommerce module is taking precedence on any contenttype using a medipickerfield and is used to render the mediapickerfield of any such contenttype. This for the display of Content in admin.
This was breaking my page with very large pictures where I was previously reducing the image size in this screen.


ShippingService.cs .Net Framework 4.0

Originally reported by: nduarte (Bitbucket: nduarte, GitHub: nduarte)


Hi Bertrand, i tried to set Target Framework to .Net 4.0, on the project, but i get errors, on ShippingService.cs where you invoke the methods MachineKey.Protect and MachineKey.Unprotect those are not available on .Net 4.0. Can you help me by giving some direction on the best way to solve this. My clients hosting company doesn´t support .Net 4.5 just .Net 4.0.
Thanks.


Adding Unpublished Products to Bundle throws Error

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


In BundleServices.cs the GetProducts() method retrievews the VersionOptions.Latest variation of Products. However, the AddProduct(int quantity, int product, BundlePartRecord record) method simply uses _contentManager.Get(product).Record. Therefore, when the "product" is unpublished it will not return any ContentItem will be null and .Record call will throw an error.

I am not sure which way is best to go. Should a user be allowed to add products that are unpublished (seems like to me they should be able to as someone could have delayed publishing in effect to become available on a particular date). If so, we just need to change this line of code:

#!c#

ContentItemRecord = _contentManager.Get(product).Record,

to

#!c#

ContentItemRecord = _contentManager.Get(product, VersionOptions.Latest).Record,

to be consistent with the bundle part selection list.

While we are on the topic, it becomes difficult to manage bundles when the list of products you have becomes long. Any thoughts as to what type of User Interface could better handle this?

Finally, the only other "Bundle" issue I see is that SysCache prevents the showing of updated bundle information when you make a change. I have ran into this issue before when working directly with Records and have no idea how to cause SysCache to clear itself and pull from the database again. Just makes it difficult when you know you updated the bundle but don't see any changes...


Order.cshtml Editor Template needs jQuery Included

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


Nwazet.Commerce / Views / EditorTemplates / Parts / Order.cshtml needs the following included at line 6:

#!c#
Script.Require("jQuery");

Here is the exact file:
https://bitbucket.org/bleroy/nwazet.commerce/src/14283cd581389140b2e2ecf71e7f90d1104044cc/Views/EditorTemplates/Parts/Order.cshtml?at=default

Without the change you cannot add Activities.


Stripe Feature has Unlisted Dependency on Nwazet.Orders Feature

Originally reported by: Anonymous


Nwazet.Commerce.Controllers.StripeController is listed as a "Stripe" feature and it utilizes "IOrderService" which is currently only resolvable when the "Nwazet.Orders" feature is enabled. I don't believe there is a way of removing this dependency though it would be nice. I have an example where I just want a user to "SendMoney" without the overhead of Nwazet.Orders. Look forward to your thoughts.


CreateOrder Doesn't Fire Event After Created

Originally reported by: Jeffrey Olmstead (Bitbucket: ems, GitHub: ems)


Without CreateOrder firing an event after the information is loaded into it, it makes it impossible to use a handler for doing stuff after the data is there. Here is my fix (or I welcome another approach):

#!c#
var order = _contentManager.Create("Order", VersionOptions.DraftRequired).As<OrderPart>();
order.Build(creditCardCharge, items, subTotal, total, taxes,
    shippingOption, shippingAddress, billingAddress, customerEmail,
    customerPhone, specialInstructions);
order.Status = status;
order.TrackingUrl = trackingUrl;
order.IsTestOrder = isTestOrder;
order.UserId = userId;

var random = new byte[8];
RngCsp.GetBytes(random);
order.Password = Convert.ToBase64String(random);

_contentManager.Publish(order.ContentItem);

The only important parts / changes are creating it as a draft:

#!c#
var order = _contentManager.Create("Order", VersionOptions.DraftRequired).As<OrderPart>();

Then publishing it once all the data is added:

#!c#
_contentManager.Publish(order.ContentItem);

This allows a handler I have to pick up the OnPublished event for a part that is attached to the Order.


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.