You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Shereen <sh...@hotmail.com> on 2010/10/27 14:10:11 UTC
Getting an OrderPaymentPreference in orderinfo.ftl
Hi all
I've done some customization in the order flow now I want to make a check
that order must be paid before being ready to be packed
I'm working on the orderinfo.ftl
my question is how using ftl code can I get the related payment status in
the entity OrderPaymentPreference for the orderheader that I have?
I've done some trials but all failed
I'll be grateful for any suggestion
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Getting-an-OrderPaymentPreference-in-orderinfo-ftl-tp3015326p3015326.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Getting an OrderPaymentPreference in orderinfo.ftl
Posted by Jacques Le Roux <ja...@les7arts.com>.
In a 1st attempt you can see Groovy as a Java interpreter. Then, looking at existing examples and support from Groovy site, enhance
you code by using Groovy power. Look for the Elvis operator for instance. Or how closures are used in Groovy, notably for
each-loops.
Also how Groovy handle tests on NPE (without using ==null). You will find plenty of examples in OOTB OFBiz code.
HTH
Jacques
From: "Shereen" <sh...@hotmail.com>
> Thanks Scott a lot for your advce actually Freeman advised me to use groovy
> as well.
> My problem is that I don't know groovy I've never wrote any code in groovy
> but I'll check the files already implemented and try to do it.
>
> I've asked more specific question n topic Check on party fields from ftl
> files I've mentioned that I want to make a groovy file and that groovy file
> checks on certain field in the party entity.
>
> this is an extra field I've put in the party entity called requirePrepayment
> and it's a checkbox I just want get the customer related to the order then
> check if that field is checked or not.
>
> If you can help me with any code or suggestions that would be great
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Getting-an-OrderPaymentPreference-in-orderinfo-ftl-tp3015326p3016691.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Re: Getting an OrderPaymentPreference in orderinfo.ftl
Posted by Shereen <sh...@hotmail.com>.
Thanks Scott a lot for your advce actually Freeman advised me to use groovy
as well.
My problem is that I don't know groovy I've never wrote any code in groovy
but I'll check the files already implemented and try to do it.
I've asked more specific question n topic Check on party fields from ftl
files I've mentioned that I want to make a groovy file and that groovy file
checks on certain field in the party entity.
this is an extra field I've put in the party entity called requirePrepayment
and it's a checkbox I just want get the customer related to the order then
check if that field is checked or not.
If you can help me with any code or suggestions that would be great
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Getting-an-OrderPaymentPreference-in-orderinfo-ftl-tp3015326p3016691.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Getting an OrderPaymentPreference in orderinfo.ftl
Posted by Scott Gray <sc...@hotwaxmedia.com>.
In general you should avoid putting too much logic in your ftl files and instead prepare the data in groovy scripts at the screen level. Freemarker doesn't have a huge amount of scripting support and you'll have a much better time using groovy scripts.
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 28/10/2010, at 2:42 AM, Shereen wrote:
>
> I now this feature in ofbiz I've seen the tables and the records I just want
> be able to do any checking I like in my ftl files for more cutomization
> I'm also facing another proble of getting entities and check on their fields
> I've mentioned that in separate topic
> Thanks a lot for your reply
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Getting-an-OrderPaymentPreference-in-orderinfo-ftl-tp3015326p3015480.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Getting an OrderPaymentPreference in orderinfo.ftl
Posted by Shereen <sh...@hotmail.com>.
I now this feature in ofbiz I've seen the tables and the records I just want
be able to do any checking I like in my ftl files for more cutomization
I'm also facing another proble of getting entities and check on their fields
I've mentioned that in separate topic
Thanks a lot for your reply
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Getting-an-OrderPaymentPreference-in-orderinfo-ftl-tp3015326p3015480.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Getting an OrderPaymentPreference in orderinfo.ftl
Posted by BJ Freeman <bj...@free-man.net>.
this feature is already in Ofbiz.
if you are following the order flow you should not have to do anything.
=========================
BJ Freeman
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist
Chat Y! messenger: bjfr33man
Shereen sent the following on 10/27/2010 5:10 AM:
>
> Hi all
>
> I've done some customization in the order flow now I want to make a check
> that order must be paid before being ready to be packed
> I'm working on the orderinfo.ftl
> my question is how using ftl code can I get the related payment status in
> the entity OrderPaymentPreference for the orderheader that I have?
> I've done some trials but all failed
> I'll be grateful for any suggestion