Switch branches/tags
Commits on Jun 7, 2009
  1. Remove all CVS keyword expansions and start versions at 3.0

    jonjensen committed Jun 6, 2009
    Git does not expand keywords as CVS did, so we cannot use automatically
    filled-in version numbers in various places. And leaving the old expansions
    around will lead to them becoming stale and misleading over time.
Commits on May 28, 2009
  1. Fix omission of media type in <link> output

    jonjensen committed May 28, 2009
    Patch by Thomas J.M. Burton <>. Thanks!
  2. Send correct level 2 card data with AuthorizeNet module

    Mark Lipscombe authored and jonjensen committed May 27, 2009
    This improves the discount rate for a lot of card types.
Commits on May 27, 2009
Commits on May 24, 2009
  1. Strip all remaining HTML (not just b/i/u tags) to output plain text

    jonjensen committed May 23, 2009
    Make some attempt to ignore what can't be real HTML, to be tolerant of
    invalid HTML that contains unencoded < and > characters, so we don't
    remove huge sections that happen to start with < and end with > but aren't
    at all HTML taglike.
Commits on May 23, 2009
  1. s/CVS/CSV/ to fix typo.

    jonjensen committed May 23, 2009

    jonjensen committed May 23, 2009
    Since we're using Git now, show that in the file name. Not using a
    dot-suffix to avoid confusing people with .git (or anything else).
Commits on May 20, 2009
  1. New user_merge specialsub is run from the [user-merge] usertag. Argum…

    pajamian committed May 20, 2009
    passed to the sub are: ($from_user, $from_urec, $to_user, $to_urec, $udb, $tdb)
    with the following values:
    $from_user - The username of the user being merged from.
    $from_urec - Hashref of columns in the userdb table for the user being merged
    $to_user   - The username of the user being merged to.
    $to_urec   - Hashref of columns in the userdb table for the user being merged
                 to.  Any changes made to this hashref will be recorded back into
                 the userdb for this user.
    $udb       - $db object for the userdb table.
    $tdb       - $db object for the transactions table.
    The return value should be false to indicate that normal processing of the merge
    should continue as normal for this from user (continue on to merge carts and
    transactions) or true to indicate that no further processing should be done for
    this user (do not merge the carts or transactions).  A false return value will
    also cause any changes to $to_urec to be recorded into the userdb for the to
    user at the conclusion of the merge.  Note that if there are multiple from users
    then this specialsub will be run for each of the from users.
    SpecialSub user_merge user_merge_sub
    Sub user_merge_sub <<EOS
    sub {
    	my ($from_user, $from_urec, $to_user, $to_urec, $udb, $tdb) = @_;
    	# Copy first and last name over from from user:
    	$to_urec->{fname} = $from_urec->{fname};
    	$to_urec->{lname} = $from_urec->{lname};
    	# False return value tells the [user-merge] tag to save the new $to_urec
    	# structure off as well as to continue with normal processing of the
    	# merge.
  2. MaxQuantity fixes:

    pajamian committed May 20, 2009
    * A null or non-numerical entry in the table(s) for the maxquantity field should
      result in no maximum quantity enforcement for that product.
    * Remove redundant code for fetching the quantity from the table(s).
    * Fix instance where two DB hits are used to fetch one value.
    * Get rid of goto.
    * Basically a rewrite of the correspondign block of code.
Commits on May 7, 2009
Commits on May 1, 2009
  1. * table_editor/flex_select: Add ability to link "edit record" to custom

    perusionmike committed May 1, 2009
      page with custom parameter. Also can now change "edit record to
      something else like "view user".
  2. * New adjust_time() function allows time adjustment based on secs, mi…

    pajamian committed May 1, 2009
    …ns, hours,
      days, weeks, months and years.  Also can string multiple adjustments together
      and compensate for daylight savings time changes over the adjustment period.
      This sub (in accepts up to three arguments.  The first (required)
      argument is the adjustment to be made and is a signed number followed by one
      of seconds, minutes, hours, days, weeks, months or years (these can be
      abbreviated).  The second optional argument is a unixtime to be adjusted and
      defaults to the current time.  If the third argument is true then the
      resulting time will be compensated for any daylight savings time differences.
      The sub uses POSIX::mktime() to do the conversions and so does not come with a
      new module requirement for Interchange.
    * _set_acl() in now uses adjust_time() instead of time_to_seconds().
    * [pay-cert] tag now uses the new adjust_time() function instead of the older
    * [component], [convert-date] and [css] now use the new adjust_time() function
      instead of the older time_to_seconds().
    * [convert-date] now has new compensate_dst argument that when set to 1 will
       compensate the adjusted time for daylight savings time changes (it basically
       passes 1 as the third argument to adjust_time()).
    * fixed bug in [convert-date] that skewed the time by one hour if the starting
      date was during daylight savings time and an adjustment was made.
    * [time] now uses adjust_time() instead of the older time_to_seconds().  There
      is also a new compensate_dst attribute that when set to 1 will compensate the
      adjusted time for daylight savings time changes (it basically passes 1 as the
      third argument to adjust_time()).
    Following are examples that help to illustrate all of the above new features.
    Note that many of the examples may require adjustment depending on your local
    time zone and locale settings:
    Current time: [time]%c[/time]
    +5 hours: [time adjust="+5 hours"]%c[/time]
    +5 years: [time adjust="+5 years"]%c[/time]
    -8.3 months: [time adjust="-8.3 months"]%c[/time]
    +2.6 days: [time adjust="+2.6 days"]%c[/time]
    +7.7 months: [time adjust="+7.7 months"]%c[/time]
    +7 months: [time adjust="+7 months"]%c[/time]
    +7 months (compensate_dst): [time adjust="+7 months" compensate_dst=1]%c[/time]
    +5: [time adjust="+5"]%c[/time]
    -500 hours=1: [time adjust="-500" hours=1]%c[/time]
    hours=+500: [time hours=+500]%c[/time]
    +500: [time adjust="+500"]%c[/time]
    +5 years, 6 months, 3 days, -4 hours, 7 minutes (compensate_dst): [time adjust="+5 years, 6 months, 3 days, -4 hours, 7 minutes" compensate_dst=1]%c[/time]
    duration filter:
    [cgi name=start_date set=200502120800 hide=1]
    [cgi name=offset set="12 hours 10 mins" hide=1]
    20050212201000: [filter duration.start_date.offset][/filter]
    20050212200500: [filter duration.-dummy.12.hours.5.mins]200502120800[/filter]
    convert-date tag:
    200807151600: [convert-date adjust="+6 months" format="%c"]200807151600[/convert-date]
    200807151600 (compensate_dst): [convert-date adjust="+6 months" format="%c" compensate_dst=1]200807151600[/convert-date]
    Current time: Fri May  1 05:40:47 2009
    +5 hours: Fri May  1 10:40:47 2009
    +5 years: Thu May  1 05:40:47 2014
    -8.3 months: Fri Aug 22 22:28:47 2008
    +2.6 days: Sun May  3 20:04:47 2009
    +7.7 months: Tue Dec 22 21:28:46 2009
    +7 months: Tue Dec  1 04:40:47 2009
    +7 months (compensate_dst): Tue Dec  1 05:40:47 2009
    +5: Fri May  1 10:40:47 2009
    -500 hours=1: Fri Apr 10 09:40:47 2009
    hours=+500: Fri May 22 01:40:47 2009
    +500: Fri May  1 10:40:47 2009
    +5 years, 6 months, 3 days, -4 hours, 7 minutes (compensate_dst): Tue Nov  4 01:33:47 2014
    duration filter:
    20050212201000: 20050212201000
    20050212200500: 20050212200500
    convert-date tag:
    200807151600 +6 months: Thu 15 Jan 2009 03:00:00 PM PST
    (compensate_dst): Thu 15 Jan 2009 04:00:00 PM PST
Commits on Apr 30, 2009
Commits on Apr 29, 2009
  1. * Remove namespace problems introduced with Vend::File calling Encode…

    perusionmike committed Apr 29, 2009
    …::PERLQQ when
      module is not "used".
Commits on Apr 28, 2009
Commits on Apr 27, 2009
  1. update copyright date

    racke committed Apr 27, 2009
Commits on Apr 16, 2009
  1. * Add ability to configure the number of levels and hash length for

    perusionmike committed Apr 16, 2009
      the directory structure of file-based sessions. Instead of a fixed
      value of 2 and 1 for levels and length, respectively, make two
      configuration parameters:
      Default is 1 and 2, respectively, matching the current values.
      This solves the problem of session IDs passed from CGI::Session or other
      modules that use a quasi-sequential session ID. You end up placing all
      sessions in the S/2 directory for a long time, followed by the S/3 directory,
      etc. A setting of:
      	SessionHashLength   4
      	SessionHashLevels   1
      would break sessions up into separate directories instead of putting all
      sessions in a huge directory.
  2. * Add ability to recalculate AutoModifier values based on a sku change.

    perusionmike committed Apr 16, 2009
      Specifying a ! (exclamation point) before the AutoModifier callout
      indicates the attribute should be reloaded when the cart is "tossed".
      To give an example from the standard demo, when you initially order a
      Matrix option item, it pulls AutoModifier attributes based on anything
      from a base sku to a certain variant. When you next change the options
      on the item, the code (if not the base sku) changes. If the attribute
      is different for that product code, then the attribute may no longer
      This change moves the AutoModifier load to a separate routine
      called only if AutoModifier is used, and the recalculation routine
      is only done if recalculating attributes are specified.
      		!download  pricing:price_group
      The price_group attribute will not be reloaded on cart toss, but the
      download attribute will (and will come from whatever the mv_ib of
      the item is).
      TODO: Allow specification of attributes that should always be loaded
      based on mv_sku if present.
Commits on Apr 15, 2009
  1. Make filter output valid code.

    Ton Verhagen
    Ton Verhagen committed Apr 15, 2009
    Using double <br>'s instead of opening tag <p>.
Commits on Apr 8, 2009
  1. Add company name to shipping and billing addresses and filter output …

    jonjensen committed Apr 8, 2009
    …with evalue.
    Thanks to Steve Graham <>.
  2. Avoid possible problem with read-only variable table by using @@MV_PA…

    jonjensen committed Apr 8, 2009
    …GE@@ instead of @_MV_PAGE_@.
    This is the only place in Interchange we use @_MV_PAGE_@, which isn't
    necessary because MV_PAGE is always global.
    More details at this blog comment I wrote:
Commits on Apr 7, 2009
  1. * Prevent an incomprehensible error when following an order link that…

    perusionmike committed Apr 7, 2009
    … was
      created on an mv_tmp_session page or other non-connecting session.
Commits on Apr 6, 2009
  1. New directive SourceCookie - support for persistent affiliate tracking.

    msjohns1 committed Apr 6, 2009
    Initial framework developed by Peter Ajamian <>.
    Setting SourceCookie defines the relevant attributes of a cookie to be
    maintained in conjunction with the usual session-only parameter
    $Session->{source}. Its usage eliminates the duration of the user's session as
    the limiting factor for applying credit to a referal.
    SourceCookie and SourcePriority would be expected to typically work in tandem,
    and thus the same cookie defined in both contexts. However, there is no such
    requirement to do so. Defining SourceCookie by itself merely makes the cookie
    available any time the core source routines set or manipulate
    $Session->{source}. That cookie may, or may not, be leveraged as an element in
    SourcePriority, which itself may look to a cookie not maintained by
    SourceCookie supports the following attributes:
    * name (required)
    * expire (any format supported for [set-cookie])
    * domain
    * path
    * secure
    * autoreset
    autoreset is a boolean that, when true, will cause each request from the client
    to reset the cookie in the response, effectively refreshing the expiration time
    relative to the current time. Uses, for example, might include a desire to
    ensure that the source cookie last "forever" (autoreset + sufficiently long
    expire period) or for more obscure uses such as "Affiliate should last [value
    of expire] from the last request".
    Attributes may be positional in order of (name expire domain path secure), but
    it is recommended that they be expressed as key=value pairs for clarity.
    Example using both SourcePriority and SourceCookie together in catalog.cfg:
    SourcePriority mv_pc mv_source cookie-MV_SOURCE
    SourceCookie name=MV_SOURCE expire="180 days"