Building a New Website Using "ecommerce"

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

Building a New Website Using "ecommerce"

OfBizSuds

I am planning to use Ofbiz to create an ecommerce website.

I believe I should be able to use a copy of the ofbiz ecommerce application; only change css & ftl files to be up & running quickly. But, since the ecommerce application is quite large I am a bit lost as to where to begin!

I am a web developer and have been through the tutorials on Open Source website.

Can someone point me the right direction? I do not have funds to purchase books at this point.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

Patrick-4
Well you didn't ask any specific questions, if you want to change a
page just do view source and see where all the code is coming from.
The source is filled with markers like this.
<!-- Begin Screen component://ecommerce/widget/CommonScreens.xml#main -->

Log into the application as admin and go to Catalog -> Stores.  Also
look at webtools -> interactive entity
That should give you a little direction.


On Fri, Jul 30, 2010 at 4:19 AM, OfBizSuds <[hidden email]> wrote:

>
>
> I am planning to use Ofbiz to create an ecommerce website.
>
> I believe I should be able to use a copy of the ofbiz ecommerce application;
> only change css & ftl files to be up & running quickly. But, since the
> ecommerce application is quite large I am a bit lost as to where to begin!
>
> I am a web developer and have been through the tutorials on Open Source
> website.
>
> Can someone point me the right direction? I do not have funds to purchase
> books at this point.
>
> Thanks!
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Building-a-New-Website-Using-ecommerce-tp2307761p2307761.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
In reply to this post by OfBizSuds
the best place to start is
specialpurpose\ecommerce\webapp\ecommerce\index.jsp
and wade through the code, learn where things are located.
Understanding how Tomcat Webapps works helps.
in ofbiz we use widgets
specialpurpose\ecommerce\widget
and FTL's to generate pages.
The look and feel is created by the
themes\multiflex
look at the data files to see what all is entailed.



OfBizSuds sent the following on 7/30/2010 2:19 AM:

>
>
> I am planning to use Ofbiz to create an ecommerce website.
>
> I believe I should be able to use a copy of the ofbiz ecommerce application;
> only change css&  ftl files to be up&  running quickly. But, since the
> ecommerce application is quite large I am a bit lost as to where to begin!
>
> I am a web developer and have been through the tutorials on Open Source
> website.
>
> Can someone point me the right direction? I do not have funds to purchase
> books at this point.
>
> Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

OfBizSuds
In reply to this post by OfBizSuds
Actually I need to customize the main page of the website Plus also have some specific needs  as described below

I have a requirement to capture more attributes (say favorite cuisine) than default for customers of my website. Is it ok to add more fields to the Party entity??

I am planning to change newcustomer.ftl for capturing the new field. The new field values would be actually selected by the user from a dropdown list of cuisines.

So basically I would also have to add an new entity called "CUISINES".

How do I go about doing this? Where do I add the new entity - in the entitydef folder?? And the data goes in data folder??

Please help.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
I suggest you become familiar with the data model.
you can do this by using webtools
however if you going to make mods I suggest you create a new component.
./ant create-component
this way you can get updates from the svn and not overwrite you mods.


OfBizSuds sent the following on 7/30/2010 9:24 AM:

>
> Actually I need to customize the main page of the website Plus also have some
> specific needs  as described below
>
> I have a requirement to capture more attributes (say favorite cuisine) than
> default for customers of my website. Is it ok to add more fields to the
> Party entity??
>
> I am planning to change newcustomer.ftl for capturing the new field. The new
> field values would be actually selected by the user from a dropdown list of
> cuisines.
>
> So basically I would also have to add an new entity called "CUISINES".
>
> How do I go about doing this? Where do I add the new entity - in the
> entitydef folder?? And the data goes in data folder??
>
> Please help.
>
> Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

OfBizSuds
Thank you BJ, I will look at the data model.

One question, suppose I copy the ecommerce folder into hot-deploy & try to modify files in it, what should I change in the copy ofbiz-component.xml file so that when I test
http://localhost:8080/ecommerce/control/main it opens the copy instead of the original?
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

rajsaini
Best way to do it is to use the OFbiz extension model.

1. Create a new component in the hot-deploy either using 'ant
create-component' or manually.
2. Extend the controller.xml from e-commerce controller. Look at how
this is done for ecomclone application in the c-commerce componet.
3. Now you can add your own request-map/view-map to the controller. You
can also override the e-commerce request maps and view maps by adding
them with the same name.
4. Add the screens you wants int he widget folder. These screens will be
referred in your view maps
5. Add the freemarker templates you want to change. These freemarker
templates will be referred in your screens.

Following the above will help you to use the existing funcatinlaity of
e-commerce component and at the same time add your own changes. You can
keep this component in your local source repository.

Thanks,

Raj

On 31/07/10 09:08, OfBizSuds wrote:
> Thank you BJ, I will look at the data model.
>
> One question, suppose I copy the ecommerce folder into hot-deploy&  try to
> modify files in it, what should I change in the copy ofbiz-component.xml
> file so that when I test
> http://localhost:8080/ecommerce/control/main it opens the copy instead of
> the original?
>    

Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
In reply to this post by OfBizSuds
As suggested use the ./ant create-component saves a lot of work.
there is about a month worth of you understanding ofbiz to accomplish
your task.
ofbiz is not just a database websites like oscommerce.
you will have to either create, replace or extend an entity. for your
one field. I suggest you find a entity that is has types you can add but
not change the model.
you will then have to change the createcustomer service or add an SECA
then modify the groovy that marshals the data to display.
this is beyond the mailing list to support.

lastly please include previous emails on a subject since they effect the
answer someone will give.
this is best done by subscribing to the mailing list. you can find how
from the main page of ofbiz.



OfBizSuds sent the following on 7/30/2010 8:38 PM:
>
> Thank you BJ, I will look at the data model.
>
> One question, suppose I copy the ecommerce folder into hot-deploy&  try to
> modify files in it, what should I change in the copy ofbiz-component.xml
> file so that when I test
> http://localhost:8080/ecommerce/control/main it opens the copy instead of
> the original?
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

OfBizSuds
In reply to this post by rajsaini
Thank you so much Raj, that was really helpful. I followed your model & have got quite a few things working as per our requirements.

It would be great if you could also provide some steps on how to go about adding new entities (tables).
Also if we need to capture more fields for the customer table where should we add these?? It's probably not recommended to change the existing Data Model correct?

Suppose instead of Derby we want to use MySQL, is that easy to do??

Appreciate your help,

Sudha
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

rajsaini
Hi Sudha,

I would suggest you to look around in the data model before attempting
to introduce new tables and new columns to existing table. OFBiz data
model is so vast that it will fit into most of the requirements. You can
look around in the "Webtools" application to learn about the data model.

However, if you really need add new tables, you can define your own
entities. Look around in the entitydef folders in various applications.
If you need to modify the existing one, search around how to extend the
entities. Sorry, I do not have the exact code, but I am sure you can
find many examples in the OFbiz.

OFBiz supports multiple databases out of the box. You can do that in
${ofbiz.home}/entity/config/entityengine.xml file. Also, dont forget to
copy your correct JDBC jar in ${ofbiz.home}/entity/lib/jdbc folder.

I would also suggest you to read Business Setup and Technical Setup
guides on Documentation section. These are great source of information.

Thanks,

Raj
On 04/08/10 17:21, OfBizSuds wrote:

> Thank you so much Raj, that was really helpful. I followed your model&  have
> got quite a few things working as per our requirements.
>
> It would be great if you could also provide some steps on how to go about
> adding new entities (tables).
> Also if we need to capture more fields for the customer table where should
> we add these?? It's probably not recommended to change the existing Data
> Model correct?
>
> Suppose instead of Derby we want to use MySQL, is that easy to do??
>
> Appreciate your help,
>
> Sudha
>    

Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

OfBizSuds
Thanks again Raj. I think I can achieve my application specific requirement using the existing Data Model itself.

But I am running into some problem. Hopefully someone can help me.

My requirement is that for every user I need to save their favorite restaurant. In order to try out the back end I did the following.

So I
* created a user from ecommerce app - got created with PartyId = 10000

Then, through webtools I
* created an entry "RESTAURANT" in PartyType
* added a sample restaurant called "RESTAURANT1" to Party table with PartyType = "RESTAURANT"
* created an entry "RESTAURANT" in RoleType
* created an entry "RESTAURANT1" to PartyRole table with RoleType = "RESTAURANT"
* created an entry "FAVORITE_RESTAURANT" in PartyRelationshipType table

These went fine but the following is causing a problem
* on trying to create an entry in PartyRelationship for PartyIdFrom = 10000; PartyIdTo = "RESTAURANT1";
roleTypeIdFrom = "PERSON"; roleTypeIdTo = "RESTAURANT"; partyRelationshipTypeId = "FAVORITE_RESTAURANT"

This is the error message

For Entity: PartyRelationship
With PK: [GenericEntity:PartyRelationship][fromDate,2010-07-03 11:16:29.0(java.sql.Timestamp)][partyIdFrom,10000(java.lang.String)][partyIdTo,RESTAURANT1(java.lang.String)][roleTypeIdFrom,PERSON(java.lang.String)][roleTypeIdTo,RESTAURANT(java.lang.String)]

Any ideas??
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

rajsaini
I found setting up the PartyRelationship through UI a bit tricky. I am
not suggesting that UI is not good, but I could not grasp it well. I
suggest that you look into the PartyReltionship demo data and create it
through entityengine xml. This will give you the idea how they are setup
and then you will be able to use the UI.

Thanks,

Raj

On 06/08/10 18:50, OfBizSuds wrote:

> Thanks again Raj. I think I can achieve my application specific requirement
> using the existing Data Model itself.
>
> But I am running into some problem. Hopefully someone can help me.
>
> My requirement is that for every user I need to save their favorite
> restaurant. In order to try out the back end I did the following.
>
> So I
> * created a user from ecommerce app - got created with PartyId = 10000
>
> Then, through webtools I
> * created an entry "RESTAURANT" in PartyType
> * added a sample restaurant called "RESTAURANT1" to Party table with
> PartyType = "RESTAURANT"
> * created an entry "RESTAURANT" in RoleType
> * created an entry "RESTAURANT1" to PartyRole table with RoleType =
> "RESTAURANT"
> * created an entry "FAVORITE_RESTAURANT" in PartyRelationshipType table
>
> These went fine but the following is causing a problem
> * on trying to create an entry in PartyRelationship for PartyIdFrom = 10000;
> PartyIdTo = "RESTAURANT1";
> roleTypeIdFrom = "PERSON"; roleTypeIdTo = "RESTAURANT";
> partyRelationshipTypeId = "FAVORITE_RESTAURANT"
>
> This is the error message
>
> For Entity: PartyRelationship
> With PK: [GenericEntity:PartyRelationship][fromDate,2010-07-03
> 11:16:29.0(java.sql.Timestamp)][partyIdFrom,10000(java.lang.String)][partyIdTo,RESTAURANT1(java.lang.String)][roleTypeIdFrom,PERSON(java.lang.String)][roleTypeIdTo,RESTAURANT(java.lang.String)]
>
> Any ideas??
>
>    

Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
In reply to this post by OfBizSuds
A restruant is a facility so you would add a facility type for it.
you can associate a party to a facitility with current code and ui. this
lets then list all the restruants they go to.
you can have a partyrelationship role of FavoriteRestruant.



OfBizSuds sent the following on 8/6/2010 6:20 AM:

>
> Thanks again Raj. I think I can achieve my application specific requirement
> using the existing Data Model itself.
>
> But I am running into some problem. Hopefully someone can help me.
>
> My requirement is that for every user I need to save their favorite
> restaurant. In order to try out the back end I did the following.
>
> So I
> * created a user from ecommerce app - got created with PartyId = 10000
>
> Then, through webtools I
> * created an entry "RESTAURANT" in PartyType
> * added a sample restaurant called "RESTAURANT1" to Party table with
> PartyType = "RESTAURANT"
> * created an entry "RESTAURANT" in RoleType
> * created an entry "RESTAURANT1" to PartyRole table with RoleType =
> "RESTAURANT"
> * created an entry "FAVORITE_RESTAURANT" in PartyRelationshipType table
>
> These went fine but the following is causing a problem
> * on trying to create an entry in PartyRelationship for PartyIdFrom = 10000;
> PartyIdTo = "RESTAURANT1";
> roleTypeIdFrom = "PERSON"; roleTypeIdTo = "RESTAURANT";
> partyRelationshipTypeId = "FAVORITE_RESTAURANT"
>
> This is the error message
>
> For Entity: PartyRelationship
> With PK: [GenericEntity:PartyRelationship][fromDate,2010-07-03
> 11:16:29.0(java.sql.Timestamp)][partyIdFrom,10000(java.lang.String)][partyIdTo,RESTAURANT1(java.lang.String)][roleTypeIdFrom,PERSON(java.lang.String)][roleTypeIdTo,RESTAURANT(java.lang.String)]
>
> Any ideas??
>
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
another approach is to usethe comments of party and prefreces the
comment with FavoriteRestraunt:
so then you only display the comment with that tag.

BJ Freeman sent the following on 8/6/2010 8:30 AM:

> A restruant is a facility so you would add a facility type for it.
> you can associate a party to a facitility with current code and ui. this
> lets then list all the restruants they go to.
> you can have a partyrelationship role of FavoriteRestruant.
>
>
>
> OfBizSuds sent the following on 8/6/2010 6:20 AM:
>>
>> Thanks again Raj. I think I can achieve my application specific
>> requirement
>> using the existing Data Model itself.
>>
>> But I am running into some problem. Hopefully someone can help me.
>>
>> My requirement is that for every user I need to save their favorite
>> restaurant. In order to try out the back end I did the following.
>>
>> So I
>> * created a user from ecommerce app - got created with PartyId = 10000
>>
>> Then, through webtools I
>> * created an entry "RESTAURANT" in PartyType
>> * added a sample restaurant called "RESTAURANT1" to Party table with
>> PartyType = "RESTAURANT"
>> * created an entry "RESTAURANT" in RoleType
>> * created an entry "RESTAURANT1" to PartyRole table with RoleType =
>> "RESTAURANT"
>> * created an entry "FAVORITE_RESTAURANT" in PartyRelationshipType table
>>
>> These went fine but the following is causing a problem
>> * on trying to create an entry in PartyRelationship for PartyIdFrom =
>> 10000;
>> PartyIdTo = "RESTAURANT1";
>> roleTypeIdFrom = "PERSON"; roleTypeIdTo = "RESTAURANT";
>> partyRelationshipTypeId = "FAVORITE_RESTAURANT"
>>
>> This is the error message
>>
>> For Entity: PartyRelationship
>> With PK: [GenericEntity:PartyRelationship][fromDate,2010-07-03
>> 11:16:29.0(java.sql.Timestamp)][partyIdFrom,10000(java.lang.String)][partyIdTo,RESTAURANT1(java.lang.String)][roleTypeIdFrom,PERSON(java.lang.String)][roleTypeIdTo,RESTAURANT(java.lang.String)]
>>
>>
>> Any ideas??
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

OfBizSuds
Thank you BJ & Raj,

Showing the list of restaurants on NewCustomer.ftl finally started to work. whew!

Unable to figure out how to programatically save PartyRelationship for CUSTOMER to FAVORITE_RESTAURANT.

I think I need to do this in CustomerEvents.xml but its calling methods all over the place & I just can't get the code which I can call for saving PartyRelationship.

Any pointers will be great.

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
if your using partyrelationship then you show a relationship between to
parties.
so you have to have a page that either list all restaurants (Parties)
they can select or let them add a party for a restaurants.
you can use an SECA that triggers on createcustomer that then calls
create partyrelationsips



OfBizSuds sent the following on 8/10/2010 5:26 AM:

>
> Thank you BJ&  Raj,
>
> Showing the list of restaurants on NewCustomer.ftl finally started to work.
> whew!
>
> Unable to figure out how to programatically save PartyRelationship for
> CUSTOMER to FAVORITE_RESTAURANT.
>
> I think I need to do this in CustomerEvents.xml but its calling methods all
> over the place&  I just can't get the code which I can call for saving
> PartyRelationship.
>
> Any pointers will be great.
>
> Thanks!
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

OfBizSuds
Thanks Bj, But what's a Seca - is it an event? do you know where the code for create partyrelationship is? Is there a common method for  doing that?
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

Patrick-4
Why don't you debug into the code?   Personally I don't like
programming with the xml, I think you'd be better off programming a
Java service.

On Tue, Aug 10, 2010 at 11:52 AM, OfBizSuds <[hidden email]> wrote:
>
> Thanks Bj, But what's a Seca - is it an event? do you know where the code for
> create partyrelationship is? Is there a common method for  doing that?
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Building-a-New-Website-Using-ecommerce-tp2307761p2320099.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
In reply to this post by OfBizSuds
https://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide#ServiceEngineGuide-ecas

webtools is your friend
I go to the service list then use the browser find (CTRL F) and type in
the service.
then
https://demo-trunk.ofbiz.apache.org/webtools/control/ServiceList?sel_service_name=createPartyRelationship


OfBizSuds sent the following on 8/10/2010 9:52 AM:
>
> Thanks Bj, But what's a Seca - is it an event? do you know where the code for
> create partyrelationship is? Is there a common method for  doing that?
Reply | Threaded
Open this post in threaded view
|

Re: Building a New Website Using "ecommerce"

BJ Freeman
In reply to this post by Patrick-4
Patrick you will find that services can be both java or simple.
but why program when just a few lines for an EECA or SECA works.
there already CRUD services for the entities



Patrick sent the following on 8/10/2010 10:16 AM:

> Why don't you debug into the code?   Personally I don't like
> programming with the xml, I think you'd be better off programming a
> Java service.
>
> On Tue, Aug 10, 2010 at 11:52 AM, OfBizSuds<[hidden email]>  wrote:
>>
>> Thanks Bj, But what's a Seca - is it an event? do you know where the code for
>> create partyrelationship is? Is there a common method for  doing that?
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/Building-a-New-Website-Using-ecommerce-tp2307761p2320099.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
12