[jira] [Created] (OFBIZ-4412) Set initial ecommerce Local/Currencey based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

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

[jira] [Created] (OFBIZ-4412) Set initial ecommerce Local/Currencey based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
Set initial ecommerce Local/Currencey 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
         Environment: Not specific
            Reporter: mz4wheeler
            Priority: Trivial
             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk


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">
<url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
<url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4412) Set initial ecommerce Local/Currencey based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mz4wheeler updated OFBIZ-4412:
------------------------------

    Attachment: OFBIZ-4412.patch

> Set initial ecommerce Local/Currencey 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mz4wheeler updated OFBIZ-4412:
------------------------------

    Summary: Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm  (was: Set initial ecommerce Local/Currencey based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm)

> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104298#comment-13104298 ]

Dimitri Unruh commented on OFBIZ-4412:
--------------------------------------

In the productStore entity we already have defaultCurrencyUomId and defaultLocaleString.
Why do we need one more setting?

> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104711#comment-13104711 ]

mz4wheeler commented on OFBIZ-4412:
-----------------------------------

It is fairly easy to create a multi-language site in OFBiz using a SINGLE store.  The user can easily change the language by either clicking a flag icon or selecting a drop-down.  I also discovered that if you set the defaultLocale in the store to blank, then the users default locale can actually auto-select the correct locale if the language is supported by the OFBiz installation.  

So far so good.  Now try to get Google to index the products in anything other than the store's default locale.  You can't.

So if you want to support 5 languages, you MUST set up 5 completely independent stores.  Using the above method, you can setup multiple webapp clones (easy), and google and/or other crawler can correctly index your SINGLE store in as many languages as you want.  Also, once it is indexed, and a user clicks the URL, the users locale will automatically be set to the locale of the page.


> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105003#comment-13105003 ]

Anne Jessel commented on OFBIZ-4412:
------------------------------------

I presume this would also work with mount-point /au having locale en-AU, mount-point /us having locale en-US, and mount-point /gb having locale en-GB (and corresponding 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105026#comment-13105026 ]

mz4wheeler commented on OFBIZ-4412:
-----------------------------------

Yes, it should work (try it).  You would have to make sure that you have all of the current exchange rates entered in the accounting module for all the various currencies.

mount-point="/au"
<init-param name="Locale" value="en_AU"/>
<init-param name="Currency" value="AUD"/>

I noticed that when I briefly tested the currency, the shopping cart seems to correctly exchange currencies (from the foreign exchange rate table) but the products only display the price correctly if the product has a price entered in the currency.


> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105058#comment-13105058 ]

BJ Freeman commented on OFBIZ-4412:
-----------------------------------

Goggle search is pretty intelligent
from my logs it looks like it changes the locale before reading the page.

> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105997#comment-13105997 ]

Dimitri Unruh commented on OFBIZ-4412:
--------------------------------------

Just some notes:

* I really don't want create for every language/currency an independent store with a independent webapp and so on...
Just think abaout the whole maintenance :)
* Google doesn't set any locale information, but google can explore the language the current page is using

So, mz4wheeler, you are right. We have really a problem here. How can we tell google, that this is a multi-language website?

In my opinion the URLs must look like:
{code}
http://ofbizsite.com/ecommerce/fr/products/10002/p_1001TANGRAMPUZ
http://ofbizsite.com/ecommerce/de/products/10002/p_1001TANGRAMPUZ
http://ofbizsite.com/ecommerce/en/products/10002/p_1001TANGRAMPUZ
{code}

And also there are many other things you have resolve:
* canonical tag
* duplicate content
* site relation tag
* cloaking
* ....

So, it could be a really nice task :)


> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106549#comment-13106549 ]

mz4wheeler commented on OFBIZ-4412:
-----------------------------------

Thanks Dimitri.  I also believe that the single store solution is the best way to go.  

I've been trying to get the Currency to display properly, but is doesn't seem to work unless individual prices in the currency are entered for each product.  I really believe that only the default/list prices should be entered for the product (in default currency) and the displayed priced should be automatically calculated from the foreign exchange rate table.

In productdetail.ftl, price is set via:

<#assign price = priceMap?if_exists />

However, if the session currency is EUR, and the actual product store is USD, it doesn't correctly render (or calculate) the price, as I would like to expect.  However, add an item to the shopping cart, then view cart, and  there it is, in EUR (odd).

It would be great is someone with more OFBiz experience could figure this out.  It is probably a simple fix.

> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107259#comment-13107259 ]

Jacques Le Roux commented on OFBIZ-4412:
----------------------------------------

A look in archives might help, here are some related interesting threads
{quote}
4 feb 2007 http://markmail.org/message/ltxwhafxbgsnv4at
The main event for this in the ecommerce controller.xml file is "setSessionCurrencyUom".
-David

15 dec 2007 http://markmail.org/message/z65kcj6xsgoztcwz 
It seems from a quick investigation that setSessionCurrencyUom is available in
code but not (yet?) used in UI. I guess the idea is to use it if there is a need to allow user to choose his/her
currency else the currency is determined by the store currency. Hence in your case it seems that you needs 2 stores else price in GBP will never
show. Except if using setSessionCurrencyUom you implement a mean in UI for the user to choose himself/herself his/her currency.
Jacques

11 setp 2008 http://markmail.org/message/uinr5kjwjoucycwb
Yes, David is right. My anwser was for OFBiz OOTB. If you want to customise to
allow user to choose his/her currency have a look at setSessionCurrencyUom
Jacques

12 oct 2008 http://markmail.org/message/s4fnwkdt3m2cetsn
Suppose I changed currency from $ to £ now all products prices, whose currencies has been configured in £ will be displayed.
Problem come when we are on checkout screen as for shipping method cost is configured with single currency.
example: if shipping method cost is 20 $ then it will display 20 £ which is incorrect (its just change the sign not the value).
Please let me know is there a fix to it.
Regards, Abhishake

10 dec 2009 http://markmail.org/message/v53itkv6nqa3e5tj
You may have products with proces in any currency you want. But you need one
store for each currency. The rest of the workflow will follow, not sure how the accouting deal with that though...
Jacques () ascii ribbon campaign against HTML e-mail /\ www.asciiribbon.org
{quote}

If all problems are resolved at the UI level, you still have 2 choices:
# Set all prices by currencies by products  (fixed prices)
# or use foreign exchange rate table (dynamic prices). Then the problem is how and at which rate the foreign exchange rate table is updated.

For dynamic prices, consider this experience/advice:

{quote}
3 feb 2007 http://markmail.org/message/w22tm3ssdrnhl3nj
I've seen applications that use just 1 base/core currency for the entire store,
and just do a real-time calculation (say with *oanda exchange rate server*) when a
non-base/non-core currency is used.
Personally, I don't see many stores handling > 1 currency. Taking in "fixed
prices in foreign currencies" is actually quite bad for business, because that subjects the
business to forex fluctuations.
Imagine having a store with fixed price tags in EUR and in a currency
(fictitious for illustration) WildMoney that fluctuates like mad. Now imagine shoppers coming in
with WildMoney only on days when WildMoney is wildly weak against the EUR. This store will be
losing a lot of money!
Jonathon
{quote}

My personnal thought was (in the following message in thread)

{quote}
Yes I agree, and moreover sometimes prices are different according to countries
(typical for luxury goods). But in some case it may be usefull to use an exchange rate server.
Jacques
{quote}

In other words the choice between 1 & 2 depends on the domain (like a lot of choices). This does not mean that OFBiz OOTB should not provice those 2 choices... Interesting subject...

HTH





> 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: Release Branch 10.04, Release Branch 11.04, SVN trunk
>         Environment: Not specific
>            Reporter: mz4wheeler
>            Priority: Trivial
>              Labels: patch
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk
>
>         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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4412) Set initial ecommerce Locale/Currency based on mount point specified in specialpurpose/ecommerce/ofbiz-component.xm

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato updated OFBIZ-4412:
-------------------------------------

    Affects Version/s:     (was: Release Branch 11.04)
                           (was: Release Branch 10.04)
        Fix Version/s:     (was: Release Branch 11.04)
                           (was: Release Branch 10.04)
                           (was: SVN trunk)
   

> 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: SVN 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">
> <url><loc>http://ofbizsite.com/ecommerce/products/10002/p_1001TANGRAMPUZ</loc></url>
> <url><loc>http://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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira