Page 1 of 1

adding products thru admin platform

Posted: Thu Mar 29, 2012 11:57 am
by cs_ruk
I am trying to set up products in admin platform. I see that there are 3 product types. I am trying to out significance of base product since price etc can't be added.
When I try to add Shipping country, I am getting a Warn "Problem updating entity: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.mycompany.core.catalog.domain.MyCompanyProductImpl.shippingCountries", but when I click OK, it is not adding the country.

When I added product, the id assigned to the product is 950 but in sequence generator table I see 1050 and I noticed the same pattern for category, sku as well.

Re: adding products thru admin platform

Posted: Tue Apr 10, 2012 12:14 pm
by phillipuniverse
Which one of the Product types did you select? The reason you are seeing this is because the system figures out all the subclasses of Product (in this case) then shows them to you when you hit add. By default, Broadleaf comes with ProductImpl (baseProduct) and a subclass of ProductImpl, ProductSkuImpl (skuProduct) which has a OneToOne back to Sku. In the archetype, it provides an example subclass of ProductSkuImpl called MyCompanyProductImpl (My Company Product). So in your case, you would need to be adding Products of type "My Company Product" which has the relationship to ShippingCountry.

I believe the error that you are seeing is from selecting "baseProduct" or "skuProduct" instead of "My Company Product" when adding a product. Since neither of these entities have the 'shippingCountries' property, when you try to add a ShippingCountry to that product via that admin, it blows up. It should work if you select "My Company Product" in the product add.

Let me know if you still have issues.

Re: adding products thru admin platform

Posted: Thu Jul 05, 2012 4:51 am
by Raul89
my maven project had admn-war and site-war,i created them using:

mvn archetype:generate -DgroupId=com.mycompany -DartifactId=myecommerce-app -Dversion=1.0.0-SNAPSHOT -DpackageName=com.mycompany.ecommerce -DinteractiveMode=false -DarchetypeGroupId=org.broadleafcommerce -DarchetypeArtifactId=ecommerce-archetype -DarchetypeVersion=1.6.0-GA

the mycompany site doesnt have much functionality it directly comes up with two items and checkout functionality.Even if we try accessing various URLs same thing i get.
Then i downloaded a new demo site,linked it with the admin site with a common PostGre database.Whenever i add a new category it gets reflected on the site i downloaded but when i add a product i get :

Unable to add entity for org.broadleafcommerce.core.catalog.domain.ProductSkuImpl

But wen i refresh my site i am able to view the product in the category added but not in the admin :?

Re: adding products thru admin platform

Posted: Thu Jul 05, 2012 4:53 am
by Raul89
so i cant do any further changes on my products, i have tried many things like adding the distributed jars which came with the demo with dependencies and often this error when i access the categories in admin:

Unable to fetch results for org.broadleafcommerce.core.catalog.domain.CategoryProductXrefImpl