Microsoft Publisher quick integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Microsoft Publisher quick integration

cjhowe
We have some people at the office that use Microsoft
Publisher to quickly put together some webpage ideas.
I'm trying to incorporate into OFBiz without having to
retemplate what they've done.  Everything works fine
except for displaying images.  The convention that
Publisher uses is to store all embeded images in
/index_files (ie image1.gif = /index_files/image1.gif)

When it outputs through OFBiz it naturaly displays
this link as being
domainname/webappname/control/index_files/image1.gif

So, I created a request uri named "index_files"

Because of the final foreslash, the RequestHandler
treats  image1.gif as non existing page request.  

Any ideas?  I've also considered running ?replace in
freemarker but my syntax was wrong there...

${${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")}?replace("string1", "string2")}
Reply | Threaded
Open this post in threaded view
|

Re: Microsoft Publisher quick integration

Fabian Gorsler
Hi Chris,

Chris Howe wrote:
> ${${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")}?replace("string1", "string2")}

I think this should work:

${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")?replace("string1",
"string2"}

Once you have quoted with ${} you don't need any more quoting.

HTH

Best regards,
Fabian.
Reply | Threaded
Open this post in threaded view
|

Re: Microsoft Publisher quick integration

cjhowe
I gave the wrong path...

example should have been
${screen.render("component://xyz/widget/MyScreen#abc")}

${screen.render("component://xyz/widget/MyScreen#abc")?replace("string1",
"string2"} will replace string1 with string2 inside
the string "component://xyz/widget/MyScreen#abc"

so if
string1 = xyz
string2 =def

result =

${screen.render("component://def/widget/MyScreen#abc")}

I'm wanting it to replace string1 with string2 inside
of the screen output...



--- Fabian Gorsler <[hidden email]> wrote:

> Hi Chris,
>
> Chris Howe wrote:
> >
>
${${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")}?replace("string1",
> "string2")}
>
> I think this should work:
>
>
${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")?replace("string1",

>
> "string2"}
>
> Once you have quoted with ${} you don't need any
> more quoting.
>
> HTH
>
> Best regards,
> Fabian.
>

Reply | Threaded
Open this post in threaded view
|

Re: Microsoft Publisher quick integration

cjhowe
Fabian,
Your advice was correct on the placement of the
replace built-in.  The problem was that
screens.render("component://xyz/widget/MyScreen#abc)
returns "" instead of the output.

I got it working with the following bsh script and
then the variable
${writer?replace("string1","string2"}

[code]
import org.ofbiz.widget.screen.ModelScreen;
import org.ofbiz.widget.screen.ScreenFactory;
import org.ofbiz.widget.html.HtmlFormRenderer;
import org.ofbiz.widget.html.HtmlScreenRenderer;

context.put("pubStylesheet", pubStylesheet);

ModelScreen modelScreen =
ScreenFactory.getScreenFromLocation("component://nhmEcom/widget/OrderScreens.xml",
"ind");

writer = new StringWriter();

htmlScreenRenderer = new HtmlScreenRenderer();

modelScreen.renderScreenString(writer, context,
htmlScreenRenderer);

context.put("writer", writer);
[/code]

As soon as I figure out how to not have to mirror a
definition for each page in the controller.xml file
I'll put a write up on this on the docs site.  

Quick question for the community though.  The obvious
benefit of this is to mimick the old school upload via
FTP for those needing WYSIWYG and not wanting to
venture to far out but still benefit from OFBiz.  Does
changing the upload protocol from FTP to SFTP make
this kind of implementation secure enough to actually
use?  It's basically giving carte blanche access to
anyone who can upload to the designated folder.  Aside
from strict user management on the SFTP server what
else should I be looking out for?

--- Chris Howe <[hidden email]> wrote:

> I gave the wrong path...
>
> example should have been
>
${screen.render("component://xyz/widget/MyScreen#abc")}
>
>
${screen.render("component://xyz/widget/MyScreen#abc")?replace("string1",

> "string2"} will replace string1 with string2 inside
> the string "component://xyz/widget/MyScreen#abc"
>
> so if
> string1 = xyz
> string2 =def
>
> result =
>
>
${screen.render("component://def/widget/MyScreen#abc")}

>
> I'm wanting it to replace string1 with string2
> inside
> of the screen output...
>
>
>
> --- Fabian Gorsler <[hidden email]> wrote:
>
> > Hi Chris,
> >
> > Chris Howe wrote:
> > >
> >
>
${${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")}?replace("string1",
> > "string2")}
> >
> > I think this should work:
> >
> >
>
${screens.render("component://xyz/webapp/xyz/publisher.abc.ftl")?replace("string1",

> >
> > "string2"}
> >
> > Once you have quoted with ${} you don't need any
> > more quoting.
> >
> > HTH
> >
> > Best regards,
> > Fabian.
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Microsoft Publisher quick integration

Fabian Gorsler
Hi Chris,

> Fabian,
> Your advice was correct on the placement of the
> replace built-in.  The problem was that
> screens.render("component://xyz/widget/MyScreen#abc)
> returns "" instead of the output.

I'm sorry, but I can't help you with that. Up to now I haven't redered a
screen "manually". I just saw the syntactical problem.

In the moment I'm thinking about something like
<@ofbizUrl>/path/to/it</@ofbizUrl> for your problem, but I don't think
that you want s.th. like that.

Best regards,
Fabian.

Reply | Threaded
Open this post in threaded view
|

Problem with Promotions

Thomas Dorenlot
Hello everyone,

I search to understand about the settings of promotions. In order to do
that, I realize some promotions, and after some problems, I manage to
obtain the correct prices in the cart. But I want to know if it is
possible to calculate the price from a promotion and out of the cart.

Thank you

Thomas

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Promotions

oceatoon
we use a variable that cumulates all applied promotions when the page is
rendered
so the total promotion amount is dynamically calculated.


On 9/7/06, Thomas Dorenlot <[hidden email]> wrote:

>
> Hello everyone,
>
> I search to understand about the settings of promotions. In order to do
> that, I realize some promotions, and after some problems, I manage to
> obtain the correct prices in the cart. But I want to know if it is
> possible to calculate the price from a promotion and out of the cart.
>
> Thank you
>
> Thomas
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Promotions

Si Chen-2
Tibor,

Did you ever get free shipping promotions to work?

Si

On Sep 7, 2006, at 8:05 AM, tibor katelbach wrote:

> we use a variable that cumulates all applied promotions when the  
> page is
> rendered
> so the total promotion amount is dynamically calculated.
>
>
> On 9/7/06, Thomas Dorenlot <[hidden email]> wrote:
>>
>> Hello everyone,
>>
>> I search to understand about the settings of promotions. In order  
>> to do
>> that, I realize some promotions, and after some problems, I manage to
>> obtain the correct prices in the cart. But I want to know if it is
>> possible to calculate the price from a promotion and out of the cart.
>>
>> Thank you
>>
>> Thomas
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Promotions

oceatoon
yes but indeed it was broken, there were a few files involved so to get it
back out of our dev
I need to refresh my memory and get a little time, when do you need it for ?


On 9/7/06, Si Chen <[hidden email]> wrote:

>
> Tibor,
>
> Did you ever get free shipping promotions to work?
>
> Si
>
> On Sep 7, 2006, at 8:05 AM, tibor katelbach wrote:
>
> > we use a variable that cumulates all applied promotions when the
> > page is
> > rendered
> > so the total promotion amount is dynamically calculated.
> >
> >
> > On 9/7/06, Thomas Dorenlot <[hidden email]> wrote:
> >>
> >> Hello everyone,
> >>
> >> I search to understand about the settings of promotions. In order
> >> to do
> >> that, I realize some promotions, and after some problems, I manage to
> >> obtain the correct prices in the cart. But I want to know if it is
> >> possible to calculate the price from a promotion and out of the cart.
> >>
> >> Thank you
> >>
> >> Thomas
> >>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Promotions

Si Chen-2
Tibor,

It's great you were able to fix it.  If you can make a patch on JIRA,  
we'll take a look and see if there's anything we can help with.  We'd  
certainly appreciate your contribution, too!  So any time that's  
convenient for you.

Si


On Sep 8, 2006, at 12:49 AM, tibor katelbach wrote:

> yes but indeed it was broken, there were a few files involved so to  
> get it
> back out of our dev
> I need to refresh my memory and get a little time, when do you need  
> it for ?
>
>
> On 9/7/06, Si Chen <[hidden email]> wrote:
>>
>> Tibor,
>>
>> Did you ever get free shipping promotions to work?
>>
>> Si
>>
>> On Sep 7, 2006, at 8:05 AM, tibor katelbach wrote:
>>
>> > we use a variable that cumulates all applied promotions when the
>> > page is
>> > rendered
>> > so the total promotion amount is dynamically calculated.
>> >
>> >
>> > On 9/7/06, Thomas Dorenlot <[hidden email]> wrote:
>> >>
>> >> Hello everyone,
>> >>
>> >> I search to understand about the settings of promotions. In order
>> >> to do
>> >> that, I realize some promotions, and after some problems, I  
>> manage to
>> >> obtain the correct prices in the cart. But I want to know if it is
>> >> possible to calculate the price from a promotion and out of the  
>> cart.
>> >>
>> >> Thank you
>> >>
>> >> Thomas
>> >>
>> >>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Promotions

oceatoon
no problem as soon I get a little spare time I'll take care of it, just one
thing is I have never patched anything yet on ofbiz, is there a doc or how
too out there?
ofbiz.org seems down ....



On 9/8/06, Si Chen <[hidden email]> wrote:

>
> Tibor,
>
> It's great you were able to fix it.  If you can make a patch on JIRA,
> we'll take a look and see if there's anything we can help with.  We'd
> certainly appreciate your contribution, too!  So any time that's
> convenient for you.
>
> Si
>
>
> On Sep 8, 2006, at 12:49 AM, tibor katelbach wrote:
>
> > yes but indeed it was broken, there were a few files involved so to
> > get it
> > back out of our dev
> > I need to refresh my memory and get a little time, when do you need
> > it for ?
> >
> >
> > On 9/7/06, Si Chen <[hidden email]> wrote:
> >>
> >> Tibor,
> >>
> >> Did you ever get free shipping promotions to work?
> >>
> >> Si
> >>
> >> On Sep 7, 2006, at 8:05 AM, tibor katelbach wrote:
> >>
> >> > we use a variable that cumulates all applied promotions when the
> >> > page is
> >> > rendered
> >> > so the total promotion amount is dynamically calculated.
> >> >
> >> >
> >> > On 9/7/06, Thomas Dorenlot <[hidden email]> wrote:
> >> >>
> >> >> Hello everyone,
> >> >>
> >> >> I search to understand about the settings of promotions. In order
> >> >> to do
> >> >> that, I realize some promotions, and after some problems, I
> >> manage to
> >> >> obtain the correct prices in the cart. But I want to know if it is
> >> >> possible to calculate the price from a promotion and out of the
> >> cart.
> >> >>
> >> >> Thank you
> >> >>
> >> >> Thomas
> >> >>
> >> >>
> >>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Promotions

Jacques Le Roux
Administrator
Hi Tibor,

Please see here : http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices

I was able to access at 11h11 but was a bit slow

Thanks for your help

Jacques


> no problem as soon I get a little spare time I'll take care of it, just one
> thing is I have never patched anything yet on ofbiz, is there a doc or how
> too out there?
> ofbiz.org seems down ....
>
>
>
> On 9/8/06, Si Chen <[hidden email]> wrote:
> >
> > Tibor,
> >
> > It's great you were able to fix it.  If you can make a patch on JIRA,
> > we'll take a look and see if there's anything we can help with.  We'd
> > certainly appreciate your contribution, too!  So any time that's
> > convenient for you.
> >
> > Si
> >
> >
> > On Sep 8, 2006, at 12:49 AM, tibor katelbach wrote:
> >
> > > yes but indeed it was broken, there were a few files involved so to
> > > get it
> > > back out of our dev
> > > I need to refresh my memory and get a little time, when do you need
> > > it for ?
> > >
> > >
> > > On 9/7/06, Si Chen <[hidden email]> wrote:
> > >>
> > >> Tibor,
> > >>
> > >> Did you ever get free shipping promotions to work?
> > >>
> > >> Si
> > >>
> > >> On Sep 7, 2006, at 8:05 AM, tibor katelbach wrote:
> > >>
> > >> > we use a variable that cumulates all applied promotions when the
> > >> > page is
> > >> > rendered
> > >> > so the total promotion amount is dynamically calculated.
> > >> >
> > >> >
> > >> > On 9/7/06, Thomas Dorenlot <[hidden email]> wrote:
> > >> >>
> > >> >> Hello everyone,
> > >> >>
> > >> >> I search to understand about the settings of promotions. In order
> > >> >> to do
> > >> >> that, I realize some promotions, and after some problems, I
> > >> manage to
> > >> >> obtain the correct prices in the cart. But I want to know if it is
> > >> >> possible to calculate the price from a promotion and out of the
> > >> cart.
> > >> >>
> > >> >> Thank you
> > >> >>
> > >> >> Thomas
> > >> >>
> > >> >>
> > >>
> > >>
> >
> >
>