[ic] $tag->add_item

Peter peter at pajamian.dhs.org
Wed Nov 14 20:42:34 EST 2007

On 11/14/2007 05:01 PM, Adam Lambert wrote:
>     So, as the Christmas season rolls around, my boss asks me to
> uncomment the usual Christmas code, and plug in a given list of SKU's
> for this year's specials.   All well and good, except for the
> following.  The code I inherited from my predecessor is doing the following:
> if($Scratch->(xmas_special)) {
>     // set some variables - this all works, right up until:
>     $Tag->add_item( { code => $Scratch->(xmas_sku), qty => 1 } ) ;
> }
>     There's more to it than that, but that's enough to explain my
> problem.   I get a whole bunch of the following in my debug logs, and
> the item(s) in question never get added to the cart:
>    "process Tag 'add_item' not defined."

That means that you're missing a userag, add_item is not a usertag that
comes with interchange so it is probably a customized usertag that your
predecessor wrote.

>     All I can say at this point is, it worked last year, and I don't
> know enough about Interchange to have clue one where to start figuring
> out why this no longer works.   I'm pretty sure they upgraded
> Interchange to a newer version after this code bit was removed from
> production (end of last Christmas season),

That explains it, they probably didn't copy over the add_item usertag
during/after the upgrade.  Find the usertag in your old (pre-upgrade)
code and copy it over.  I can help you with this if you want to pop into
irc (irc.icdevgroup.org #interchange), it shouldn't be too difficult as
long as you still have access to the old codebase (backup or something).


More information about the interchange-users mailing list