nop ver 1.90: I implemented a "Minimum Shipping Fee": Fixed Display Problem, only Free Shipping remains?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 年 前
This is in reference to the post below; which did not get any replys; Am I in the wrong forum?

[url=https://www.nopcommerce.com/boards/t/17450/nop-ver-190-i-implemented-a-minimum-shipping-fee-but-have-2-side-effects-i-need-help-to-fix.aspx]https://www.nopcommerce.com/boards/t/17450/nop-ver-190-i-implemented-a-minimum-shipping-fee-but-have-2-side-effects-i-need-help-to-fix.aspx[/url]

Maybe there are not that many programmers for NopCommerce; the fact is that while I code -- I did not plan to make changes to the base code! I got traped by the fact that I picked NopCommerce because it was .NET 4 Web Form based, SQL 2008 R2 based, open sourced,& was setup for Visual Studio 2010 Pro. That was a year ago, and I missed going live by last Turkey Friday AND then in late December Nop Ver 2.00 came out as a WebMatrix based??? -- Everybody else may have known BUT I missed it!

Well so much for the crying - The good news it that found the file the set the initial Total Shipping Field on the Checkout Page and inserted the Min Ship Fee code as shown below: I tested all possible states and it is rock solid - except my implementation so far defeates the Free Shipping Option set in the Product Varant record!

_______________________________________________________________________________

//  OrderTotals.ascx.cs

decimal? shoppingCartShippingBase = this.ShippingService.GetShoppingCartShippingTotal(cart, NopContext.Current.User);
                    // SET MIN SHIPPING FEE AT THIS POINT JTD
                    decimal orderShippingMinFee = 7.95m;
                    if (shoppingCartShippingBase < orderShippingMinFee)
                        shoppingCartShippingBase = (decimal)orderShippingMinFee;

                    if (shoppingCartShippingBase.HasValue)
                    {
                        decimal shoppingCartShipping = this.CurrencyService.ConvertCurrency(shoppingCartShippingBase.Value, this.CurrencyService.PrimaryStoreCurrency, NopContext.Current.WorkingCurrency);
                        lblShippingAmount.Text = PriceHelper.FormatShippingPrice(shoppingCartShipping, true);
                        lblShippingAmount.CssClass = "productPrice";
_______________________________________________________________________________

I have found at path (SEE BELOW) to explore to get the Free Shipping BooL Flag to use in a compound IF to defeate the Min Ship Fee Code if the Frag is true; BUT without even a System Diagram it is realy shotting ing the dark; I noticed that in response to AM post a programmer pointed him to a page the  has System Details for Ver 2.00 an up! -- Anybody know if the is such a great page for Ver 1.90 users???

_______________________________________________________________________________

//  OrderSummary.ascx.cs
//   public string GetProductVariantName(ShoppingCartItem shoppingCartItem)
       // {
       //     var productVariant = shoppingCartItem.ProductVariant;
       //     if (productVariant != null)
       //         return productVariant.LocalizedFullProductName;
       //     return "Not available";
       // }
_______________________________________________________________________________

WARNING: BEFORE ANYBODY TRYS TO INPLEMENT THE MIN SHIPPING FEE; I HAVE THE STOREMAX WEB SITE SET TO USA LOCATIONS ONLY AND ONLY USD CURRENCY -- OTHER SETTINGS MAY AFFECT THE IMPLEMEMTATION IN CODE!

I dont know if it if OK to post a small reward to induce a user with knowledge to help me out on a tough one like this?
11 年 前
StoreMAXcom wrote:
This is in reference to the post below; which did not get any replys; Am I in the wrong forum?
Maybe there are not that many programmers for NopCommerce; the fact is that while I code -- I did not plan to make changes to the base code! I got traped by the fact that I picked NopCommerce because it was .NET 4 Web Form based, SQL 2008 R2 based, open sourced,& was setup for Visual Studio 2010 Pro. That was a year ago, and I missed going live by last Turkey Friday AND then in late December Nop Ver 2.00 came out as a WebMatrix based??? -- Everybody else may have known BUT I missed it!


Actually I think the problem is these guys are cranking out so much code that it can be difficult keep up. As I understand it starting with version 2.0 nop was completely rewritten with a focus on moving MVC 3.0. Thats in my opinion was a good move from too many points of view to list, but bad news if you happened to be a user with ton of work invested in earlier version. I'm sure that wasnt a decision that was made haphazardly or without consideration of the fact that it would basically obsolete all previous releases of nop moving forward.

I know you don't want to hear it, but I'd think about migrating to the latest build. And yes I know that's probably easier said that done. I feel your pain.

Personally, I'd post this one over in the commercial development wanted form right here

I be willing to bet someone over there can load up a 1.9 build and help you out. It doesnt sound like a super big deal, but sometimes you run into architectural issues that can make something seemingly simple difficult if not impossible to implement.

Another thought - you might be able to use something like jQuery to rewrite the HTML and update that column with the corrected totals. From what I gather, your workaround is functional on the backend its just that the actual total displayed to the end user is incorrect.
11 年 前
Thanks for the input!

I get a little wordy sometimes...  Actually I fixed the display problum and it is rock solid!

The tough problem is that the implememtation defeates the Free Shipping Bool Flag in the Product Valart Record, and therefore I charge the $7.95 Min Ship Fee on Gift Cards & Catalogs which are FREE Shipping... Right now I have tto refund the $7.95 on those orders???

I will look into the other forum.
11 年 前
What happens if you update your database with the price on those items as -7.95?

Its dirty, but it might work.
11 年 前
JonEvans wrote:
What happens if you update your database with the price on those items as -7.95?

Its dirty, but it might work.


And on the customer entered values you could always subtract -7.95 from the amount they entered (gift certs) after the post. Again super dirty, but it might be better than having to mess around with refunds while you look for a more eloquent solution solution.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.