Attribute Combination SKUs not showing

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 anni tempo fa
I have set attribute combination SKUs for my products.  These are not displaying on the Shopping cart summary nor the email notifications.  This is a big bug for me as I can't tell which product the customer ordered.  I've tried setting this up in the base instances of nop 2.8 and 3.0, but looks like it's a bug there too.  Really need to sort this out quickly.

I have Show SKUs turned on, maybe there's another setting I'm missing???
10 anni tempo fa
hutchwhite wrote:
I have set attribute combination SKUs for my products.  These are not displaying on the Shopping cart summary nor the email notifications.  This is a big bug for me as I can't tell which product the customer ordered.  I've tried setting this up in the base instances of nop 2.8 and 3.0, but looks like it's a bug there too.  Really need to sort this out quickly.

I have Show SKUs turned on, maybe there's another setting I'm missing???

PV attributes should show in cart. Check example of Adidas Women's Supernova CSH 7 Running Shoe in Store Demo and  Admin Demo I dont remember any setting for enabling that. Compare your settings with example. Have you done any customization?
10 anni tempo fa
Yeah, I just checked a clean source solution so it must be something in our instance.  Trying to find what it is. :S
10 anni tempo fa
hutchwhite wrote:
Yeah, I just checked a clean source solution so it must be something in our instance.  Trying to find what it is. :S


Try setting 'ManageStockByAttributes' in your Product Attributes. Here's some clue in the code:

private static void GetSkuMpnGtin(this ProductVariant productVariant, string selectedAttributes, IProductAttributeParser productAttributeParser,
            out string sku, out string manufacturerPartNumber, out string gtin)
        {
            if (productVariant == null)
                throw new ArgumentNullException("productVariant");

            sku = null;
            manufacturerPartNumber = null;
            gtin = null;

            if (productVariant.ManageInventoryMethod == ManageInventoryMethod.ManageStockByAttributes)
            {
                //manage stock by attribute combinations
                if (productAttributeParser == null)
                    throw new ArgumentNullException("productAttributeParser");

                //let's find appropriate record
                var combination = productVariant
                    .ProductVariantAttributeCombinations
                    .FirstOrDefault(x => productAttributeParser.AreProductAttributesEqual(x.AttributesXml, selectedAttributes));
                if (combination != null)
                {
                    sku = combination.Sku;
                    manufacturerPartNumber = combination.ManufacturerPartNumber;
                    gtin = combination.Gtin;
                }
            }

            if (String.IsNullOrEmpty(sku))
                sku = productVariant.Sku;
            if (String.IsNullOrEmpty(manufacturerPartNumber))
                manufacturerPartNumber = productVariant.ManufacturerPartNumber;
            if (String.IsNullOrEmpty(gtin))
                gtin = productVariant.Gtin;
        }
10 anni tempo fa
I tried all this.  Seems that if you copy a product then updated the product attribute combinations on the copy, they don't take.  I had to delete all of them and then re-add.  Quite a pain since I would assume copy should be able to allow the edits to take, but they don't.
10 anni tempo fa
hutchwhite wrote:
I tried all this.  Seems that if you copy a product then updated the product attribute combinations on the copy, they don't take.  I had to delete all of them and then re-add.  Quite a pain since I would assume copy should be able to allow the edits to take, but they don't.


I've tried on my own fresh installation of nopCommerce 2.80. Copied product definitely works.

Another problem I see is that you do not have the combination defined. See the screenshot below, the last product do not have SKU displayed because there's no such PVA combination defined. Others are okay. Note the last 2 are copies of the first 2.

http://i.minus.com/ieFuWpBKtqoA5.JPG
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.