[ic] intercept item insert in cart

Mike Heins mike at perusion.com
Thu Aug 11 13:14:49 EDT 2005

Quoting Alessandro Poletto (pollok at gmail.com):
> I'am searching to make a logger for some actions that can generate
> interesting reports in my shops.
> One of them is a report of the items that is inserted in the cart and
> after is dropped out without buying.
> I've thinked that a simple sql insert in a logger table of the item
> was enough, but I've noticed that there isn't a simple way to
> intercept the item's insert moment.
> I go to explain: when the customer insert a item in the cart the form
> with [process-target] method and "mv_order_item", "mv_oder_quantity"
> hidden fields send to the "process-target" page all the datas.
> I suppose that the [process-target] page is ord/basket.html so i've
> tried in that page with: [scratch mv_order_item] or [cgi
> mv_order_item] or [value mv_order_item] (disperation-mode), but
> nothing will be displayed.
> Where and how can I "intercept" the item's adding?

I suggest you override the Vend::Track::add_item routine and
use it. In interchange.cfg:

GlobalSub override_track <<EOS
sub {
	package Vend::Track;
	sub add_item {

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Any man who is under 30, and is not liberal, has not heart; and any man
who is over 30, and is not a conservative, has not brains.
 -- Winston Churchill

More information about the interchange-users mailing list