I try to integrate storm into my cck/view based customer administration system.
Little background info:
In my drupal site I have contacts/customers as nodes with a lot of cck fields in one nodetype. (around 1000 so far)
What i need now is to connect and administer job/projectt nodes with customers (i tried node relationships and couldn't get it to work).
I played around with storm and it works.
Now the big problem:
How to migrate/transform my old nodes to stormorganizations???
I tried adding all my cck fields to the content type stormorganization and used the following query in phpmyadmin:
UPDATE node SET type = 'oldnodetype' WHERE type IN ('stormorganization');
Now all my old contacts/customers are Organizations ... well ... kinda they are not appearing as organizations in storms drop down menus.
I checked the db tables ... under "node" it tells me they are all indeed stormorganizations but the table "stormorganization" shows me only the manually created testorganization. (which is showing in the drop down)
How else can I import a lot of nodes to use with storm? I am really excited about this module and hope we can figure something out.
thx
Comments
Comment #1
Magnity commentedIf you go to your content administration screen (standard drupal), does it show the nodes as stormorganizations correctly?
If you then click to view one of those nodes, do you get any errors, and if you can view the page, is the organization marked as active, and provider or customer?
I suspect that you'll need to also run some sort of script whereby a record is created for each node in the table stormorganizations.
Comment #2
qriz commentedYes
No errors - not active - neither provider nor customer... (I went on the edit screen, filled out the fields plus selected active and customer and saved ... it went back to page but didn't made the changes)
Could somebody please give me an idea how to formulate this query
Comment #3
Magnity commentedRight. That is as I thought.
Storm uses the table {stormorganization} to store data about organizations, and part of this is used to determine whether an organization is displayed in those dropdowns etc.
You'll need to insert a line into the table {stormorganization} for each node that you import.
Take a look at the function stormorganization_insert in the file stormorganization.module for an idea of the fields.
Comment #4
qriz commentedI can't figure out how to formulate the query...
I tried:
that results in #1327 - Undeclared variable: stormorganization
somebody please help
Comment #5
qriz commentedFinally I got progress ....
the query i just used was:
then :
UPDATE node SET type = 'stormorganization' WHERE type IN ('oldnodetype');Now I see all my old customers in the drop down.
The next step is to figure out how to convert the old cck fields into the storm ones ...
by the way the query produced all organizations to be active and customers
Comment #6
qriz commentedComment #7
Magnity commentedThe best way to learn about how Storm stores field data is probably to create a few example organizations through the web interface and see how those are put into the database.
However, I do wonder whether moving from a CCK based solution to Storm fields is necessarily needed. The CCK fields should still show up on Storm nodes, I guess it just depends on how you'll be using the system.
Comment #8
qriz commentedYeah, i came to the same conclusion. The thought behind it was to use them with the billing system, but anyways there is a lot of customization required to get it like i want it to be. Awesome module but a little hard to handle imho ... Thx
Comment #9
Magnity commentedCorrect me if I'm wrong, but I think this support issue is fixed.
You should have another look at Storm when you upgrade to D7. With the Fields API in Drupal core, there should be a neater upgrade path then.