How to change an ecommerce .ftl file reusing the whole

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

How to change an ecommerce .ftl file reusing the whole

Bruno Busco
Hi,
as long as I go deeper and deeper in ofbiz I can appreciate the very good
design of this application.

Now I need to make a my own eshop module and I want to be sure I am using
all the re-use mechanism you have designed.
- I have created an eshop application under the hot-deploy, here I have all
my data files using the "ext" reader, with the data file I have defined my
show, website, facilities, catalogs and categories.
- In my eshop application, I have the controller.xml file that (as seen in
ecommerce clone example) includes the ecommerce application controller with
the line
<include
location="component://ecommerce/webapp/ecommerce/WEB-INF/controller.xml"/>

- In my eshop application there is also the images folder with a modified
copy of the ecommerce.css file and all required gif

Now I need little changes in some of the .ftl files. I want not to modify
the original files of the ecommerce application so that I can better follow
the development and update without conflicts.

Is there a mechanism that let me have one or more additional .ftl files in
my application and all standard .ftl under the original ecommerce?

For example:
I have changed the minilastviewedcategories.ftl. I would like to have a
modified copy of this file in my own application.
I can create a copy in my application but in order to make ofbiz using it I
need to local copy also all the other files in the chain that are:
CatalogScreens.xml, CommonScreens.xml and the controller.xml

Could anyone make some light for me on this?

Thank you

-Bruno
Reply | Threaded
Open this post in threaded view
|

Re: How to change an ecommerce .ftl file reusing the whole

rajsaini
I do the following in such situation.

1. Create new screens in the widget folder, generally copying similar
screen from the e-commerce.
2. Modify the required screen to include ftl in my application. It
removes the reference to e-commerce ftl file.
3. Add a view map, generally copying similar view-map from e-commerce
and modify it to point to newly created screen in my application instead
of e-commerce.

Copying similar screens from e-commerce helps me re-using most of the
action stuff (bsh, field definition etc).

Thanks,

Raj

Bruno Busco wrote:

> Hi,
> as long as I go deeper and deeper in ofbiz I can appreciate the very good
> design of this application.
>
> Now I need to make a my own eshop module and I want to be sure I am using
> all the re-use mechanism you have designed.
> - I have created an eshop application under the hot-deploy, here I have all
> my data files using the "ext" reader, with the data file I have defined my
> show, website, facilities, catalogs and categories.
> - In my eshop application, I have the controller.xml file that (as seen in
> ecommerce clone example) includes the ecommerce application controller with
> the line
> <include
> location="component://ecommerce/webapp/ecommerce/WEB-INF/controller.xml"/>
>
> - In my eshop application there is also the images folder with a modified
> copy of the ecommerce.css file and all required gif
>
> Now I need little changes in some of the .ftl files. I want not to modify
> the original files of the ecommerce application so that I can better follow
> the development and update without conflicts.
>
> Is there a mechanism that let me have one or more additional .ftl files in
> my application and all standard .ftl under the original ecommerce?
>
> For example:
> I have changed the minilastviewedcategories.ftl. I would like to have a
> modified copy of this file in my own application.
> I can create a copy in my application but in order to make ofbiz using it I
> need to local copy also all the other files in the chain that are:
> CatalogScreens.xml, CommonScreens.xml and the controller.xml
>
> Could anyone make some light for me on this?
>
> Thank you
>
> -Bruno
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: How to change an ecommerce .ftl file reusing the whole

Daniel Martínez-4
In reply to this post by Bruno Busco
Guess this is a message for the user's mailing list

Anyway, there goes my two cents:
I think you already have the answer. AFAIK there is no mechanism in
OfBiz to "overload" a request-map/view-map (which you'd need to change
the location of the widget XML file)

If I am not wrong you have two options:

1- Copy over the controller.xml file from ecommerce and make your local
changes.
2- Use a different request name for your modified screen than the original.

regards,
--
Daniel Martínez

Bruno Busco escribió:

> Hi,
> as long as I go deeper and deeper in ofbiz I can appreciate the very good
> design of this application.
>
> Now I need to make a my own eshop module and I want to be sure I am using
> all the re-use mechanism you have designed.
> - I have created an eshop application under the hot-deploy, here I have all
> my data files using the "ext" reader, with the data file I have defined my
> show, website, facilities, catalogs and categories.
> - In my eshop application, I have the controller.xml file that (as seen in
> ecommerce clone example) includes the ecommerce application controller with
> the line
> <include
> location="component://ecommerce/webapp/ecommerce/WEB-INF/controller.xml"/>
>
> - In my eshop application there is also the images folder with a modified
> copy of the ecommerce.css file and all required gif
>
> Now I need little changes in some of the .ftl files. I want not to modify
> the original files of the ecommerce application so that I can better follow
> the development and update without conflicts.
>
> Is there a mechanism that let me have one or more additional .ftl files in
> my application and all standard .ftl under the original ecommerce?
>
> For example:
> I have changed the minilastviewedcategories.ftl. I would like to have a
> modified copy of this file in my own application.
> I can create a copy in my application but in order to make ofbiz using it I
> need to local copy also all the other files in the chain that are:
> CatalogScreens.xml, CommonScreens.xml and the controller.xml
>
> Could anyone make some light for me on this?