I sucessfully installed the sonata ecommerce bundle into my project. But when I go into the product list from the admin dashboard I get the following error from doctrine.
An exception occurred while executing 'SELECT count(DISTINCT p0_.id)
AS sclr0 FROM product__product p0_ LEFT JOIN product__product_category p1_ ON p0_.id = p1_.product_id LEFT JOIN classification__category c2_ ON p1_.category_id = c2_.id LEFT JOIN product__product_collection p3_ ON p0_.id = p3_.product_id LEFT JOIN classification__collection c4_ ON p3_.collection_id = c4_.id WHERE p0_.product_type IN ()':
I dont know whats going on as media bundle and categories seems to be working fine so far.
Pretty simple actually. I stumbled upon this problem as well.
Create a Product type ( http://sonata-project.org/bundles/ecommerce/master/doc/reference/tutorials/create-product.html ) php app/console sonata:product:generate Bowl sonata.ecommerce_demo.product.bowl
import all resources
This being done, edit the src/Application/Sonata/ProductBundle/Entity/Bowl.php to make it inherits the Product class.
class Bowl extends Product {
}
Note: don't forget to import sonata_product.yml(which isn't mentioned in the doccumentation). Add - { resource: sonata/sonata_product.yml }
to your config.yml
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.