Attributes and Option Groups


https://forum.kartris.com/Topic312.aspx
Print Topic | Close Window

By toomuchpresha - Fri 17 Dec 2010
Does anyone know how to delete option groups and attributes?
The default option groups dont have a delete option

Thanks
By Mohammad - Sun 19 Dec 2010
Hi,

Option Groups and Attributes non of them has the delete option in the released versions of kartris, as they could be linked to different products.

The only way you can do the delete is to do it manually from the database (several tables need to be affected), but its not recommend, as it could break something else.

Will think about having this option in the future.

Mohammad
By JohnH - Mon 8 Aug 2011
Can you tell us which tables need updating ?
By Mohammad - Mon 8 Aug 2011
The below tables should be affected in deleting OptionGroups:

tblKartrisOptionGroups
tblKartrisOptions
tblKartrisProductOptionGroupLink
tblKartrisProductOptionLink
tblKartrisVersionOptionLink
tblKartrisLanguageElements - this is very critical table, be careful when you delete records from this.

I would recommend to update the option groups/options rather than deleting them.
By JohnH - Tue 9 Aug 2011
Is there a database diagram available ?
By Mohammad - Tue 9 Aug 2011
Sorry a diagram is not available, but if you want to clear the options' related data, then the delete should be in the following order:
  1. tblKartrisVersionOptionLink
  2. tblKartrisProductOptionGroupLink
  3. tblKartrisProductOptionLink
  4. tblKartrisBasketOptionValues
  5. tblKartrisOptions
  6. tblKartrisOptionGroups
  7. tblKartrisLanguageElements (where LE_TypeID = 5 OR LE_TypeID = 6)
And to clear the attributes' related data, then the delete should be in the following order:
  1. tblKartrisAttributeValues
  2. tblKartrisAttributes
  3. tblKartrisLanguageElements (where LE_TypeID = 4 OR LE_TypeID = 14)
By toomuchpresha - Wed 10 Aug 2011
Hi Guys,
It still seems weird that we cannot delete option groups. I have built about 10 websites in Kartris so far and none of them have anything to do with PC's or I.T.
One of them is furniture and they only use 2 options groups. This means that they have to see these pre set option groups in their system. This is confusing.

Is there any particular reason why there is no delete button?
By Paul - Wed 10 Aug 2011
The original reason was that deleting groups that were in use was a complex process as the routine would have to check whether the options were in use in any products and then either flag a warning or proceed to remove those options while leaving the products behind.

But it will definitely be in v1.4 - it's on the list.
By Mohammad - Wed 10 Aug 2011
The data came with kartris package are just samples, I'm not sure why you kept them in your newly built websites.

If you want to start building a new website, there is a 'clear data' feature in the back-end "DB Admin" page, which is used to clear all existing products, sessions and/or orders data from kartris, so you can start over building your site from scratch with suitable data instead of modifying the sample data came along with kartris package.
By toomuchpresha - Wed 10 Aug 2011
Ah thats great! Will this all remove any attributes and option groups?
By Mohammad - Wed 10 Aug 2011
Yes, if you selected the type of data you want to clear, it will list down the whole tables that will be cleared if you proceed with the operation.

Attributes and option groups are considered under "Product Data"
By Paul - Wed 10 Aug 2011
There are basically three options for removing data:

product related
order/customer related
session related

The product one will remove all product data, categories, versions, options, option groups, attributes etc. But there is no finer control to remove specific items, because these are all inter-related. So it is something to do before you start populating a store with your own data.