Showing SKU on order invoice AND on product details (customer view)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Alright so there is still one main feature/problem that NOP hasn't solved yet that is plaguing me as well as many others.


Right now when someone places an order, you have to go into to their order details to see what they bought. This is fine, however it only shows you the name of the product, not the variant SKU.

In my case as is a lot of others cases, to know exactly what Item to ship they will have to click on and open every single item in the order details to get the SKU number to know what Item to ship out.

This is very annoying, 95% of the websites I design the customers use dropshipping methods, this means they have thousands of items and they cannot order an item to ship out unless they know the SKU number, which means if a customer orders say 15 products, they must manually open each of the 15 product details to get the SKU number.


To solve this I would think could be relatively easy. All we need to do is add another catagory to the order details that has the Main product SKU number.

Lets work together to get this solved, hundreds of people using nop need this, and I am sure that hundreds, if not thousands have chosen to use another shopping cart over nop because its lacking this ability.
13 years ago
This is something I NEED as well. I'm designing a website for my client that has over 6000 products. Looking forward to a solution.
13 years ago
find MessageManagers.cs

add code:

sb.AppendLine("(" + HttpUtility.HtmlEncode(productVariant.SKU)+")");

after

sb.AppendLine("<td class=\"row\">" + HttpUtility.HtmlEncode(productVariant.FullProductName));

and rebuild.  This step will add SKU to the order notice mail.


find orderdetails.ascx in administrator/modules

change line 456 (or find the line contains "<%#Server.HtmlEncode(GetProductVariantName(Convert.ToInt32(Eval("ProductVariantID"))))%>") to:

<%#Server.HtmlEncode(GetProductVariantName(Convert.ToInt32(Eval("ProductVariantID"))))%>--(<%#Server.HtmlEncode(GetProductSKU(Convert.ToInt32(Eval("ProductVariantID"))))%>)</a></em>

This will add SKU to the order detail page. you could also do similar changes to the product page.


Let me know if you need further help.
13 years ago
I am trying to do the order details one (its the only one I care about) but if I put the code in just how you have it then the site just errors out on me when I go into order details.

Any suggestions?

Perhaps you can just copy and past lines 456-457 so I can see if I made a mistake (added a symbol or something)
13 years ago
d:\hosting\5050735\html\wholesaleselfdefense\Administration\Modules\OrderDetails.ascx(456): error CS0103: The name 'GetProductSKU' does not exist in the current context

Thats the error in the LOG



........................






System.Web.HttpParseException: d:\hosting\5050735\html\wholesaleselfdefense\Administration\Modules\OrderDetails.ascx(456): error CS0103: The name 'GetProductSKU' does not exist in the current context ---> System.Web.HttpCompileException: d:\hosting\5050735\html\wholesaleselfdefense\Administration\Modules\OrderDetails.ascx(456): error CS0103: The name 'GetProductSKU' does not exist in the current context 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) at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile) at System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath virtualPath) at System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath virtualPath) at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() 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) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext c
13 years ago
sorry. My bad.

add

public string GetProductSKU(int ProductVariantID)
        {
            ProductVariant productVariant = ProductManager.GetProductVariantByID(ProductVariantID);
            if (productVariant != null)
                return productVariant.SKU;
            return "Not available. ID=" + ProductVariantID.ToString();
        }



to orderdetail.ascx.cs file at line 986

after the getproductvariantname function



don't forget to rebuild the solution.
9 years ago
I would like get this back to the attention of the nop team. In my case, I need to pull orders programatically, and it's impossible for me to get the SKU of a product variant, based on what's in the OrderItem table. There really needs to be column in the OrderItem table for SKU (or the Id) from the ProductVariantAttributeCombination table.
6 years ago
Is it possible to add the SKU column to "Current shipping cart" in Customer Details page, in Admin?
The product description can be not unique so the SKU can distinguish the products each other.
Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.