Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Minivend3.14/MySQL Problem



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting OTR Comm (otrcomm@wildapache.net):
> > 
> > >
> > > Now what I have to do is figure out where MV updates the transactions
> > > table.  I assume that it is someplace in Order.pm
> > 
> > See etc/report
> 
> I see in etc/report some references to transactions, but I do not see
> how this is actually updating the MySQL table called transactions.  This
> looks like it is just generating a portion of a report.
> 
> If I am wrong, then I do not see how it works.  What I need to know is
> where in the code the actual update to the transactions table in MySQL
> takes place.
> 
> I have written an interface to Cybercash and I would like to know
> 'legally' where the transactions table is updated. 

There is no legal in Minivend as far as this goes -- the catalog is
responsible for updating its transactions log.  In the MV4 demo, it is
done in an order Route called "log", in the file etc/log_transaction.

It uses the [import] .. [/import] tag pair to bring in the transaction
data. The call looks something like:

Add main order [data
	table=userdb
	column=order_numbers
	key="[data session username]"
	value=" [value mv_order_number]"
	append="1"
	] to transactions: [import table=transactions type=LINE continue=NOTES]
code: [value mv_order_number]
store_id: __STORE_ID__
order_number: [value mv_order_number]
session: [data session id]
username: [data session username]
shipmode: [value mv_shipmode] ([shipping-desc])
shipping: [shipping noformat=1]
...
[/import]

The first [data ...] tag appends the order number to a field in the userdb
record. It is guaranteed to exist, for the MV4 demo checks to see if the user
is not logged in and then creates a "pseudo-user" to provide a customer list
of users that don't create an account themselves. This allows you to provide
a link back to order status like:

<A HREF="[area form='
		mv_username=[data table=transactions
				  col=username
				  key="[value mv_order_number]"
				]
		mv_password=[value zip]
		mv_click=Login
		mv_todo=return
		mv_nextpage=query/check_orders
	    ']">Use this link to check your order status</A>
				

I am still be looking at adding support for your CC thing when I get time. I
think it looks quite nice and would be a great add-on to MV.

-- 
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>

Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun
-
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


Search for: Match: Format: Sort by: