I have a need to track budgets for users and need to either add new columns to the database or add a new table.
Is this possible and if so, how?
Thanks
Rick
Possible to add new column or table to database?
-
- Lieutenant (LT)
- Posts: 66
- Joined: Mon Jun 22, 2009 5:49 pm
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Possible to add new column or table to database?
You can do either by accessing the SQL Server directly. A new table is preferable with a name that Able would never name it. If you add new fields to the existing table, you might run into problems at upgrade time.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
-
- Lieutenant (LT)
- Posts: 66
- Joined: Mon Jun 22, 2009 5:49 pm
Re: Possible to add new column or table to database?
Thanks. How would I access the database? Is it usually stored with AbleCommerce? This is my first project with the software. Is there a free alternative to Sql Server Manager?
Rick
Rick
Re: Possible to add new column or table to database?
Read about DAL and custom queries from here
http://wiki.ablecommerce.com/index.php/ ... uilder_API
Read following thread to auto generate code for you custom tables.
viewtopic.php?f=47&t=9530
By the way how many columns you would need? Are those columns or data would be needed for users only?
http://wiki.ablecommerce.com/index.php/ ... uilder_API
Read following thread to auto generate code for you custom tables.
viewtopic.php?f=47&t=9530
By the way how many columns you would need? Are those columns or data would be needed for users only?
-
- Lieutenant (LT)
- Posts: 66
- Joined: Mon Jun 22, 2009 5:49 pm
Re: Possible to add new column or table to database?
Thanks, I'll check those links. We want to add 3 columns: user_id, max budget, current budget, and prevent them from going over budget.
Rick
Rick
Re: Possible to add new column or table to database?
You can also check user settings if it help you store your information. In this case there will be no need of creating custom columns etc and also DataPort would take care of importing/exporting that data in XML import/export. Read following thread about user settings
viewtopic.php?f=42&t=10487
viewtopic.php?f=42&t=10487
-
- Lieutenant (LT)
- Posts: 66
- Joined: Mon Jun 22, 2009 5:49 pm
Re: Possible to add new column or table to database?
Thanks for the great info.
I think I'm going to use the ac_usersetting table as follows:
Example for user #1:
UserSettingID: (auto-incremented)
UserID: 1
FieldName: MaxBudget
FieldValue: 1000
UserSettingID: (auto-incremented)
UserID: 1
FieldName: CurrentBudget
FieldValue: 300
Rick
I think I'm going to use the ac_usersetting table as follows:
Example for user #1:
UserSettingID: (auto-incremented)
UserID: 1
FieldName: MaxBudget
FieldValue: 1000
UserSettingID: (auto-incremented)
UserID: 1
FieldName: CurrentBudget
FieldValue: 300
Rick