Hey,
when I call a controller request-map and do response with "view-last", I get back to the last viewed product. But I want to get back to the last viewed page (every page like main, categories, content etc.). Is there a build in function to get it (it comes with the http request I think) easy in the controller.xml? thanks for your help! |
Hi Robert,
Use "save-last-view" I think this will help you. <response name="success" type="view-last" save-last-view="true"/> Regards, Ankit Jain On Thu, Apr 12, 2012 at 3:28 AM, Robert2012 <[hidden email]> wrote: > Hey, > > when I call a controller request-map and do response with "view-last", I get > back to the last viewed product. But I want to get back to the last viewed > page (every page like main, categories, content etc.). > > Is there a build in function to get it (it comes with the http request I > think) easy in the controller.xml? > > thanks for your help! > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4550249.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
it works, great! Maybe you also know this :)
How can I call a layered window out of ftl file? I know that I can dou it over XML forms with f.ex. the submit button, but in ftl, I cannot add the attribute "layered" as I know...or do I have to write my own js layered window function in ftl? thanks in advance!
|
Hi Robert,
To use lookup on ftl you have to use htmlTemplate.lookupField macro, you can find it in ftl file eg. keywordsearchbox.ftl. Thanks & Regards -- Deepak Dixit HotWax Media Pvt. Ltd. www.hotwaxmedia.com Contact :- +91-98267-54548 Skype :- deepakdixit On Apr 12, 2012, at 4:23 PM, Robert2012 wrote: > it works, great! Maybe you also know this :) > > How can I call a layered window out of ftl file? > > I know that I can dou it over XML forms with f.ex. the submit button, but in > ftl, I cannot add the attribute "layered" as I know...or do I have to write > my own js layered window function in ftl? > > thanks in advance! > > > > Ankit Jain wrote >> >> Hi Robert, >> >> Use "save-last-view" I think this will help you. >> >> <response name="success" type="view-last" save-last-view="true"/> >> >> Regards, >> Ankit Jain >> >> > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4551535.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Hey, thanks for your message. I dont mean a lookup field, I mean sth. like a layered popup.
I want that after the customer adds sth to basket, that there popups a window, where erverything outside of it is grey.... In this field I wanna ask the customer if he wants to continue shopping, or he wants to go to check out and I want also to show there some interesting items. I dont mean a normal popup, should be layered. I hopw you understand what I mean :) (sorry im german) THanks in advance
|
You will need to write some JavaScript to create an Ajaxed jQuery dialog.
-Adrian On 4/12/2012 12:39 PM, Robert2012 wrote: > Hey, thanks for your message. I dont mean a lookup field, I mean sth. like a > layered popup. > > I want that after the customer adds sth to basket, that there popups a > window, where erverything outside of it is grey.... In this field I wanna > ask the customer if he wants to continue shopping, or he wants to go to > check out and I want also to show there some interesting items. > > I dont mean a normal popup, should be layered. > I hopw you understand what I mean :) (sorry im german) > > THanks in advance > > > Deepak Dixit-2 wrote >> Hi Robert, >> >> To use lookup on ftl you have to use htmlTemplate.lookupField macro, you >> can find it in ftl file eg. keywordsearchbox.ftl. >> > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4551617.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Thanks a lot. I just asked not to add ootb functions...!
|
Administrator
|
In reply to this post by Adrian Crum-3
You can follow the lookup way for that... But I guess you are already on it...
Jacques From: "Adrian Crum" <[hidden email]> > You will need to write some JavaScript to create an Ajaxed jQuery dialog. > > -Adrian > > On 4/12/2012 12:39 PM, Robert2012 wrote: >> Hey, thanks for your message. I dont mean a lookup field, I mean sth. like a >> layered popup. >> >> I want that after the customer adds sth to basket, that there popups a >> window, where erverything outside of it is grey.... In this field I wanna >> ask the customer if he wants to continue shopping, or he wants to go to >> check out and I want also to show there some interesting items. >> >> I dont mean a normal popup, should be layered. >> I hopw you understand what I mean :) (sorry im german) >> >> THanks in advance >> >> >> Deepak Dixit-2 wrote >>> Hi Robert, >>> >>> To use lookup on ftl you have to use htmlTemplate.lookupField macro, you >>> can find it in ftl file eg. keywordsearchbox.ftl. >>> >> >> -- >> View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4551617.html >> Sent from the OFBiz - User mailing list archive at Nabble.com. |
Can you help me by doing it with the lookup way? I know I can do it with sth like a lightbox script, but I want to use as much from ofbiz I can, to avoid overloding my application.
to call the ofbiz used layer popup would be great! looking forward to your answer :) Robert
|
Administrator
|
Have a look at http://code.google.com/p/simplemodal/ this could simplify your life and from your exeperience we could introduce it
in OFBiz. We have already used it in a project with success, but it was in 2010... Jacques From: "Robert2012" <[hidden email]> > Can you help me by doing it with the lookup way? I know I can do it with sth > like a lightbox script, but I want to use as much from ofbiz I can, to avoid > overloding my application. > > to call the ofbiz used layer popup would be great! > > looking forward to your answer :) > > Robert > > > Jacques Le Roux wrote >> >> You can follow the lookup way for that... But I guess you are already on >> it... >> >> Jacques >> >> > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4553872.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Thanks! I will have a look.
|
jQuery includes a modal dialog, so I don't understand why that
additional code is necessary. -Adrian On 4/13/2012 1:40 PM, Robert2012 wrote: > Thanks! I will have a look. > > > Jacques Le Roux wrote >> Have a look at http://code.google.com/p/simplemodal/ this could simplify >> your life and from your exeperience we could introduce it >> in OFBiz. >> >> We have already used it in a project with success, but it was in 2010... >> >> Jacques >> >> From: "Robert2012"<gan@> >>> Can you help me by doing it with the lookup way? I know I can do it with >>> sth >>> like a lightbox script, but I want to use as much from ofbiz I can, to >>> avoid >>> overloding my application. >>> >>> to call the ofbiz used layer popup would be great! >>> >>> looking forward to your answer :) >>> >>> Robert >>> >>> >>> Jacques Le Roux wrote >>>> You can follow the lookup way for that... But I guess you are already on >>>> it... >>>> >>>> Jacques >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4553872.html >>> Sent from the OFBiz - User mailing list archive at Nabble.com. > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4554688.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
how do you call this dialog from ftl?
thanks in advance. Robert
|
Go to the jQuery website for examples.
-Adrian On 4/13/2012 1:52 PM, Robert2012 wrote: > how do you call this dialog from ftl? > > thanks in advance. > > Robert > > > adrian.crum wrote >> jQuery includes a modal dialog, so I don't understand why that >> additional code is necessary. >> >> -Adrian >> >> On 4/13/2012 1:40 PM, Robert2012 wrote: >>> Thanks! I will have a look. >>> >>> >>> Jacques Le Roux wrote >>>> Have a look at http://code.google.com/p/simplemodal/ this could simplify >>>> your life and from your exeperience we could introduce it >>>> in OFBiz. >>>> >>>> We have already used it in a project with success, but it was in 2010... >>>> >>>> Jacques >>>> >>>> From: "Robert2012"<gan@> >>>>> Can you help me by doing it with the lookup way? I know I can do it >>>>> with >>>>> sth >>>>> like a lightbox script, but I want to use as much from ofbiz I can, to >>>>> avoid >>>>> overloding my application. >>>>> >>>>> to call the ofbiz used layer popup would be great! >>>>> >>>>> looking forward to your answer :) >>>>> >>>>> Robert >>>>> >>>>> >>>>> Jacques Le Roux wrote >>>>>> You can follow the lookup way for that... But I guess you are already >>>>>> on >>>>>> it... >>>>>> >>>>>> Jacques >>>>>> >>>>>> >>>>> -- >>>>> View this message in context: >>>>> http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4553872.html >>>>> Sent from the OFBiz - User mailing list archive at Nabble.com. >>> -- >>> View this message in context: >>> http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4554688.html >>> Sent from the OFBiz - User mailing list archive at Nabble.com. > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4554718.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Ok, im on it :) but need a little help, cause im not so familiar with JS:
in productsummary.ftl is i.ex: <form method="post" action="<@ofbizUrl>additem</@ofbizUrl>" id="additem" name="the${requestAttributes.formNamePrefix?if_exists}${requestAttributes.listIndex?if_exists}form" style="margin: 0;"> <input type="hidden" name="add_product_id" value="${product.productId}"/> <input type="text" size="5" name="quantity" value="1"/> <input type="hidden" name="clearSearch" value="N"/> <input type="hidden" name="mainSubmited" value="Y"/> <a href="javascript:document.the${requestAttributes.formNamePrefix?if_exists}${requestAttributes.listIndex?if_exists}form.submit()" class="buttontext">${uiLabelMap.OrderAddToCart} I added the following JS: jQuery(function ($) { $('#additem').click(function (e) { $('#basic-modal-content').modal(); return false; }); }); the JS methods for it I added and linked to them. It works, that the modal-window / layer opens, but the post data were not send. DO you know how I can send the post data and then open the window afterwards? Would be great - still on learning. Greetings, Robert
|
Ok I got a little step, but got a new problem:
I change code to: jQuery(function ($) { $('#additem .buttontext').click(function (e) { $('#additem').submit(); $('#contentIDcartContainer').modal(); return false; }); }); No it is doing the following: 1. The form submit is started. 2. the popuplayer (like a lightbox) is shown, but with old cart content. 3. the populayer disapears 4. cartcontent is updated This happens because the form target is "<@ofbizUrl>additem</@ofbizUrl>" and this causes a java class call to do the addToCart method. --> controller.xml: <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="addToCart"/> After succeeded this method results "success" and calls the view in controller.xml: <response name="success" type="view" value="showcart"/> This view calls (in my application) the same site (with view-last). I understand this process, but I want that the popuplayer stay on until the user clicks a provided button. DO anyone has an Idea, how I can do this? thanks in advance! Robert |
Administrator
|
I don't know about jQuery modal(). But that's what http://www.ericmmartin.com/projects/simplemodal/ is all about...
Just plug in et voilĂ Jacques From: "Robert2012" <[hidden email]> > Ok I got a little step, but got a new problem: > > I change code to: > / > jQuery(function ($) { > $('#additem .buttontext').click(function (e) { > $('#additem').submit(); > $('#contentIDcartContainer').modal(); > > return false; > }); > }); > / > No it is doing the following: > 1. The form submit is started. > 2. the popuplayer (like a lightbox) is shown, but with old cart content. > 3. the populayer disapears > 4. cartcontent is updated > > This happens because the form target is "<@ofbizUrl>additem</@ofbizUrl>" and > this causes a java class call to do the addToCart method. > > --> controller.xml: /<event type="java" > path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="addToCart"/>/ > > After succeeded this method results "success" and calls the view in > controller.xml: /<response name="success" type="view" value="showcart"/>/ > This view calls (in my application) the same site (with view-last). > > I understand this process, but I want that the popuplayer stay on until the > user clicks a provided button. DO anyone has an Idea, how I can do this? > > thanks in advance! > > Robert > > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/view-last-vie-last-page-tp4550249p4557985.html > Sent from the OFBiz - User mailing list archive at Nabble.com. |
Yeah, its the same as modal.
This allready works - easy as you said. The problem is not the modal/ simplemodal script, the problem is,that ofbiz calls a new URL for adding items to. But so I have to step more into it, to do an Ajax call to the Java class, that I dont have to reload it - expepts a user has deactivated Java script. Many thanks for trying to help me. Robert
|
Free forum by Nabble | Edit this page |