Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 20th, 2006, 4:28 PM   #11
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 bulio is on a distinguished road
I've been poking around with it an have managed to get this far:

http://rafb.net/paste/results/fKFsP371.html

I'm particularly confused at the last part. The tables are spread out as I have shown in above posts, so that would mean I'd need to write to a few separate tables, correct? Or, is it all done in this one table named jos_vm_category:

http://rafb.net/paste/results/EiYcTR44.html
bulio is offline   Reply With Quote
Old Oct 20th, 2006, 4:41 PM   #12
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Take a look at your jos_vm_product* tables and determine which values you need... obviously you need fields like name, price, quantity, etc. The table in your second post is basically individual categories of products... You will need to find out how the category table ties into the products table and make sure your new products are inserted into the correct category... (probbaly just a field linking the two (ie: category='Heaters').

Also, would be a good idea to add exception handling to your Python code. I was dealing with an import issue regarding ImmutableSet, so I am going to wait until later to play with it (when I am able to get behind a physical console).
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Oct 20th, 2006, 4:48 PM   #13
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 bulio is on a distinguished road
Quote:
Originally Posted by Infinite Recursion View Post
Take a look at your jos_vm_product* tables and determine which values you need... obviously you need fields like name, price, quantity, etc. The table in your second post is basically individual categories of products... You will need to find out how the category table ties into the products table and make sure your new products are inserted into the correct category... (probbaly just a field linking the two (ie: category='Heaters').

Also, would be a good idea to add exception handling to your Python code. I was dealing with an import issue regarding ImmutableSet, so I am going to wait until later to play with it (when I am able to get behind a physical console).
Sounds good. Think you can jump on IRC for a moment though? I had a few more quick questions that would be easier answered via the IRC channel.

Thanks!
bulio is offline   Reply With Quote
Old Oct 20th, 2006, 4:56 PM   #14
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Solved my ImmutableSet issue over SSH...

By removing: sets.py, sets.pyc and sets.pyo from
/usr/lib/python2.4/site-packages/MySQLdb/


I'm unable to log into IRC from this network (currently at work, firewalls block it). I'll log in from home this evening some time.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Oct 20th, 2006, 5:01 PM   #15
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 bulio is on a distinguished road
Quote:
Originally Posted by Infinite Recursion View Post
Solved my ImmutableSet issue over SSH...

By removing: sets.py, sets.pyc and sets.pyo from
/usr/lib/python2.4/site-packages/MySQLdb/


I'm unable to log into IRC from this network (currently at work, firewalls block it). I'll log in from home this evening some time.
Sounds great. Right now I'm just trying to figure out how I would enter a product. I believe the fields that would need to be used are:

Jos_vm_product_attribute
Jos_vm_prodcut_price
Jos_vm_product

I assume I need to cursor.execute for each different table? I think that is all the tables that I'd need to edit.
bulio is offline   Reply With Quote
Old Oct 20th, 2006, 5:15 PM   #16
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Can you paste the DESC spread for jos_vm_product and related tables like you did for the jos_vm_category table? Would be easier to assist if I could see the table structures. The amount of tables that you would need to alter would depend on how Virtuemart handles new products. It could be as easy as changing a single table or as complex as changing a 100... depends on how they are integrated , linked , nested, etc etc.


EDIT: On second thought, I will just base my suggestions off of a basic MySQL table entry...
One of several examples: http://aspn.activestate.com/ASPN/Coo.../Recipe/457661
Emphasis on "exampleOfUse()" section.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Oct 20th, 2006, 5:21 PM   #17
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 bulio is on a distinguished road
jos_vm_product: http://rafb.net/paste/results/K0Ffny65.html
jos_vm_product_price: http://rafb.net/paste/results/uRjiaV65.html

A few others are empty, such as jos_vm_product_attribute
bulio is offline   Reply With Quote
Old Oct 20th, 2006, 5:59 PM   #18
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 bulio is on a distinguished road
Ir:

I read your edit and am a little confused with the code, as it doesn't have too much documentation. This is what I tried, and though it works without errors, no products appear on the site. http://rafb.net/paste/results/uztxNJ74.html
bulio is offline   Reply With Quote
Old Oct 20th, 2006, 6:44 PM   #19
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
I'm on IRC. Will be headed out in about an hour...
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Oct 20th, 2006, 6:47 PM   #20
bulio
Hobbyist Programmer
 
bulio's Avatar
 
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 bulio is on a distinguished road
I'm there.
bulio is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC