[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] formatting tag time, total-cost
****** message to minivend-users from "Bill Randle" <billr@exgate.tek.com> ******
Thomas,
If AllowGlobal doesn;t work in mv3, the best workaround is probably
to create a new usertag. Put this into a file named "date_fmt" in
the 'usertags' directory:
UserTag date-fmt
UserTag date-fmt Interpolate
UserTag date-fmt Routine <<EOR
sub {
return POSIX::strftime('%d.%m.%Y %H:%M', localtime());
EOR
Add date-fmt to the list of UserTags in minivend.cfg and restart minivend.
Use like this:
Current date is: [date-fmt]
As for converting 200.00 to 20000, a simple [calc] should do it:
[set name=total interpolate=1][total-cost noformat=1][/set]
[calc interpolate=1]$xtotal = $Safe{'scratch'}->{'total'};
$xtotal =~ s/\.//; return $xtotal;[/calc]
This just replaces the '.' with nothing.
Put the [calc][/calc] inside another [set] if you want to save the
xtotal number to another scratch var.
-Bill
On Apr 7, 12:14am, Thomas May wrote:
} Subject: Re: [mv] formatting tag time, total-cost
} ****** message to minivend-users from "Thomas May"
<thomas.may@x9media.com> ******
}
} Hi Bill,
}
} thanx for the quick answer, iam using minivend 3.14-3, so i cant find a
} directive for AllowGlobal, by putting the snibbets into the page nothing
} happens.
}
} the toal-cost tip was great, but i need a special format for it because the
} price will transmitted to a online payment server, so they wanna have a
} format for 200,00 DM like 20000
}
} have you an idea ?
}
} thomas
}
} ----- Original Message -----
} From: Bill Randle <billr@exgate.tek.com>
} To: <minivend-users@minivend.com>
} Sent: Thursday, April 06, 2000 11:14 PM
} Subject: Re: [mv] formatting tag time, total-cost
}
}
} > ****** message to minivend-users from "Bill Randle"
} <billr@exgate.tek.com> ******
} >
} > On Apr 6, 9:48pm, Thomas May wrote:
} > } Subject: [mv] formatting tag time, total-cost
} > } ****** message to minivend-users from "Thomas May"
} > <thomas.may@x9media.com> ******
} > }
} > } Hi there,
} > }
} > } i wanna format the output of the two standard variables, tag time and
} > } total-cost.
} > }
} > } tag time should be a date like 5.3.2000 22:40
} >
} > Look at the convert-date usertag (in <mvroot>/usertag with MV4)
} > for an example of using time() and strftime(). You could create
} > your own custom usertag to display the date/time in your format
} > or use a little inline perl to do it. (The inline perl only
} > works if you have AllowGlobal set true in your catalog.cfg.)
} >
} > E.g.:
} > The current date is: [perl global=1]return POSIX::strftime('%d.%m.%Y
} > %H:%M', localtime());[/perl]
} >
} >
} > } and
} > } total-cost: instead of 200,00 DM it should be 20000
} >
} > How about [total-cost noformat=1]?
} >
} > } can someone help me ?
} > }
} > } thomas
} >
} >
} > -Bill
} > -
} > 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
}
} -
} 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
}-- End of excerpt from Thomas May
-
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