Hi,
I'm very new to ofbiz. I try to expand the ecommerce application with providing additional information about the shipment of the order. In the file orderstatus.bsh I added the following lines: shipment = delegator.findByAnd("Shipment", UtilMisc.toMap("primaryOrderId", orderId)); context.put("shipment", shipment); In the orderHeader.ftl file I would show the customers the estimatedReadyDate and estimatedShipDate. In the entitymodel_shipment.xml file are the two fields which I need. But if I try to call the fields in the orderheader.ftl file via ${shipment. estimatedShipDate.toString()} I get the error Expression shipment.estimatedShipDate is undefined. What I have made wrong? If I only call $(shipment.toString} the estimatedShipDate is in this GenericEntity. But how can I access a certain field of it? Thanks for helping. Best Regards Joachim -- Joachim Schreibmaier _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Hi Joachim,
try this: ${shipment.estimatedShipDate} or ${shipment.estimatedShipDate?if_exists} Jacopo Schreibmaier Joachim wrote: > Hi, > > I'm very new to ofbiz. I try to expand the ecommerce application with > providing additional information about the shipment of the order. > > In the file orderstatus.bsh I added the following lines: > shipment = delegator.findByAnd("Shipment", > UtilMisc.toMap("primaryOrderId", orderId)); > context.put("shipment", shipment); > > In the orderHeader.ftl file I would show the customers the > estimatedReadyDate and estimatedShipDate. > In the entitymodel_shipment.xml file are the two fields which I need. > > But if I try to call the fields in the orderheader.ftl file via ${shipment. > estimatedShipDate.toString()} I get the error Expression > shipment.estimatedShipDate is undefined. What I have made wrong? > > If I only call $(shipment.toString} the estimatedShipDate is in this > GenericEntity. But how can I access a certain field of it? > > Thanks for helping. > > Best Regards > > Joachim _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Generally those default toString() method dose not work very well, the minutes and seconds shown there do not make much sense in the real world. I will always use a local variable to display them and use the a util class to format them
Lei On 4/19/06, Jacopo Cappellato <[hidden email]> wrote: Hi Joachim, _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Schreibmaier Joachim
Hi,
> try this: > > ${shipment.estimatedShipDate} > > or > > ${shipment.estimatedShipDate?if_exists} Same effect as before: if I use the second method The field is empty. Without it: Expression shipment.estimatedShipDate is undefined on line 100, column 48 in orderheader.ftl. How can I gain access to the estimatedShipDate field? Should I define it in the orderstatus.bsh script? Thanks for helping. Best Regards Joachim -- Joachim Schreibmaier _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Schreibmaier Joachim
Hi,
Concerning my problem to expand the order infos I have no success. The shipment.estimatedShipDate expression is undefinied. How can I define it? When I express it in SQL-Syntax it would be: SELECT estimatedShipDate from shipment inner join order_header on shipment.primaryOrderId=order_header.orderId; But how can I implement it in a bash-script? Thanks for helping - it's really important for my application. Best Regards Joachim -- Joachim Schreibmaier _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Schreibmaier Joachim
I may not be following this thread correctly, but if
you're getting a freemarker error that shipment.estimatedShipDate is undefined, then in your ftl file where you have ${shipment.estimatedShipDate} you need to have ${shipment.estimatedShipDate?if_exists}. If it's a freemarker error it is because estimatedShipDate is coming back null. putting ?if_exists will tell freemarker that it's okay to be null and will display the rest of the page (as long as there aren't more errors) --- Schreibmaier Joachim <[hidden email]> wrote: > Hi, > > Concerning my problem to expand the order infos I > have no success. The > shipment.estimatedShipDate expression is undefinied. > How can I define it? > > When I express it in SQL-Syntax it would be: > SELECT estimatedShipDate from shipment inner join > order_header on > shipment.primaryOrderId=order_header.orderId; > > But how can I implement it in a bash-script? > > Thanks for helping - it's really important for my > application. > > Best Regards > > Joachim > -- > Joachim Schreibmaier > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Schreibmaier Joachim
Joachim,
could you send the ftl template and bsh file you have implemented so that we can have a look at them to see what's wrong? Jacopo Schreibmaier Joachim wrote: > Hi, > > Concerning my problem to expand the order infos I have no success. The > shipment.estimatedShipDate expression is undefinied. How can I define it? > > When I express it in SQL-Syntax it would be: > SELECT estimatedShipDate from shipment inner join order_header on > shipment.primaryOrderId=order_header.orderId; > > But how can I implement it in a bash-script? > > Thanks for helping - it's really important for my application. > > Best Regards > > Joachim _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by cjhowe
For many reasons, emails get returned.
I am witting a service to process these. 1) bad address, based on domain, since AOL bad address can be because of Case. 2) Authorization reguired, Like earthlink. 3) spam and Relay filters. 4) out of office notification. Also expand the order module to check domain rules for emails like for #1 and #2 if anyone has other input let know. _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by Schreibmaier Joachim
Hi,
> could you send the ftl template and bsh file you have implemented so > that we can have a look at them to see what's wrong? I found the error in the ftl-file. I don't know why, but the shipment GenericValue object consists of 2 elements. The shipment[0] element has null values and the shipment[1] object keeps the necessary values. Now everything works but the formatting of the timestamp. Is there an Utilclass which does this job? SimpleDateFormat or something similar? Best Regards Joachim -- Joachim Schreibmaier _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by BJ Freeman
BJ,
Other possible reasons for a returned email 5. "Mailbox Full" rejections 6. Delivery timeouts, delivery system "gives up" (good address, host SMTP service isn't responding) http://alanpae.tripod.com/sendmail/Terminology.htm "If the mail server for one of your recipients is offline, their message can sit in the queue while Sendmail deals with the rest of the e-mails waiting to be sent. After a specified timeout, Sendmail will try to send the message again. It will keep doing this until another timeout that you set tells it to give up and stop trying to send the message or the message is delivered." Brad > From: BJ Freeman <[hidden email]> > Subject: [OFBiz] Dev - processing Returned Email > > For many reasons, emails get returned. > I am witting a service to process these. > 1) bad address, based on domain, since AOL bad address can be because of > Case. > 2) Authorization reguired, Like earthlink. > 3) spam and Relay filters. > 4) out of office notification. > > Also expand the order module to check domain rules for emails like for > #1 and #2 > > if anyone has other input let know. _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
thanks for the input, Brad.
Brad sent the following on 4/20/06 1:02 PM: > BJ, > > Other possible reasons for a returned email > > 5. "Mailbox Full" rejections > > 6. Delivery timeouts, delivery system "gives up" (good address, host > SMTP service isn't responding) > http://alanpae.tripod.com/sendmail/Terminology.htm > "If the mail server for one of your recipients is offline, their message > can sit in the queue while Sendmail deals with the rest of the e-mails > waiting to be sent. After a specified timeout, Sendmail will try to send > the message again. It will keep doing this until another timeout that > you set tells it to give up and stop trying to send the message or the > message is delivered." > > Brad > >>From: BJ Freeman <[hidden email]> >>Subject: [OFBiz] Dev - processing Returned Email >> >>For many reasons, emails get returned. >>I am witting a service to process these. >>1) bad address, based on domain, since AOL bad address can be because of >>Case. >>2) Authorization reguired, Like earthlink. >>3) spam and Relay filters. >>4) out of office notification. >> >>Also expand the order module to check domain rules for emails like for >>#1 and #2 >> >>if anyone has other input let know. > > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
In reply to this post by BJ Freeman
just bumping this up from the old mailing list
make a return_mail_meca.xml for the patterns and implement the java code that deals with assigning these. with the email screen I will be implementing these can be selected. BJ Freeman sent the following on 4/20/2006 8:33 AM: > For many reasons, emails get returned. > I am witting a service to process these. > 1) bad address, based on domain, since AOL bad address can be because of > Case. > 2) Authorization reguired, Like earthlink. > 3) spam and Relay filters. > 4) out of office notification. > > Also expand the order module to check domain rules for emails like for > #1 and #2 > > if anyone has other input let know. > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > |
Free forum by Nabble | Edit this page |