webgriffe / Webgriffe_Multiwarehouse

Magento Multiwarehouse Module - developed as proof of concept during the Workshop of Mageday::2014
21 stars 10 forks source link

When create new product an error has occurred. #1

Closed lzqwebsoft closed 9 years ago

lzqwebsoft commented 9 years ago

When I choose to create default and simple product.then click next button an error has occurred, like this: non-object That said you can't check the $this->getProduct()->getStockItem() be null: checked File Is: community\Webgriffe\Multiwarehouse\Block\Adminhtml\Qty.php So I Changed: changed

Then anything be Ok: multiple

Thank you, This multi-warehouse plugin is great!

lzqwebsoft commented 9 years ago

Has another error occurred, When I create new product, and entry qty for different warehouse, then chick save button, like this: constraint which meaning the product_id is invalid. I try to logout the value: $product->getId(), which output null. This error has occurred is because of your listening the catalog_product_save_before event. In there you cannot get the new product id before saving. So I change the config.xml for listening custom event : adminhtml_product_save_after: custom_event And change core controller:Mage_Adminhtml_Catalog_ProductController: core_controller Last updated the method handleMultipleQuantitiesPost() in Webgriffe_Multiwarehouse_Model_Observer: stock_item

Hope you can understand,My English is poor.

lzqwebsoft commented 9 years ago

My Magento version is 1.9.0.1.

aleron75 commented 9 years ago

Hi lzqwebsoft, thank you for spotting out some issues. We will address them and give you a response as soon as possible.

aleron75 commented 9 years ago

Hi, I've fixed and pushed the issues as you indicated, thank you!