Akopia Akopia Services

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

Re: [mv] hard to generate [order tag]



Quoting cfm@maine.com (cfm@maine.com):
> minivend 4.03 and comments go only for that:
> 
> I spent way too long generating an [order tag] with a result like this:
> 
> <A HREF="http://Products.Maine.Com/Catalog/products.cgi/basket?mv_session_id=VJquWsVM&mv_action=refresh&mv_order_item=maine_dictionary&mv_cartname=storytellers";>Order</A>
> 
> There are more than a couple of ways shown in the docs.  That was part
> of my frustration - too many ways.  TIMTOWTDI.
> 
> Beyond that I'd have preferred to use named params personally.  :-)
> So mostly I'd end up with something like this, with mv_order_quantity
> creeping in, probably because of positional placement?
> 
> genii.znet.maine.com VJquWsVM:maine.com - [31/January/2001:20:59:04 -0500] PAGE: flypage products Vend::Util: UTIL:find_special_key key (order), dir(../pages/) special{key} (basket)
> > mv_order_quantity=/basket
> >  page:basket
> 
> 
> Ultimately I ended up patching Interpolate - I really did not want
> to do that.
> 
>         push(@parms, "mv_order_mv_ib=$opt->{base}")
>                 if($opt->{base});
> # CFM
>     ::logGlobal("Interpolate has merchant ($Vend::Session->{values}->{merchant})");
>             push(@parms,"mv_cartname=$Vend::Session->{values}{merchant}")
>       if ($Vend::Session->{values}->{merchant})
> # /CFM
> 

What is wrong with the supplied:

        Order [order 
                code=the_sku
                form="
		    mv_cartname=[value merchant]
                "]the_sku</A>
 
I am pretty sure it is in 4.03, but can't be sure.

The one and true patch, by the way, which I would have put
in a flash, is:

	push (@parms, "mv_cartname=$opt->{cart}")
		if $opt->{cart};

Then you can just use a [order cart="[value merchant]" code="the_sku"]
You can even put this in catalog.cfg or interchange.cfg:

UserTag order attrAlias  merchant cart

Then it would be [order merchant="[value merchant]" code="the_sku"]

If despite this available mechanism you want to override the order tag
the way to do it is with a global UserTag, as that way your system won't
break when/if you update. If you want to override the entire routine
(in case it is used elsewhere) you can do:

GlobalSub <<EOR
sub total_junk {
    package Vend::Interpolate;
    sub tag_order {
	    your_patched_code();
    }
}
EOR

-- 
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman

_______________________________________________
Minivend-users mailing list
Minivend-users@minivend.com
http://www.minivend.com/mailman/listinfo/minivend-users


Search for: Match: Format: Sort by: