[jira] [Created] (OFBIZ-6785) removed contentwrapper methods broke ftl and groovy
Josip Almasi created OFBIZ-6785: --- Summary: removed contentwrapper methods broke ftl and groovy Key: OFBIZ-6785 URL: https://issues.apache.org/jira/browse/OFBIZ-6785 Project: OFBiz Issue Type: Bug Components: order, product, specialpurpose/ecommerce Affects Versions: Trunk Reporter: Josip Almasi ProductContentWrapper and CategoryContentWrapper method get(String,String) was removed. Whoever did that, didn't bother to fix the consequences, so all groovy and ftl files using removed methods are broken. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-6785) removed contentwrapper methods broke ftl and groovy
[ https://issues.apache.org/jira/browse/OFBIZ-6785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-6785: Attachment: OFBIZ-6785.patch Replaced all get(String,String) calls with get(String) in ftl and groovy. > removed contentwrapper methods broke ftl and groovy > --- > > Key: OFBIZ-6785 > URL: https://issues.apache.org/jira/browse/OFBIZ-6785 > Project: OFBiz > Issue Type: Bug > Components: order, product, specialpurpose/ecommerce >Affects Versions: Trunk >Reporter: Josip Almasi > Attachments: OFBIZ-6785.patch > > > ProductContentWrapper and CategoryContentWrapper method get(String,String) > was removed. > Whoever did that, didn't bother to fix the consequences, so all groovy and > ftl files using removed methods are broken. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-6262) CategoryContentWrapper ignores session locale
Josip Almasi created OFBIZ-6262: --- Summary: CategoryContentWrapper ignores session locale Key: OFBIZ-6262 URL: https://issues.apache.org/jira/browse/OFBIZ-6262 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: 13.07.01, Trunk Reporter: Josip Almasi Fix For: Trunk CategoryContentWorker returns first CategoryContent found for a Category, ignoring locale. The consequence is invalid localization of categories. Steps to reproduce: - delete product category name and/or product category description - in content tab, create category name and/or description content, for at least two locales - try changing session locale in catalog or ecommerce, watch category tree and other components displaying category name(s) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-6262) CategoryContentWrapper ignores session locale
[ https://issues.apache.org/jira/browse/OFBIZ-6262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-6262: Attachment: OFBIZ-6262.patch CategoryContentWorker now iterates thru content available for a category, and renders content found for session locale. Falls back to configured locale if no content is found. CategoryContentWrapper ignores session locale - Key: OFBIZ-6262 URL: https://issues.apache.org/jira/browse/OFBIZ-6262 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: Trunk, 13.07.01 Reporter: Josip Almasi Fix For: Trunk Attachments: OFBIZ-6262.patch CategoryContentWorker returns first CategoryContent found for a Category, ignoring locale. The consequence is invalid localization of categories. Steps to reproduce: - delete product category name and/or product category description - in content tab, create category name and/or description content, for at least two locales - try changing session locale in catalog or ecommerce, watch category tree and other components displaying category name(s) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5805) robot-friendly category listing
[ https://issues.apache.org/jira/browse/OFBIZ-5805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14297603#comment-14297603 ] Josip Almasi commented on OFBIZ-5805: - Hi, in fact I ran into endless loop issue in SEO, can't recall exact number. That issue was resolved soon after, but I still haven't had time to try out SEO branch again:( In the meantime, I ran into another issue with jstree: some customers didn't realize they need to click on + to expand categories. While it sounds silly, result is sale going down. Then I tried out with my mobile, and + is rather hard to click on. A sollution could be to also expand subcategories after click on parent category. But all things considered, IMHO jstree is more trouble than it's worth. robot-friendly category listing --- Key: OFBIZ-5805 URL: https://issues.apache.org/jira/browse/OFBIZ-5805 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: Release Branch 11.04 Reporter: Josip Almasi Priority: Minor Attachments: OFBIZ-5805.patch Robots cannot browse categories, for they don't evaluate/execute jquery/ajax category listing. This has serious consequences for ecommerce - google cannot index products, webmaster tools can generate full sitemap.xml, etc. All they see is what is in promo category. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5765) missing request map for changing currency
[ https://issues.apache.org/jira/browse/OFBIZ-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14258182#comment-14258182 ] Josip Almasi commented on OFBIZ-5765: - Mridul, I do agree. However, this very same patch is part of my attempts to handle orders in multiple currencies. After applying https://issues.apache.org/jira/browse/OFBIZ-5765 and https://issues.apache.org/jira/browse/OFBIZ-4412 I discovered shipping estimates ignore currency - shipping prices are taken as they are entered, they are not recalculated, nor even filtered by currency of order. So I gave up multi-currency store, and made two stores, each having it's own currency. (and switched from 12 to 13.07) But then I discovered that backoffice takes currency based on session locale, not the store currency. I.e. I have to click on language button when working with EUR and then again to work with HRK. I also encountered troubles working with anything but default currency, right now I can't remember what. Furthermore, currency conversion doesn't seem to work at all - when I print invoices in default currency, conversion rate is 1, no matter what I enter in currency conversion tables. And I'm required by law to print the same invoice in two currencies, one for the foreign customer and the other one for accountant and tax authority. Right now I'm confused, for I don't know what intended design is. As it is now, it's incosistent. missing request map for changing currency - Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Assignee: Ashish Vijaywargiya Attachments: ecommerce-multicurrency.patch By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. The patch to add mapping attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14242487#comment-14242487 ] Josip Almasi commented on OFBIZ-5312: - That's it Shi, now it drops exceptions and exits the loop. Proposal: URL-Generation Changes (mostly for SEO reasons but not only) -- Key: OFBIZ-5312 URL: https://issues.apache.org/jira/browse/OFBIZ-5312 Project: OFBiz Issue Type: New Feature Components: specialpurpose/ecommerce Affects Versions: Trunk Reporter: Jacques Le Roux Assignee: Jacques Le Roux Priority: Minor Labels: changes, ecommerce, friendly, seo, url Attachments: OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312-infinite-loop-20141209.patch, OFBiz-5312-allowpaths-email-jsp-patch-20140625.patch, OFBiz-5312-product-ecommerce-seo-20131031.patch, OFBiz-5312-product-ecommerce-seo-for-seo-branch.patch, OFBiz-5312-product-ecommerce-seo.patch, SeoContextFilter.java.patch, classloaderpatch.txt [This was proposed by Paul Piper in Nabble 7 months ago|http://ofbiz.135035.n4.nabble.com/Proposal-URL-Generation-Changes-td4639289.html]. Here is quoted Paul's proposal {quote} Hey Everyone, over at ilscipio (www.ilscipio.com) we developed a set of functional OFBiz changes that we believe the entire community could benefit from. The changes have been implemented in parts in Syracus (www.syracus.net) for a while now, but we figured that some of which are too crucial for ofbiz' success in the long run, so we are considering the contribution (as we did with the SOLR component). As you are probably aware, OFBiz has a pretty uncommon way of generating URLs. Most of this has to do with the fact that OFBiz uses a servlet (ControlServlet) to handle all requests. The servlet is mounted at /control, so that it won't interfere with other servlets. Though functionally valid, this has the sideeffect that all urls are actually created on /control, which is neither pretty, nor good by any measures of SEO. It also means that a few 302 redirects are necessary to forward the user from / to /control/main. It also makes requests more complicated, since many forwards are necessary whenever somebody wants to move away from this implementation. Since this is hurtful to many of the implementers, I wanted to discuss whether or not you guys would be interested in the changes we have made. The functional changes contain: * Removal of /control out of all the urls * SEO-friendly URLS * Configurable product/category and other URLs * Frontpage mapping from /main to / It was tested on our end and contains all necessary improvements (Transforms, Sample Configuration, Servlets Filters) for it to be applicable. If interested, I would create a new JIRA ticket for this and after a few minor internal discussions, we will gladly provide the rest of you with it. Regards, Paul {quote} There is even a patch, mostly done by Jinghai Shi, that I attach here. Even if it has been already used in [Syracus|http://syracus.net/] since early this year, some help would be needed to test it thoroughly in OFBiz. Then we should discuss if it's the way to go. I believe it is. Who needs a /control/ or /main by default in ecommerce urls? Would you not prefer http://localhost:8080/ecommerce/ over http://localhost:8080/ecommerce/control/main ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232990#comment-14232990 ] Josip Almasi commented on OFBIZ-5312: - Now fresh install of the branch, with demo data. Click on 'ask the experts forum' resulted in endless loop, eating up 200% cpu. The app can't stop with ant stop, process has to be killed. Branch or trunk, I don't know, but something is so badly broken I can't even try out the branch. Guess I'll leave it for some better times then. Here's stack trace if anyone's interested: 2014-12-03 14:12:22,977 |http-bio-8080-exec-4 |ControlServlet|E| Error in request handler: java.lang.NullPointerException at org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:475) ~[tomcat-7.0.57-catalina.jar:7.0.57] at org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:464) ~[tomcat-7.0.57-tomcat-coyote.jar:7.0.57] at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:353) ~[tomcat-7.0.57-catalina.jar:7.0.57] at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:331) ~[tomcat-7.0.57-catalina.jar:7.0.57] at org.apache.catalina.connector.Response.flushBuffer(Response.java:610) ~[tomcat-7.0.57-catalina.jar:7.0.57] at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:306) ~[tomcat-7.0.57-catalina.jar:7.0.57] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160) ~[servlet-api-3.0.jar:3.0.FR] at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:160)
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14229648#comment-14229648 ] Josip Almasi commented on OFBIZ-5312: - OK thanks for info. Proposal: URL-Generation Changes (mostly for SEO reasons but not only) -- Key: OFBIZ-5312 URL: https://issues.apache.org/jira/browse/OFBIZ-5312 Project: OFBiz Issue Type: New Feature Components: specialpurpose/ecommerce Affects Versions: Trunk Reporter: Jacques Le Roux Assignee: Jacques Le Roux Priority: Minor Labels: changes, ecommerce, friendly, seo, url Attachments: OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBiz-5312-allowpaths-email-jsp-patch-20140625.patch, OFBiz-5312-product-ecommerce-seo-20131031.patch, OFBiz-5312-product-ecommerce-seo-for-seo-branch.patch, OFBiz-5312-product-ecommerce-seo.patch, SeoContextFilter.java.patch, classloaderpatch.txt [This was proposed by Paul Piper in Nabble 7 months ago|http://ofbiz.135035.n4.nabble.com/Proposal-URL-Generation-Changes-td4639289.html]. Here is quoted Paul's proposal {quote} Hey Everyone, over at ilscipio (www.ilscipio.com) we developed a set of functional OFBiz changes that we believe the entire community could benefit from. The changes have been implemented in parts in Syracus (www.syracus.net) for a while now, but we figured that some of which are too crucial for ofbiz' success in the long run, so we are considering the contribution (as we did with the SOLR component). As you are probably aware, OFBiz has a pretty uncommon way of generating URLs. Most of this has to do with the fact that OFBiz uses a servlet (ControlServlet) to handle all requests. The servlet is mounted at /control, so that it won't interfere with other servlets. Though functionally valid, this has the sideeffect that all urls are actually created on /control, which is neither pretty, nor good by any measures of SEO. It also means that a few 302 redirects are necessary to forward the user from / to /control/main. It also makes requests more complicated, since many forwards are necessary whenever somebody wants to move away from this implementation. Since this is hurtful to many of the implementers, I wanted to discuss whether or not you guys would be interested in the changes we have made. The functional changes contain: * Removal of /control out of all the urls * SEO-friendly URLS * Configurable product/category and other URLs * Frontpage mapping from /main to / It was tested on our end and contains all necessary improvements (Transforms, Sample Configuration, Servlets Filters) for it to be applicable. If interested, I would create a new JIRA ticket for this and after a few minor internal discussions, we will gladly provide the rest of you with it. Regards, Paul {quote} There is even a patch, mostly done by Jinghai Shi, that I attach here. Even if it has been already used in [Syracus|http://syracus.net/] since early this year, some help would be needed to test it thoroughly in OFBiz. Then we should discuss if it's the way to go. I believe it is. Who needs a /control/ or /main by default in ecommerce urls? Would you not prefer http://localhost:8080/ecommerce/ over http://localhost:8080/ecommerce/control/main ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14229137#comment-14229137 ] Josip Almasi commented on OFBIZ-5312: - I will certanly try. I'm resonably sure what caused missing content: I clicked on SEO button in my catalog. This generated a number of alt content for a number of products and categories. Then ecommerce died. I deleted generated things to make web shop work. There still may be something remaining. All that happened with 13.07. Then I accessed the same database with SEO branch. First user to access ecommerce causes cpu load 100%. This is the last html line displayed: !-- Begin Template component://ecommerce/webapp/ecommerce/catalog/miniassocprods.ftl -- Second user causes 200%, third 300% load... Proposal: URL-Generation Changes (mostly for SEO reasons but not only) -- Key: OFBIZ-5312 URL: https://issues.apache.org/jira/browse/OFBIZ-5312 Project: OFBiz Issue Type: New Feature Components: specialpurpose/ecommerce Affects Versions: Trunk Reporter: Jacques Le Roux Assignee: Jacques Le Roux Priority: Minor Labels: changes, ecommerce, friendly, seo, url Attachments: OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBiz-5312-allowpaths-email-jsp-patch-20140625.patch, OFBiz-5312-product-ecommerce-seo-20131031.patch, OFBiz-5312-product-ecommerce-seo-for-seo-branch.patch, OFBiz-5312-product-ecommerce-seo.patch, SeoContextFilter.java.patch, classloaderpatch.txt [This was proposed by Paul Piper in Nabble 7 months ago|http://ofbiz.135035.n4.nabble.com/Proposal-URL-Generation-Changes-td4639289.html]. Here is quoted Paul's proposal {quote} Hey Everyone, over at ilscipio (www.ilscipio.com) we developed a set of functional OFBiz changes that we believe the entire community could benefit from. The changes have been implemented in parts in Syracus (www.syracus.net) for a while now, but we figured that some of which are too crucial for ofbiz' success in the long run, so we are considering the contribution (as we did with the SOLR component). As you are probably aware, OFBiz has a pretty uncommon way of generating URLs. Most of this has to do with the fact that OFBiz uses a servlet (ControlServlet) to handle all requests. The servlet is mounted at /control, so that it won't interfere with other servlets. Though functionally valid, this has the sideeffect that all urls are actually created on /control, which is neither pretty, nor good by any measures of SEO. It also means that a few 302 redirects are necessary to forward the user from / to /control/main. It also makes requests more complicated, since many forwards are necessary whenever somebody wants to move away from this implementation. Since this is hurtful to many of the implementers, I wanted to discuss whether or not you guys would be interested in the changes we have made. The functional changes contain: * Removal of /control out of all the urls * SEO-friendly URLS * Configurable product/category and other URLs * Frontpage mapping from /main to / It was tested on our end and contains all necessary improvements (Transforms, Sample Configuration, Servlets Filters) for it to be applicable. If interested, I would create a new JIRA ticket for this and after a few minor internal discussions, we will gladly provide the rest of you with it. Regards, Paul {quote} There is even a patch, mostly done by Jinghai Shi, that I attach here. Even if it has been already used in [Syracus|http://syracus.net/] since early this year, some help would be needed to test it thoroughly in OFBiz. Then we should discuss if it's the way to go. I believe it is. Who needs a /control/ or /main by default in ecommerce urls? Would you not prefer http://localhost:8080/ecommerce/ over http://localhost:8080/ecommerce/control/main ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14229153#comment-14229153 ] Josip Almasi commented on OFBIZ-5312: - :) That would surelly be already spotted. Obviously something is wrong with my data. Is there a way to migrate 13.07 data to SEO branch? In the meantime, here's stacktrace of the thread eating up CPU: [java] http-bio-8080-exec-1 daemon prio=10 tid=0x7fbd1c033800 nid=0x2fe8 runnable [0x7fbd6f2a4000] [java]java.lang.Thread.State: RUNNABLE [java] at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:372) [java] at org.ofbiz.entity.GenericEntity.getString(GenericEntity.java:679) [java] at org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.getRandomEntity(LimitedSubContentCacheTransform.java:308) [java] at org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.getNextMatchingEntity(LimitedSubContentCacheTransform.java:321) [java] at org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.afterBody(LimitedSubContentCacheTransform.java:213) [java] at freemarker.core.Environment.visitAndTransform(Environment.java:371) [java] at freemarker.core.UnifiedCall.accept(UnifiedCall.java:104) [java] at freemarker.core.Environment.visit(Environment.java:257) [java] at freemarker.core.MixedContent.accept(MixedContent.java:57) [java] at freemarker.core.Environment.visit(Environment.java:257) [java] at freemarker.core.Environment.process(Environment.java:235) [java] at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:256) [java] at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:157) [java] at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:202) [java] at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:130) [java] at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1100) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:270) [java] at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:164) [java] at org.ofbiz.widget.screen.ScreenFactory.renderReferencedScreen(ScreenFactory.java:210) [java] at org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:695) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:270) [java] at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:164) [java] at org.ofbiz.widget.screen.ScreenFactory.renderReferencedScreen(ScreenFactory.java:210) [java] at org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:695) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:423) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:423) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:270) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:270) [java] at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:164) [java] at org.ofbiz.widget.screen.ScreenFactory.renderReferencedScreen(ScreenFactory.java:210) [java] at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:763) [java] at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:103) [java] at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:270) [java] at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:164) [java] at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:133) [java]
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14228708#comment-14228708 ] Josip Almasi commented on OFBIZ-5312: - I get that when first user attempts to access the store: 2014-11-29 11:19:20,997 |http-bio-8080-exec-7 |ContentWorker |E| No dataResourceId found for contentId: CONTENT_ERROR OFBIZ hangs, wasting 100% CPU. No other log entries. For starters, I'll attempt to print out contentId and see what's missing. Any pointers on how to proceed? Proposal: URL-Generation Changes (mostly for SEO reasons but not only) -- Key: OFBIZ-5312 URL: https://issues.apache.org/jira/browse/OFBIZ-5312 Project: OFBiz Issue Type: New Feature Components: specialpurpose/ecommerce Affects Versions: Trunk Reporter: Jacques Le Roux Assignee: Jacques Le Roux Priority: Minor Labels: changes, ecommerce, friendly, seo, url Attachments: OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBiz-5312-allowpaths-email-jsp-patch-20140625.patch, OFBiz-5312-product-ecommerce-seo-20131031.patch, OFBiz-5312-product-ecommerce-seo-for-seo-branch.patch, OFBiz-5312-product-ecommerce-seo.patch, SeoContextFilter.java.patch, classloaderpatch.txt [This was proposed by Paul Piper in Nabble 7 months ago|http://ofbiz.135035.n4.nabble.com/Proposal-URL-Generation-Changes-td4639289.html]. Here is quoted Paul's proposal {quote} Hey Everyone, over at ilscipio (www.ilscipio.com) we developed a set of functional OFBiz changes that we believe the entire community could benefit from. The changes have been implemented in parts in Syracus (www.syracus.net) for a while now, but we figured that some of which are too crucial for ofbiz' success in the long run, so we are considering the contribution (as we did with the SOLR component). As you are probably aware, OFBiz has a pretty uncommon way of generating URLs. Most of this has to do with the fact that OFBiz uses a servlet (ControlServlet) to handle all requests. The servlet is mounted at /control, so that it won't interfere with other servlets. Though functionally valid, this has the sideeffect that all urls are actually created on /control, which is neither pretty, nor good by any measures of SEO. It also means that a few 302 redirects are necessary to forward the user from / to /control/main. It also makes requests more complicated, since many forwards are necessary whenever somebody wants to move away from this implementation. Since this is hurtful to many of the implementers, I wanted to discuss whether or not you guys would be interested in the changes we have made. The functional changes contain: * Removal of /control out of all the urls * SEO-friendly URLS * Configurable product/category and other URLs * Frontpage mapping from /main to / It was tested on our end and contains all necessary improvements (Transforms, Sample Configuration, Servlets Filters) for it to be applicable. If interested, I would create a new JIRA ticket for this and after a few minor internal discussions, we will gladly provide the rest of you with it. Regards, Paul {quote} There is even a patch, mostly done by Jinghai Shi, that I attach here. Even if it has been already used in [Syracus|http://syracus.net/] since early this year, some help would be needed to test it thoroughly in OFBiz. Then we should discuss if it's the way to go. I believe it is. Who needs a /control/ or /main by default in ecommerce urls? Would you not prefer http://localhost:8080/ecommerce/ over http://localhost:8080/ecommerce/control/main ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5312) Proposal: URL-Generation Changes (mostly for SEO reasons but not only)
[ https://issues.apache.org/jira/browse/OFBIZ-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14228732#comment-14228732 ] Josip Almasi commented on OFBIZ-5312: - Apsolutelly, fresh checkout, default theme. I'm using it with my production database, postgres, 13.7. Proposal: URL-Generation Changes (mostly for SEO reasons but not only) -- Key: OFBIZ-5312 URL: https://issues.apache.org/jira/browse/OFBIZ-5312 Project: OFBiz Issue Type: New Feature Components: specialpurpose/ecommerce Affects Versions: Trunk Reporter: Jacques Le Roux Assignee: Jacques Le Roux Priority: Minor Labels: changes, ecommerce, friendly, seo, url Attachments: OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBIZ-5312 - ofbiz-ecommerce-seo.patch, OFBiz-5312-allowpaths-email-jsp-patch-20140625.patch, OFBiz-5312-product-ecommerce-seo-20131031.patch, OFBiz-5312-product-ecommerce-seo-for-seo-branch.patch, OFBiz-5312-product-ecommerce-seo.patch, SeoContextFilter.java.patch, classloaderpatch.txt [This was proposed by Paul Piper in Nabble 7 months ago|http://ofbiz.135035.n4.nabble.com/Proposal-URL-Generation-Changes-td4639289.html]. Here is quoted Paul's proposal {quote} Hey Everyone, over at ilscipio (www.ilscipio.com) we developed a set of functional OFBiz changes that we believe the entire community could benefit from. The changes have been implemented in parts in Syracus (www.syracus.net) for a while now, but we figured that some of which are too crucial for ofbiz' success in the long run, so we are considering the contribution (as we did with the SOLR component). As you are probably aware, OFBiz has a pretty uncommon way of generating URLs. Most of this has to do with the fact that OFBiz uses a servlet (ControlServlet) to handle all requests. The servlet is mounted at /control, so that it won't interfere with other servlets. Though functionally valid, this has the sideeffect that all urls are actually created on /control, which is neither pretty, nor good by any measures of SEO. It also means that a few 302 redirects are necessary to forward the user from / to /control/main. It also makes requests more complicated, since many forwards are necessary whenever somebody wants to move away from this implementation. Since this is hurtful to many of the implementers, I wanted to discuss whether or not you guys would be interested in the changes we have made. The functional changes contain: * Removal of /control out of all the urls * SEO-friendly URLS * Configurable product/category and other URLs * Frontpage mapping from /main to / It was tested on our end and contains all necessary improvements (Transforms, Sample Configuration, Servlets Filters) for it to be applicable. If interested, I would create a new JIRA ticket for this and after a few minor internal discussions, we will gladly provide the rest of you with it. Regards, Paul {quote} There is even a patch, mostly done by Jinghai Shi, that I attach here. Even if it has been already used in [Syracus|http://syracus.net/] since early this year, some help would be needed to test it thoroughly in OFBiz. Then we should discuss if it's the way to go. I believe it is. Who needs a /control/ or /main by default in ecommerce urls? Would you not prefer http://localhost:8080/ecommerce/ over http://localhost:8080/ecommerce/control/main ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5805) robot-friendly category listing
[ https://issues.apache.org/jira/browse/OFBIZ-5805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14169091#comment-14169091 ] Josip Almasi commented on OFBIZ-5805: - Uh, I might have mixed up 12 and 13:( I switched from 12 to 13. OK OK I get it - SEO is my thing;) I'll give it a try ASAP. I still have one thing to solve in my web shop - google adsense. After that I'm switching to SEO branch. robot-friendly category listing --- Key: OFBIZ-5805 URL: https://issues.apache.org/jira/browse/OFBIZ-5805 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: 13.07.01 Reporter: Josip Almasi Priority: Minor Attachments: OFBIZ-5805.patch Robots cannot browse categories, for they don't evaluate/execute jquery/ajax category listing. This has serious consequences for ecommerce - google cannot index products, webmaster tools can generate full sitemap.xml, etc. All they see is what is in promo category. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5799) Can't mount root web app
[ https://issues.apache.org/jira/browse/OFBIZ-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14168093#comment-14168093 ] Josip Almasi commented on OFBIZ-5799: - Sure I'm interested, thanks for info. But IMO ajax in category tree is major trouble, since it prevents all crawlers from getting the site content, can't even build sitemap. I'm about to rewrite that in ftl. Can't mount root web app Key: OFBIZ-5799 URL: https://issues.apache.org/jira/browse/OFBIZ-5799 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Assignee: Jacques Le Roux Priority: Minor Attachments: OFBIZ-5799 - Can't mount root web app.patch, OFBIZ-5799.patch After mounting ecommerce as root web app, I got ScreenRenderException, caused by StringIndexOutOfBoundsException: String index out of range: -1 at org.ofbiz.product.category.CatalogUrlServlet.makeCatalogUrl(CatalogUrlServlet.java:186) Categories and products cannot be rendered. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-5805) robot-friendly category listing
Josip Almasi created OFBIZ-5805: --- Summary: robot-friendly category listing Key: OFBIZ-5805 URL: https://issues.apache.org/jira/browse/OFBIZ-5805 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: 13.07.01 Reporter: Josip Almasi Priority: Minor Robots cannot browse categories, for they don't evaluate/execute jquery/ajax category listing. This has serious consequences for ecommerce - google cannot index products, webmaster tools can generate full sitemap.xml, etc. All they see is what is in promo category. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5805) robot-friendly category listing
[ https://issues.apache.org/jira/browse/OFBIZ-5805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5805: Attachment: OFBIZ-5805.patch Attached patch adds full category listing under noscript section, so robots can browse ecommerce categories. This doesn't have impact on what user sees, but generates larger html, which may affect sites with many categories. Oh now that I created the patch, I saw that I fixed another thing by the way - missing link to jquery.cookie.js:) robot-friendly category listing --- Key: OFBIZ-5805 URL: https://issues.apache.org/jira/browse/OFBIZ-5805 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: 13.07.01 Reporter: Josip Almasi Priority: Minor Attachments: OFBIZ-5805.patch Robots cannot browse categories, for they don't evaluate/execute jquery/ajax category listing. This has serious consequences for ecommerce - google cannot index products, webmaster tools can generate full sitemap.xml, etc. All they see is what is in promo category. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5799) Can't mount root web app
[ https://issues.apache.org/jira/browse/OFBIZ-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14168171#comment-14168171 ] Josip Almasi commented on OFBIZ-5799: - Thanks, that's what I'm talking about. And I think I found optimal solution - robot friendly AJAX tree: https://issues.apache.org/jira/browse/OFBIZ-5805 Can't mount root web app Key: OFBIZ-5799 URL: https://issues.apache.org/jira/browse/OFBIZ-5799 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Assignee: Jacques Le Roux Priority: Minor Attachments: OFBIZ-5799 - Can't mount root web app.patch, OFBIZ-5799.patch After mounting ecommerce as root web app, I got ScreenRenderException, caused by StringIndexOutOfBoundsException: String index out of range: -1 at org.ofbiz.product.category.CatalogUrlServlet.makeCatalogUrl(CatalogUrlServlet.java:186) Categories and products cannot be rendered. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5799) Can't mount root web app
[ https://issues.apache.org/jira/browse/OFBIZ-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14161725#comment-14161725 ] Josip Almasi commented on OFBIZ-5799: - I don't know... just trying to get my shop running. Can't mount root web app Key: OFBIZ-5799 URL: https://issues.apache.org/jira/browse/OFBIZ-5799 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Priority: Minor Attachments: OFBIZ-5799.patch After mounting ecommerce as root web app, I got ScreenRenderException, caused by StringIndexOutOfBoundsException: String index out of range: -1 at org.ofbiz.product.category.CatalogUrlServlet.makeCatalogUrl(CatalogUrlServlet.java:186) Categories and products cannot be rendered. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-5799) Can't mount root web app
Josip Almasi created OFBIZ-5799: --- Summary: Can't mount root web app Key: OFBIZ-5799 URL: https://issues.apache.org/jira/browse/OFBIZ-5799 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Priority: Minor After mounting ecommerce as root web app, I got ScreenRenderException, caused by StringIndexOutOfBoundsException: String index out of range: -1 at org.ofbiz.product.category.CatalogUrlServlet.makeCatalogUrl(CatalogUrlServlet.java:186) Categories and products cannot be rendered. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5799) Can't mount root web app
[ https://issues.apache.org/jira/browse/OFBIZ-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5799: Attachment: OFBIZ-5799.patch Solves StringIndexOutOfBoundsException in CatalogUrlServlet.makeCatalogUrl() thrown for root context after mounting root web app. Can't mount root web app Key: OFBIZ-5799 URL: https://issues.apache.org/jira/browse/OFBIZ-5799 Project: OFBiz Issue Type: Bug Components: product, specialpurpose/ecommerce Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Priority: Minor Attachments: OFBIZ-5799.patch After mounting ecommerce as root web app, I got ScreenRenderException, caused by StringIndexOutOfBoundsException: String index out of range: -1 at org.ofbiz.product.category.CatalogUrlServlet.makeCatalogUrl(CatalogUrlServlet.java:186) Categories and products cannot be rendered. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-5791) CommonUiLabels.xml - malformed XML
Josip Almasi created OFBIZ-5791: --- Summary: CommonUiLabels.xml - malformed XML Key: OFBIZ-5791 URL: https://issues.apache.org/jira/browse/OFBIZ-5791 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Priority: Trivial Whoever deleted Shark didn't do it well:) There's still a line in CommonUiLabels, value xml:lang=csShark/value without property enclosure. This doesn't affect ofbiz in anyway. It did affect a script of mine though. Still, it's a malformed XML. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5791) CommonUiLabels.xml - malformed XML
[ https://issues.apache.org/jira/browse/OFBIZ-5791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5791: Attachment: OFBIZ-5791.patch removes shark line CommonUiLabels.xml - malformed XML -- Key: OFBIZ-5791 URL: https://issues.apache.org/jira/browse/OFBIZ-5791 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 13.07 Reporter: Josip Almasi Priority: Trivial Attachments: OFBIZ-5791.patch Whoever deleted Shark didn't do it well:) There's still a line in CommonUiLabels, value xml:lang=csShark/value without property enclosure. This doesn't affect ofbiz in anyway. It did affect a script of mine though. Still, it's a malformed XML. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5772) add html/xhtml lang tag
[ https://issues.apache.org/jira/browse/OFBIZ-5772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14138702#comment-14138702 ] Josip Almasi commented on OFBIZ-5772: - Cause I have no clue what's this for:) add html/xhtml lang tag --- Key: OFBIZ-5772 URL: https://issues.apache.org/jira/browse/OFBIZ-5772 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Assignee: Jacques Le Roux Priority: Minor Labels: patch Attachments: ecommerce-lang.patch There is no locale string present in any ecommerce pages. Thus, crawlers can't determine page language just like that, IOW google will not index web shop just like that, so users can't apply to adsense, etc etc. Note that locale (x/html lang) is present in backoffice pages. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-5772) add html/xhtml lang tag
Josip Almasi created OFBIZ-5772: --- Summary: add html/xhtml lang tag Key: OFBIZ-5772 URL: https://issues.apache.org/jira/browse/OFBIZ-5772 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: 12.04.05, 12.04.04 Reporter: Josip Almasi Priority: Minor There is no locale string present in any ecommerce pages. Thus, crawlers can't determine page language just like that, IOW google will not index web shop just like that, so users can't apply to adsense, etc etc. Note that locale (x/html lang) is present in backoffice pages. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5772) add html/xhtml lang tag
[ https://issues.apache.org/jira/browse/OFBIZ-5772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5772: Attachment: ecommerce-lang.patch This patch modifies specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl by adding html/xhtml lang tag with value taken from request locale (UtilHttp.getLocale()). add html/xhtml lang tag --- Key: OFBIZ-5772 URL: https://issues.apache.org/jira/browse/OFBIZ-5772 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Priority: Minor Labels: patch Attachments: ecommerce-lang.patch There is no locale string present in any ecommerce pages. Thus, crawlers can't determine page language just like that, IOW google will not index web shop just like that, so users can't apply to adsense, etc etc. Note that locale (x/html lang) is present in backoffice pages. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm
[ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14136201#comment-14136201 ] Josip Almasi commented on OFBIZ-4412: - ... and I also had to modify specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl in order to add html/xhtml lang: https://issues.apache.org/jira/browse/OFBIZ-5772 Now I'm not sure about dependencies here. I had to apply all three to get what I needed - single store with multiple languages and currencies. Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm --- Key: OFBIZ-4412 URL: https://issues.apache.org/jira/browse/OFBIZ-4412 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: Trunk Environment: Not specific Reporter: mz4wheeler Priority: Trivial Labels: patch Attachments: OFBIZ-4412.patch Original Estimate: 2h Remaining Estimate: 2h Using the specified patch, it is now possible to set a users initial Locale (and even currency) based on the webapp mount point. This works with a single store, and does not require the use virtual hosts. This is especially useful when setting up sitemap.xml, which allows crawlers (like google) to correctly locate and traverse products and services in multiple languages. Here is an example where ecomclone has been modified to Locale=fr with a mount point of /fr. specialpurpose/ecommerce/ofbiz-component.xml: !-- init-param name=Currency value=EUR/ -- webapp name=ecommerce title=eCommerce server=default-server location=webapp/ecommerce mount-point=/ecommerce app-bar-display=false /webapp webapp name=ecomclone title=eCommerce Clone server=default-server location=webapp/ecomclone mount-point=/fr--- SPECIFY MOUNT app-bar-display=false init-param name=Locale value=fr/ --- SPECIFY LOCALE /webapp The below sitemap.xml would allow products with the /fr path to be indexed in french. ?xml version=1.0 encoding=UTF-8? urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9; urllochttp://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ/loc/url urllochttp://ofbizsite.com/fr/products/10002/p_1001TANGRAMPUZ/loc/url /urlset The patch: The attached patch modifies setDefaultStoreSettings in ProductEvents.java, which is called once during the initial session creation. After a user enters the URL, they are still free to modify the language, as long as the page supports it (like the default demo store). The patch also allows the Currency to be forced as well, and it does appear to work, but should be more throughly tested. Although this patch bypasses the requirement for multiple stores, there may be issues with other aspects of the store, like emails. However, it is no different than a user who enters your English-based ecommerce store, selects french, and attempts a checkout. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm
[ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14132612#comment-14132612 ] Josip Almasi commented on OFBIZ-4412: - Sorry Mike, your patch is fine, my bad. Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm --- Key: OFBIZ-4412 URL: https://issues.apache.org/jira/browse/OFBIZ-4412 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: Trunk Environment: Not specific Reporter: mz4wheeler Priority: Trivial Labels: patch Attachments: OFBIZ-4412.patch Original Estimate: 2h Remaining Estimate: 2h Using the specified patch, it is now possible to set a users initial Locale (and even currency) based on the webapp mount point. This works with a single store, and does not require the use virtual hosts. This is especially useful when setting up sitemap.xml, which allows crawlers (like google) to correctly locate and traverse products and services in multiple languages. Here is an example where ecomclone has been modified to Locale=fr with a mount point of /fr. specialpurpose/ecommerce/ofbiz-component.xml: !-- init-param name=Currency value=EUR/ -- webapp name=ecommerce title=eCommerce server=default-server location=webapp/ecommerce mount-point=/ecommerce app-bar-display=false /webapp webapp name=ecomclone title=eCommerce Clone server=default-server location=webapp/ecomclone mount-point=/fr--- SPECIFY MOUNT app-bar-display=false init-param name=Locale value=fr/ --- SPECIFY LOCALE /webapp The below sitemap.xml would allow products with the /fr path to be indexed in french. ?xml version=1.0 encoding=UTF-8? urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9; urllochttp://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ/loc/url urllochttp://ofbizsite.com/fr/products/10002/p_1001TANGRAMPUZ/loc/url /urlset The patch: The attached patch modifies setDefaultStoreSettings in ProductEvents.java, which is called once during the initial session creation. After a user enters the URL, they are still free to modify the language, as long as the page supports it (like the default demo store). The patch also allows the Currency to be forced as well, and it does appear to work, but should be more throughly tested. Although this patch bypasses the requirement for multiple stores, there may be issues with other aspects of the store, like emails. However, it is no different than a user who enters your English-based ecommerce store, selects french, and attempts a checkout. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-5765) missing request map for changing currency
[ https://issues.apache.org/jira/browse/OFBIZ-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14131167#comment-14131167 ] Josip Almasi commented on OFBIZ-5765: - Yep, 4412 depends on shopping cart taking currency from session. I think I tracked root problem, possibly fixed: https://issues.apache.org/jira/browse/OFBIZ-5767 missing request map for changing currency - Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: ecommerce-multicurrency.patch By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. The patch to add mapping attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5767) WebShoppingCart ignores session currency
[ https://issues.apache.org/jira/browse/OFBIZ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5767: Attachment: shoppingcart-currency.patch After testing - correct patch attached. WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: shoppingcart-currency.patch, shoppingcart-currency.patch This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5767) WebShoppingCart ignores session currency
[ https://issues.apache.org/jira/browse/OFBIZ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5767: Attachment: (was: shoppingcart-currency.patch) WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: shoppingcart-currency.patch This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm
[ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14131639#comment-14131639 ] Josip Almasi commented on OFBIZ-4412: - I can confirm this works - *after* fixing shopping cart currency: https://issues.apache.org/jira/browse/OFBIZ-5767 Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm --- Key: OFBIZ-4412 URL: https://issues.apache.org/jira/browse/OFBIZ-4412 Project: OFBiz Issue Type: Improvement Components: specialpurpose/ecommerce Affects Versions: Trunk Environment: Not specific Reporter: mz4wheeler Priority: Trivial Labels: patch Attachments: OFBIZ-4412.patch Original Estimate: 2h Remaining Estimate: 2h Using the specified patch, it is now possible to set a users initial Locale (and even currency) based on the webapp mount point. This works with a single store, and does not require the use virtual hosts. This is especially useful when setting up sitemap.xml, which allows crawlers (like google) to correctly locate and traverse products and services in multiple languages. Here is an example where ecomclone has been modified to Locale=fr with a mount point of /fr. specialpurpose/ecommerce/ofbiz-component.xml: !-- init-param name=Currency value=EUR/ -- webapp name=ecommerce title=eCommerce server=default-server location=webapp/ecommerce mount-point=/ecommerce app-bar-display=false /webapp webapp name=ecomclone title=eCommerce Clone server=default-server location=webapp/ecomclone mount-point=/fr--- SPECIFY MOUNT app-bar-display=false init-param name=Locale value=fr/ --- SPECIFY LOCALE /webapp The below sitemap.xml would allow products with the /fr path to be indexed in french. ?xml version=1.0 encoding=UTF-8? urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9; urllochttp://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ/loc/url urllochttp://ofbizsite.com/fr/products/10002/p_1001TANGRAMPUZ/loc/url /urlset The patch: The attached patch modifies setDefaultStoreSettings in ProductEvents.java, which is called once during the initial session creation. After a user enters the URL, they are still free to modify the language, as long as the page supports it (like the default demo store). The patch also allows the Currency to be forced as well, and it does appear to work, but should be more throughly tested. Although this patch bypasses the requirement for multiple stores, there may be issues with other aspects of the store, like emails. However, it is no different than a user who enters your English-based ecommerce store, selects french, and attempts a checkout. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5767) WebShoppingCart ignores session currency
[ https://issues.apache.org/jira/browse/OFBIZ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5767: Attachment: shoppingcart-currency.patch WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: shoppingcart-currency.patch This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5767) WebShoppingCart ignores session currency
[ https://issues.apache.org/jira/browse/OFBIZ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5767: Attachment: (was: shoppingcart-currency.patch) WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: shoppingcart-currency.patch This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-5767) WebShoppingCart ignores session currency
Josip Almasi created OFBIZ-5767: --- Summary: WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.05, 12.04.04 Reporter: Josip Almasi This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5767) WebShoppingCart ignores session currency
[ https://issues.apache.org/jira/browse/OFBIZ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5767: Description: This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. was: This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5767) WebShoppingCart ignores session currency
[ https://issues.apache.org/jira/browse/OFBIZ-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5767: Attachment: shoppingcart-currency.patch This sets shopping cart currency to one from http session, on any calls to getCartObject(). Hopefully it will allow the cart to refresh currency to one set in session. Also, removed some dead code. WebShoppingCart ignores session currency Key: OFBIZ-5767 URL: https://issues.apache.org/jira/browse/OFBIZ-5767 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: shoppingcart-currency.patch This is how WebShoppingCart constructor calls ShoppingCart constructor: (currencyUom != null ? currencyUom : ProductStoreWorker.getStoreCurrencyUomId(request)), WebShoppingCart constructor is called only from getCartObject(HttpServletRequest request, Locale locale, String currencyUom) which is called only from getCartObject(HttpServletRequest request) with null locale and currency. So, during WebShoppingCart creation, currency is always set to ProductStoreWorker.getStoreCurrencyUomId(request) This method in turn calls UtilHttp.getCurrencyUom(), which makes a number of attempts to find proper currency, with first attempt being session attribute currencyUom. This is a chicken-egg problem though: first-time user does not have currencyUom attribute set, and WebShoppingCart is created immediatelly. But once created, nothing ever calls ShoppingCart.setCurrency()! The bug is in ShoppingCartEvents.getCartObject(): if (cart == null) { cart = new WebShoppingCart(request, locale, currencyUom); session.setAttribute(shoppingCart, cart); } else { if (locale != null !locale.equals(cart.getLocale())) { cart.setLocale(locale); } if (currencyUom != null !currencyUom.equals(cart.getCurrency())) { Well, currencyUom parameter is always null. If null, it needs to be taken from request parameter, or even better, to go thru entire UtilHttp.getCurrency() thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (OFBIZ-5765) missing request map for changing currency
Josip Almasi created OFBIZ-5765: --- Summary: missing request map for changing currency Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.05, 12.04.04 Reporter: Josip Almasi By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are not mapped to any requests in eccommerce controller.xml. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5765) missing request map for changing currency
[ https://issues.apache.org/jira/browse/OFBIZ-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5765: Description: By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: {{monospaced}} div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 {{monospaced}} I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. was: By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: {monospaced} div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 {monospaced} I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. missing request map for changing currency - Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: {{monospaced}} div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 {{monospaced}} I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5765) missing request map for changing currency
[ https://issues.apache.org/jira/browse/OFBIZ-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5765: Description: By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: .bq div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. was: By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: {{monospaced}} div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 {{monospaced}} I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. missing request map for changing currency - Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: .bq div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5765) missing request map for changing currency
[ https://issues.apache.org/jira/browse/OFBIZ-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5765: Attachment: ecommerce-multicurrency.patch Fixes ecommerce controller.xml by including servlet mapping to set shopping cart currency. missing request map for changing currency - Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: ecommerce-multicurrency.patch By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (OFBIZ-5765) missing request map for changing currency
[ https://issues.apache.org/jira/browse/OFBIZ-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josip Almasi updated OFBIZ-5765: Description: By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. The patch to add mapping attached. was: By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. missing request map for changing currency - Key: OFBIZ-5765 URL: https://issues.apache.org/jira/browse/OFBIZ-5765 Project: OFBiz Issue Type: Bug Components: specialpurpose/ecommerce Affects Versions: 12.04.04, 12.04.05 Reporter: Josip Almasi Attachments: ecommerce-multicurrency.patch By analyzing eccommerce controller.xml and appropriate java code, I found out there is a way to set session currency, with a get request: ECOMMERCEURL/control/setSessionCurrencyUom?currencyUom=UOMID However, shopping cart igores session currency. That can be demonstrated by changing minicart.ftl, like this: div id=minicart h3${uiLabelMap.OrderCartSummary} ${Request.currencyUomId} ${shoppingCart.getCurrency()} @ofbizCurrency amount=shoppingCart.getDisplayGrandTotal() isoCode=shoppingCart.getCurrency()//h3 I also found methods in place to set shopping cart currency, just, they are were mapped to any requests in eccommerce controller.xml. The patch to add mapping attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)