[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
ProductFiles query
****** message to minivend-users from Lee Hamilton <lee@subvert.net> ******
I've been using minivend for a little while now, but I am now called to
do something that has left me a little confused. From all the docs, faqs,
and archived emails from this list I get the impression that you can do
what I want to do, but for the life of me I can't get it to work.
What I am trying to do is integrate an existing MySQL database into
minivend (I'm running 3.11 on FreeBSD-3.0 btw) that has it's pricing
information in a seperate table to the rest of the product data. That is
there is a table 'prices' which is keyed by 'product_id' and has a field
'price' (as well as some other fields).
The documentation suggest that you can have fields spread over multiple
tables by using the "ProductFiles" directive but that does not seem to be
working for me. Relevant lines from my catalog.cfg:
Database products products.asc dbi:mysql:silksoft:localhost:3306
Database prices prices.asc dbi:mysql:silksoft:localhost:3306
ProductFiles products prices
On starting minivend I see the following in the MySQL log:
990204 3:59:28 299 Connect lee@localhost on
299 Init DB silksoft
299 Query select * from products
990204 3:59:30 300 Connect lee@localhost on
300 Init DB silksoft
300 Query select * from prices
990204 3:59:28 299 Quit
990204 3:59:30 300 Quit
So it's connecting and reading in those tables by the look of it. But
if I try and form a query and refer to [item-price] it returns $0.00. The
MySQL logs show that it hasn't even done a query on the prices table. The
only way I can get the price returned is to use [item-data prices price]
but this is counter-intuitive and I'm worried that it may make things more
difficult later on in regards to doing the checkout etc.
So is what I am trying to do possible? If not, perhaps someone should
change the rewording of the minivend documentation because it certainly
suggests that it is:
"As of MiniVend 3.0, more than one database may be used as a products
database. If the catalog directive ProductFiles is set to a
space-separated list of valid MiniVend database identifiers, those
databases will be searched (in the order specified) for any items that are
ordered, or for product information (as in the [price code] and [field
code] tags)."
Any help or suggestions would be most appreciated.
Regards,
Lee.
--
Lee Hamilton
Systems Administrator
lee@netguide.net
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list