Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
Great - that code works perfect! Many thanks everyone! Sam On 20 Jun 2011, at 18:37, prasanth r wrote: > sam, > try this. > > <#assign prodDesc = > productContentWrapper.get("LONG_DESCRIPTION")?if_exists> > > <#if prodDesc?if_exists?trim != ""> > ${productC

Re: Help with a FTL if

2011-06-20 Thread prasanth r
sam, try this. <#assign prodDesc = productContentWrapper.get("LONG_DESCRIPTION")?if_exists> <#if prodDesc?if_exists?trim != ""> ${productContentWrapper.get("LONG_DESCRIPTION")} <#else> ${productContentWrapper.get("DESCRIPTION")?if_exis

Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
On product A - with a description and no long description: > > On product B - with a long_description and no description > > There is content in there! Thanks Sam On 20 Jun 2011, at 18:18, prasanth r wrote: > Sam, > Print and see, > > ${productContentWrapper.get("

Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
Hi Hardik and Jacques - tried both that and also does not work. So far the only solution would be to hope that one product does not have both a description and a long_description and use: ${productContentWrapper.get("DESCRIPTION")} ${productContentWrapper.get("LONG_DESCRIPTION")} Very fustrati

Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
On product A - with a description and no long description: > One Size. Includes: Headpiece; Body; Legs Best Fit :Height 6ft ,44in chest, Inside leg 33in > On product B - with a long_description and no description > > * Designer wallet from Von Zipper* 100% PVC* Brand new sea

Re: Help with a FTL if

2011-06-20 Thread Jacques Le Roux
Are you sure to have an instance of productContentWrapper? Else you should have something like below before calling what I suggested <#assign productContentWrapper = productData.productContentWrapper/> see compareproducts.ftl[109] for instance To prasath: ! is the same as ?default(). There are

Re: Help with a FTL if

2011-06-20 Thread prasanth r
Sam, Print and see, > ${productContentWrapper.get("DESCRIPTION")} > ${productContentWrapper.get("LONG_DESCRIPTION")} post the output too. thanks prasath. r On Mon, Jun 20, 2011 at 3:42 PM, Sam Hamilton wrote: > Hi, > > All the examples including yours seem to work like this > if the co

Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
Hi, All the examples including yours seem to work like this if the code snippet checked for the description first then If product A has a description then it shows a description If product B has a long_description then it shows nothing. If you then swap the code so that it checks for long_desc

RE: Help with a FTL if

2011-06-20 Thread Hardik Handa
Sam, Wat does it print when u use the code lines I provided ??? It would be of help to me to figure out the actual problem -Original Message- From: Sam Hamilton [mailto:s...@sh81.com] Sent: Monday, June 20, 2011 3:31 PM To: user@ofbiz.apache.org Subject: Re: Help with a FTL if Hi Hardik

Re: Help with a FTL if

2011-06-20 Thread prasanth r
sam, print whole map like this ${productContentWrapper} and post the result then it will be helpful to all thanks prasath On Mon, Jun 20, 2011 at 3:33 PM, Hardik Handa wrote: > Sam, > > Wat does it print when u use the code lines I provided ??? > It would be of help to me to figure out the a

Re: Help with a FTL if

2011-06-20 Thread prasanth r
Hardik & sam, for null check we can use if_exists or has_content also right. thanks prasath. r On Mon, Jun 20, 2011 at 3:28 PM, Hardik Handa wrote: > Prasath, > It's Hardik not hardick my friend lol > > > Yes u are pretty right about that, all I wanted to see if he even gets an > error refer

RE: Help with a FTL if

2011-06-20 Thread Hardik Handa
Prasath, It's Hardik not hardick my friend lol Yes u are pretty right about that, all I wanted to see if he even gets an error referring to a null value. If he gets that we could then get an extra check on null value too. -Original Message- From: prasanth r [mailto:prasanth.sunr...@gm

Re: Help with a FTL if

2011-06-20 Thread prasanth r
hardick, exists will only check for existance of the variable. is it? thanks prasath. r On Mon, Jun 20, 2011 at 3:21 PM, Hardik Handa wrote: > <#if productContentWrapper.get("DESCRIPTION")?exists> > > ${productContentWrapper.get("DESCRIPTION")} > > <#elseif productContentWrapper.get("LONG_DESC

RE: Help with a FTL if

2011-06-20 Thread Hardik Handa
<#if productContentWrapper.get("DESCRIPTION")?exists> ${productContentWrapper.get("DESCRIPTION")} <#elseif productContentWrapper.get("LONG_DESCRIPTION")?exists > ${productContentWrapper.get("LONG_DESCRIPTION")} This should do the trick Regards, Hardik Handa -Original Message- From

Re: Help with a FTL if

2011-06-20 Thread prasanth r
what does it mean. On Mon, Jun 20, 2011 at 3:20 PM, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: > ${productContentWrapper.get("**LONG_DESCRIPTION")!** > productContentWrapper.get("**DESCRIPTION")!""} > > Jacques > > > Jacques > > Sam Hamilton wrote: > >> Hi, >> >> Can someone help me

Re: Help with a FTL if

2011-06-20 Thread Jacques Le Roux
${productContentWrapper.get("LONG_DESCRIPTION")!productContentWrapper.get("DESCRIPTION")!""} Jacques Jacques Sam Hamilton wrote: Hi, Can someone help me with this if statement - i can only get it to return a value for long_description if one exists where as I want it to return a description

Re: Help with a FTL if

2011-06-20 Thread prasanth r
sam, check whether the values are coming correctly by printing ${productContentWrapper.get("DESCRIPTION")?if_exists} than use with ?exists ?hascontent and see what it prints. thanks prasath. r On Mon, Jun 20, 2011 at 3:10 PM, Sam Hamilton wrote: > Thanks for the help but that didn't work eith

Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
Thanks for the help but that didn't work either!? If the long_description is called first then where there is a long description on a product it shows the long description but does not show the description on products where there is no long description and only a description and most annoyingl

Re: Help with a FTL if

2011-06-20 Thread prasanth r
sam, I hope we cannot use has_content with not existing variables. So, I suggest to use 'exists' before has_content #if productContentWrapper.get("DESCRIPTION")?exists?has_content> ${productContentWrapper.get("DESCRIPTION")} <#else> ${productContentWrapper.get("LONG_DESCRIPTI

Re: Help with a FTL if

2011-06-20 Thread Sam Hamilton
Hi Prasath Thanks for pointing that out so the revised code should look something like this so that if there is no content in description is uses long_description? <#if productContentWrapper.get("DESCRIPTION")?has_content> ${productContentWrapper.get("DESCRIPTION")}

Re: Help with a FTL if

2011-06-20 Thread prasanth r
Hi sam, 'exists' will check for existence of the variable. 'if_exists' will check for 'null' value. if you want to check the value then use has_content. I hope it will help you. prasath 9442369696 On Mon, Jun 20, 2011 at 2:20 PM, Sam Hamilton wrote: > Hi, > > Can someone help me with this

Help with a FTL if

2011-06-20 Thread Sam Hamilton
Hi, Can someone help me with this if statement - i can only get it to return a value for long_description if one exists where as I want it to return a description if no long_description is found? <#assign prodDesc = productContentWrapper.get("LONG_DESCRIPTION")?if_exists>

Re: shipment costs

2011-06-20 Thread Info Olagos
No, not needed. I looked into the java code and i realize that weight conditions are not connected with price charge conditions. I will interconnect the both so that weight conditions only are true if also the price charge condition is first of all true, and that can be very easily programmed , i