in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Changing attributes after product is activated

Last post 06-18-2008 12:59 PM by Naz. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 05-21-2008 9:03 PM

    Changing attributes after product is activated

    Hi,

    Is there any way to change the attributes of a product (add new or delete) on a product has been activated. Has any one modified this? What kind of problems would I run in to if I changed this?

     Thanks

  • 05-21-2008 10:31 PM In reply to

    Re: Changing attributes after product is activated

    I think the only way to Modify/Add attributes after the Product was activated is to do this manually thru the Database.
    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 05-21-2008 11:12 PM In reply to

    Re: Changing attributes after product is activated

    Do you know why it was designed like this, it seems there would have to be a reason? Do most people not change the attributes for a product once they are set? Example I have a red colored product and I just got a black color of the same product in stock, would most people create a new product for this new color? Anyone?

    Thanks for the reply!

  • 05-21-2008 11:32 PM In reply to

    Re: Changing attributes after product is activated

    I think that this is a Bug but also a real complicated one the main problem is generating new SKU's for all the attributes that are already in the product and kepping the inventory that was in there before (but also this inventory can change becuse of the new attribute if there are multiple attributes)

    (Generating Sku's for all attributes is about the only (right) way to do inventory)

    I think that most people don't end up doing Inventory even if they say they need/want it so I think there should be an option to Enable Inventory (SKU generation) and just use the attributes as they are.

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
  • 05-22-2008 9:19 AM In reply to

    Re: Changing attributes after product is activated

    It's not really a bug. Design flaw maybe, but not a bug Smile

    Yitzchok is right about generating Sku's based on the attributes and those being tied to inventory. Re-Generate the sku's and you lose the inventory. The way I envisoned it working was that any new attribute(s) would cause the admin to create a new product. This way they have the old inventory and the new inventory and they can still get the info they need by writing some reports / queries.

    Now, all that being said, this is, in my mind, the weakest part of the application so if anyone has any ideas about how to handle this better then I am ALL EARS. It's a sticky problem to be sure.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-10-2008 10:03 AM In reply to

    Re: Changing attributes after product is activated

    OK, here's my suggestion, since I'm hitting this "feature" right now... I had created my db of products with no attributes, thinking I'll create it later... My mistake ;)

    I don't have a patch yet, but if I end up coding this I'll see about uploading it.

    The following assumes a product has already been created/saved and a SKU generated, and that the existing product had NO ATTRIBUTES AT ALL.

    If the admin wants to add attributes to a product that has NO attributes, when they click ADD in Available Attributes, it will ask the user what to do with existing products with the SKU (delete, or move inventory to one particular attribute)

    If the user selects delete, the existing product SKU entry is deleted, and new SKUs are created, with zero inventory.

    If the user selects to move it to one attribute, then the new SKUs are inserted, then the existing SKU's inventory is assigned to the SKU that the user selected. For example, say we had a product called WIDGET with a sku of W001 (how imaginative). Let's say we now have a selection of widget colours available. User clicks Add Attribute (Widget Colours: Red, Green, Blue) and selects to move existing inventory to Green (since the original widget was green). The SKUs (W001-Red, W001-Green, W001-Blue) will get created, then W001-Green will get W001's inventory, then W001 will get deleted.

    Is Required?

    This feature is currently broken, by the way...

    But in a perfect world, if the "IS REQUIRED" option is NOT selected, then the original SKU is left intact, and the inventory is NOT moved (or even offered to be moved). This is because there seems to be the concept of "base item", and "attributed" item, each with different inventory.

    SKU page

    There seems to be a bug with the IsRequired attribute flag, since if you create an item with an attribute, and do not check "Is Required", there is no SKU generated for the base (non-attributed) item... and therefore no inventory is allowed. This would need to be added.

    Comments?

    I don't have time right now to implement this... I'm going to deploy without this feature for now Sad but hopefully the above layout can help someone come up with a coded solution.

    I'm always open to comments...

    Filed under: , , , ,
  • 06-10-2008 11:11 AM In reply to

    Re: Changing attributes after product is activated

    The Is Required feature is working at http://www.dashcommerce.com, so if there are problems with it, then please flesh out why / when it isn't working and report it at CodePlex.

    Dekker500:
    The following assumes a product has already been created/saved and a SKU generated, and that the existing product had NO ATTRIBUTES AT ALL.

    We can't hang our hat on this, as this may not be a valid scenario. There are only a few folks that don't care for the inventory as it is, but aside from this I'm not hearing too many suggestions, so I'm not sure if it's worth messing with.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-10-2008 1:28 PM In reply to

    Re: Changing attributes after product is activated

    admin:
    The Is Required feature is working at http://www.dashcommerce.com 

    I'll try to look into this.... I'm using the repository version though, so it may be in flux...

    However... If I create a product with an attribute, and I DO NOT check the IS REQUIRED box, then go to SKU, click SAVE, I am presented with an inventory page. There is NO line for me to enter the inventory of the item without the attribute. i.e., there is no way for me to record the amount on hand of the base item.

    Or am I completely missing what the IS REQUIRED attribute represents, when referring to attributes?

    admin:
    ...I'm not hearing too many suggestions, so I'm not sure if it's worth messing with.

    Most people feel it's easier to live with a problem than bother with opening tickets... And if there is a workaround (delete product then re-create) they'll live with it since it gets it done. I'm simply trying to make a better product in dashCommerce!

    admin:
    We can't hang our hat on this, as this may not be a valid scenario.

    Sorry, I didn't mean that was the only application of the design... I just didn't flesh it out at the time, but here goes!

    The following is for products that HAVE AT LEAST ONE ATTRIBUTE

    In the current system, when a product is created with multiple attributes, the attributes are appende to the SKU in a user-selectable order. SKU-Attrib1-Attrib2 etc 

    If a user wants to add an attribute to a product that already has one (or more) attribute, the user would be presented with the same GUI they now have, allowing them to select what order the attribute should be inserted.

    The user would also be asked what to do with existing inventory/SKUs.

    • If the new Attribute is not flagged as IS REQUIRED, the new SKUs are recorded, and no inventory is transferred.
    • If the IS REQUIRED flag is set, then the user is warned that existing inventory will be lost and new SKUs are generated.

    Having said all that, please see my next post...

    Filed under: ,
  • 06-10-2008 2:24 PM In reply to

    Re: Changing attributes after product is activated

    To be clear, the IsRequired field flags an Attribute as required, so when you go to the product page, you must fill out that attribute. For example, at http://www.dashcommerce.com, the Domain is a required attribute for any of the Licenses. So, if you try to add a License to the basket without filling in the domain textbox, you will get a validation errror. It's a UI / Validation thing.

    The re-assignment of inventory - yeah, that would work, I was thinking on it and I was hoping something more "user friendly" would pop into my head (or someone elses). Re-assigning inventory on a small list is pretty easy, but you can get up to 50 Sku's pretty easy. It may have to be the way to go, so thanks for thinking it through and offering something up.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-10-2008 2:27 PM In reply to

    Re: Changing attributes after product is activated

    Maybe this should get moved to a "design/feature request" thread, but here's a larger scale design proposal for attributes. Sorry for the long/detailed post, but my "day job" requires this kind of details ;) Besides, if they are written down, at least the design can be discussed.


    I agree with your assertion that the only way to do inventory control is per SKU-Attribute pairing (since anything else is essentially dealing with "allow zero inventory", which means you don't have an inventory control...)

    Attributes in the current version (3.0) are specified at Product creation-time. This means that if a new attribute is available, or even if a new entry to an existing attribute is available, there is no way to provide for this through the UI. You can do all this through SQL, but clients are not going to like that... Also, if you add a new entry to an existing Attribute list, the products do not automatically get the new SKU combination. This messes some things up when a visitor comes to the dashCommerce store, and sees that new attribute option (Oooh, I can order my T-shirt in Puke colour!) but there is never any inventory, even though the colour was offered.

    Now, I don't deny that there are ways of manually doing most of these functions, but the overall design should minimize these SQL statements and wrap them up in an effective user interface for the store owner.

    A list of desireable features for Attributes are:

    • Can create an item with no attributes (simple product SKU)
      • Already exists
    • Can create an item with one or more attributes (creates SKU-ATTRIB1-...-ATTRIBx entries)
      • Already exists
    • Can selectively remove invalid attribute entries
      • By this I mean you can add "Colour choice" to a widget which creates Widget-Red and Widget-Blue and Widget-Yellow, and manually remove Widget-Blue, leaving the others at "allow negative inventory". It seems trivial now, but consider teh case when you have 57 different standard colours, but one product line does not offer one of the standard colours. '
      • This can be currently handled by SQL, removing individual entries from the Store_Sku table.
    • Can manually add new attribute entries
      • Continuing with the above example, suppose I have a standard list of 57 colours for all my products, but a few also allow a special "fuscia" colour. Instead of requiring the user to enter a new complete list of colours for the few products, they could select the standard colours, then add the special colour(s).
      • This can currently be handled by SQL, adding individual entries to the Store_Sku table and concurrently adding the entry to the Attributes list through the GUI. If the second step is not done, the visitor to the site will never see the new product. A side-effect of this manual process is all products using that Attribute group will have that new attribute in the user's drop down, but will never have any inventory (perhaps should not even show up? Either way, this is not a big problem)
    • Can manually add attribute groups
      • You now carry "spring colours" and not just "fall colours". This is the concept of adding new attributes as we have it today. For example, colour and size combinations, resulting in multiplicative SKU-Attribute1-Attribute2 entries.
      • This can currently be done by removing the product's entries in Store_Sku table and the Store_Product_Attribute_Map, then setting the Store_Product entry for "Enabled" to false. You can then go back into the GUI and add all the attributes you want, but of course all inventory is lost
    • Can manually delete attribute groups
      • In this case, any inventory assigned to an affected SKU-Attribute would disappear. Same as above (This is Multiplicative). 
      • Same manual process as manually adding attribute groups
    • "Allow Negative Inventory" by SKU-Attribute combination (but keeping the set all/clear all capability)
      • If you carry three different colour widgets, but one colour is no longer being carried by the manufacturer, you could set that one colour widget as "do not allow negative inventory" to allow you to sell out your stock on hand, and leave the other items as "allow negative inventory" since you can always re-order those.
      • This can not be handle in the current system. It is all-or-nothing.

    I should point out that in the current (v3.0) model, if we delete a product then re-create with the new attributes, all SEO and other types of links directly to our product would break, since the new product would have a new product ID even though everything else is the same.

    In the absense of a different model for product attributes, perhaps a GUI should be created to wrap the manual processes defined above, so that a site owner can do those functions without resorting to SQL. They would lose their current inventory levels whenever they touched the attribute collection, but perhaps that is the price to pay for gaining the functionality.

    OK, brain-dump over. Time to do my paid work ;P

    [edit]Oh, one more factor... If a user has added a new attribute to the attribute list, and the store owner visits the product page, they should be able to add that new attribute entry to the product...

    Filed under: , ,
  • 06-10-2008 2:34 PM In reply to

    Re: Changing attributes after product is activated

    admin:
    ...the Domain is a required attribute for any of the Licenses. So, if you try to add a License to the basket without filling in the domain textbox, you will get a validation errror. It's a UI / Validation thing.

    Actually, the problem I see is if Domain is NOT a required attribute... How is inventory stored for this? I don't see it stored anywhere, since there is no SKU entry in the database with any inventory...

    Filed under: ,
  • 06-10-2008 2:55 PM In reply to

    Re: Changing attributes after product is activated

    Thanks Dekker500 - let me digest all of this and see if we can't get some of this into a future release. I like to think on things for a while, but this is a great start - thanks much for the time and insight. I'll come back here if I have something to add or questions to ask.

    --
    Support dashCommerce - Buy Our Stuff!!


    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us! Documentation? Help us write some!
  • 06-10-2008 3:22 PM In reply to

    Re: Changing attributes after product is activated

    WIll this update been in the new 3.01 release?

    ~Paul
  • 06-10-2008 10:28 PM In reply to

    Re: Changing attributes after product is activated

    I created a work around for this, it isn't the best solution but it was ok with the people that were using the product. 

    What I did was I modified the attributes.cs page to allow editting / deleting / adding of new attributes and when they made a change to the attributes it prompted the admin that this would change the product from enabled to disabled. This was done so the admin would know that they have to reassign the inventory to the new attributes (if a new attribute was added / deleted / changed). With that said I also modified the sku.cs to check for the attribute changes and assign the newly setup attributes sku so inventory could be set.

    This is working great for me, but it does require you to set the inventory again if new attributes that currently were not present are now assigned to the product.

    Hope this helps

     

  • 06-18-2008 12:59 PM In reply to

    • Naz
    • Top 25 Contributor
    • Joined on 02-11-2008
    • Posts 53
    • dashCommerce Core Team

    Re: Changing attributes after product is activated

    LumisProject:

    I created a work around for this, it isn't the best solution but it was ok with the people that were using the product. 

    What I did was I modified the attributes.cs page to allow editting / deleting / adding of new attributes and when they made a change to the attributes it prompted the admin that this would change the product from enabled to disabled. This was done so the admin would know that they have to reassign the inventory to the new attributes (if a new attribute was added / deleted / changed). With that said I also modified the sku.cs to check for the attribute changes and assign the newly setup attributes sku so inventory could be set.

    This is working great for me, but it does require you to set the inventory again if new attributes that currently were not present are now assigned to the product.

    Hope this helps

     

     

    Can you upload a patch or the code changes as I need to do this on my site and also don't need the inventory system.

    I think your implementation might be better than what I was going to do which was to include a "Add Simmilar Product" button which clones the product into a new listing

    www.objectreference.net - My Blog
    www.vortexleather.com - My Leather clothing store

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!
    Filed under:
Page 1 of 1 (15 items)