Git Product home page Git Product logo

magento-stock-movements's People

Contributors

jreinke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento-stock-movements's Issues

Unable to cancel order after a product has been deleted

  1. Set up a brand new 1.7 CE installation
  2. Created two test products
  3. Submitted an order with both products via the frontend
  4. Deleted one of the test products in the backend
  5. Re-indexed all the indices (just to make sure)
  6. Now when I click on Cancel to cancel the order in the backend, it says: The order has not been cancelled.
  7. In the exception log there is the following error:
    exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (db-1.bubble_stock_movement, CONSTRAINT FK_STOCK_MOVEMENT_ITEM FOREIGN KEY (item_id) REFERENCES cataloginventory_stock_item (item_id) ON DELETE CASCADE ON UPDATE CASCADE)' in /var/www/share/htdocs/lib/Zend/Db/Statement/Pdo.php:228

So I think what's happening is that the extension is trying to update the stock movement log for a product that doesn't exist anymore. Am I doing something wrong or could this be an issue with the extension?

magento-stock-movements for magento 2

Hi Johann Reinké,

Magento-stock-movements your module is very good for Magento 1 but I am searching this module for Magento 2, can you please give me the link for Magento 2, or can you develop for Magento 2 this module, if this is paid no problem, I am ready to purchase this.

So please provide me this magento-stock-movements module ASAP.

looking forward to your reply.

Orders with multiple products: loggin stocky history only in 1 product

Hi! This extension is great JR! Thank you very much!
I'm having a problem with orders with multiple products: for example, if a customer bought two products in a same order, the extension shows me all stock history of both products in one product, and no stock history in the other.

Error importing "Dataflow - Profiles"

Hi, nice work! Thanks for this extension.

To replicate the bug go to "System" -> "Import/Export" -> "Dataflow - Profiles".
Then choose "Import All Products".
On the "Import All Products" profile, at the left nav, go to "Upload File"
And choose the .csv file. I`m testing it with this file:

test.csv (utf8)

sku,category_ids
166A05,"6"

Then go to "Save and Continue Edit"

After that, at the left nav choose "Run Profile", select the recently uploaded file and submit "Run profile in Popup" and you will se the following error:

Fatal error: Call to undefined method Mage_Catalog_Model_Convert_Adapter_Product::getNextBunch() in /home/lamp/www/project/src/app/code/community/JR/StockHistory/Model/Stock/Observer.php on line 41 

Here is an image http://www.freeimagehosting.net/mj5ro

Regards

Issue with DB

It looks like I have found an issue. When you are trying to edit old orders with products which were delited from the catalogue a long time ago, I am gettin following issue:

a:5:{i:0;s:308:"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tankards.ru.bubble_stock_movement, CONSTRAINT FK_STOCK_MOVEMENT_ITEM FOREIGN KEY (item_id) REFERENCES cataloginventory_stock_item (item_id) ON DELETE CASCADE ON UPDATE CASCADE)";i:1;s:3231:"#0 /var/www/tankards.ru/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/tankards.ru/htdocs/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/tankards.ru/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/tankards.ru/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO bu...', Array) #4 /var/www/tankards.ru/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO bu...', Array)
#5 /var/www/tankards.ru/htdocs/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `bu...', Array)
#6 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(453): Zend_Db_Adapter_Abstract->insert('bubble_stock_mo...', Array)
#7 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Bubble_StockMovements_Model_Stock_Movement))
#8 /var/www/tankards.ru/htdocs/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(134): Mage_Core_Model_Abstract->save()
#9 /var/www/tankards.ru/htdocs/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(36): Bubble_StockMovements_Model_Stock_Observer->insertStockMovement(Object(Mage_CatalogInventory_Model_Stock_Item), 'Product restock...')
#10 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Model/App.php(1338): Bubble_StockMovements_Model_Stock_Observer->cancelOrderItem(Object(Varien_Event_Observer))
#11 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Bubble_StockMovements_Model_Stock_Observer), 'cancelOrderItem', Object(Varien_Event_Observer))
#12 /var/www/tankards.ru/htdocs/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('sales_order_ite...', Array)
#13 /var/www/tankards.ru/htdocs/app/code/core/Mage/Sales/Model/Order/Item.php(512): Mage::dispatchEvent('sales_order_ite...', Array)
#14 /var/www/tankards.ru/htdocs/app/code/core/Mage/Sales/Model/Order.php(1164): Mage_Sales_Model_Order_Item->cancel()
#15 /var/www/tankards.ru/htdocs/app/code/core/Mage/Sales/Model/Order.php(1137): Mage_Sales_Model_Order->registerCancellation()
#16 /var/www/tankards.ru/htdocs/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(359): Mage_Sales_Model_Order->cancel()
#17 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Sales_OrderController->massCancelAction()
#18 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('massCancel')
#19 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /var/www/tankards.ru/htdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#21 /var/www/tankards.ru/htdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#22 /var/www/tankards.ru/htdocs/index.php(87): Mage::run('', 'store')

item_id isn't correct?

I've recently created a mini-extension that adds the movement date to the manage products grid and it works as it should however it highlighted an issue with the Stock Movements extension.

I've noticed with quite a few products the grid doesn't show any stock movements but inside the product you can see numerous stock movements, I added the item id to the stock movements grid and noticed the item_id shows as a 9 digit number that makes no sense?

I can't see the logic as to why its using a 9 digit item_id, I assumed the item_id was meant to be joined with the product entity_id?

Any help or guidance would be greatly appreciated

Upgrade from stock history to stock movement

I used the following SQL to upgrade from Stock History, because there didn't seem another way..
But I wonder if this is correct because I don't see the old history through products even though it is in the new table and looks correct.
Does is_admin need to be 1?
INSERT INTO mage_bubble_stock_movement (
movement_id,
item_id,
user,
user_id,
is_admin,
qty,
is_in_stock,
message,
created_at)

SELECT
sh.history_id,
sh.item_id,
sh.user,
sh.user_id,
0,
sh.qty,
sh.is_in_stock,
sh.message,
sh.created_at

FROM mage_cataloginventory_stock_history as sh
INNER JOIN mage_catalog_product_entity as pm
ON sh.item_id = pm.entity_id

Two records by each stock move

I'm seeing two records by each stock move, one with the operation (sum or substraction) and a second row with Move = 0.

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

When i add/update product then below error come
My magento version is 1.9.1.1
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (csrbradford.bubble_stock_movement, CONSTRAINT FK_STOCK_MOVEMENT_ITEM FOREIGN KEY (item_id) REFERENCES cataloginventory_stock_item (item_id) ON DELETE CASCADE ON UPDATE CASCADE), query was: INSERT INTO bubble_stock_movement (item_id, user, user_id, is_admin, qty, is_in_stock, message, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, '2019-07-12 12:48:22')

Database table field
CREATE TABLE {$tableMovement} (
movement_id INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
item_id INT( 10 ) UNSIGNED NOT NULL ,
user varchar(40) NOT NULL DEFAULT '',
user_id mediumint(9) unsigned DEFAULT NULL,
qty DECIMAL( 12, 4 ) NOT NULL default '0',
is_in_stock TINYINT( 1 ) UNSIGNED NOT NULL default '0',
message TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
created_at DATETIME NOT NULL ,
INDEX ( item_id )
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
");

Please suggest.

FK Constraint issue (again)

I'm seeing a similar problem to issue #8

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child     row: a foreign key constraint fails (`store_db`.`bubble_stock_movement`, CONSTRAINT `FK_STOCK_MOVEMENT_USER` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE)

However I'm using version 1.2.

It happens at some point during the checkout, the error message comes through in a "Payment Transaction Failed Email".

It doesn't actually stop the order processing, but it does stop the stock movement from logging.

It appears that despite the fix for issue #8 being in place the constraint still exists in the DB schema, it's as if the upgrade-1.0.0-1.1.0.php ran but failed to drop the FK - it's still visible in the schema. I know the script ran because I can see the is_admin TINYINT has been added to the movements table.

Checking the logs the stack dump is as follows:

013-11-18T21:09:58+00:00 ERR (3):
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`store_db`.`bubble_stock_movement`, CONSTRAINT `FK_STOCK_MOVEMENT_USER` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE)' in /home/store/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/store/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/store/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/store/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/store/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/store/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `bu...', Array)
#5 /home/store/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `bu...', Array)
#6 /home/store/public_html/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `bu...', Array)
#7 /home/store/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(448): Zend_Db_Adapter_Abstract->insert('bubble_stock_mo...', Array)
#8 /home/store/public_html/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Bubble_StockMovements_Model_Stock_Movement))
#9 /home/store/public_html/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(134): Mage_Core_Model_Abstract->save()
#10 /home/store/public_html/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(119): Bubble_StockMovements_Model_Stock_Observer->insertStockMovement(Object(Mage_CatalogInventory_Model_Stock_Item), 'Product ordered...')
#11 /home/store/public_html/app/code/core/Mage/Core/Model/App.php(1303): Bubble_StockMovements_Model_Stock_Observer->checkoutAllSubmitAfter(Object(Varien_Event_Observer))
#12 /home/store/public_html/app/code/core/Mage/Core/Model/App.php(1284): Mage_Core_Model_App->_callObserverMethod(Object(Bubble_StockMovements_Model_Stock_Observer), 'checkoutAllSubm...', Object(Varien_Event_Observer))
#13 /home/store/public_html/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('checkout_submit...', Array)
#14 /home/store/public_html/app/code/core/Mage/Checkout/Model/Type/Onepage.php(828): Mage::dispatchEvent('checkout_submit...', Array)
#15 /home/store/public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(501): Mage_Checkout_Model_Type_Onepage->saveOrder()
#16 /home/store/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Checkout_OnepageController->saveOrderAction()
#17 /home/store/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#18 /home/store/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/store/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/store/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#21 /home/store/public_html/index.php(84): Mage::run('', 'store')
#22 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`store_db`.`bubble_stock_movement`, CONSTRAINT `FK_STOCK_MOVEMENT_USER` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE)' in /home/store/public_html/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 /home/store/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/store/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/store/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/store/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `bu...', Array)
#4 /home/store/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `bu...', Array)
#5 /home/store/public_html/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `bu...', Array)
#6 /home/store/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(448): Zend_Db_Adapter_Abstract->insert('bubble_stock_mo...', Array)
#7 /home/store/public_html/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Bubble_StockMovements_Model_Stock_Movement))
#8 /home/store/public_html/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(134): Mage_Core_Model_Abstract->save()
#9 /home/store/public_html/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(119): Bubble_StockMovements_Model_Stock_Observer->insertStockMovement(Object(Mage_CatalogInventory_Model_Stock_Item), 'Product ordered...')
#10 /home/store/public_html/app/code/core/Mage/Core/Model/App.php(1303): Bubble_StockMovements_Model_Stock_Observer->checkoutAllSubmitAfter(Object(Varien_Event_Observer))
#11 /home/store/public_html/app/code/core/Mage/Core/Model/App.php(1284): Mage_Core_Model_App->_callObserverMethod(Object(Bubble_StockMovements_Model_Stock_Observer), 'checkoutAllSubm...', Object(Varien_Event_Observer))
#12 /home/store/public_html/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('checkout_submit...', Array)
#13 /home/store/public_html/app/code/core/Mage/Checkout/Model/Type/Onepage.php(828): Mage::dispatchEvent('checkout_submit...', Array)
#14 /home/store/public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(501): Mage_Checkout_Model_Type_Onepage->saveOrder()
#15 /home/store/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Checkout_OnepageController->saveOrderAction()
#16 /home/store/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#17 /home/store/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /home/store/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#19 /home/store/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#20 /home/store/public_html/index.php(84): Mage::run('', 'store')
#21 {main}

Redunant Entries of Records in History Table

Noticed a big flaw!!! When you hit save or save and continue edit, without changing the stock level, it still adds a record unnecessarily in the history table. Thus, logic needs amending to only insert when there is a change to the quantity.

E-mail alert

Hi,
Is it possible to send an e-mail alert for any stock movement that is made and include either the entire stock movement table in the email or the latest row in the table?

Thanks for a great module!

Error when duplicating configurable product

When duplicating (clicking in Duplicate Button) a configurable product, we got the following error:

Fatal error: Call to a member function addTab() on a non-object in .../app/code/community/JR/StockHistory/Model/Stock/Observer.php on line 9 

PayPal Express transactions not being logged

I don't have any debugging details yet to add to this, but I'll create the issue and update it as they come to hand, hopefully other people can add to it as well - I'm sure I'm not the only one having issues with PayPal and Magento!

In a busy store running CE 1.6.2 and using the core PayPal Express paypal express payment module I've just noticed that not a single PayPal transaction has left a log in the Stock Movements system.

Missing information in guest checkout

Hi I was just trying out this module. It looks really solid.

One thing I noticed though, and I am not really sure if its a bug, is that when I place an order as guest the qty and customer information is missing

If you look at this screenshot,

http://awesomescreenshot.com/0401mtd12d

I placed a guest order for 100 units, then edited the stock manually adding 5 units and then placed a new order logged in for 30 units.

I haven't looked into the code yet and its possibly an easy fix but I wanted to report it to you first as you might have more insight on the matter

FK Constraint errors after checkout

After the test I reported in #7 I made a different test purchasing a configurable product to evaluate the behavior and got the exceptions that follow. They don't seem to be really related to the product being configurable though.

2013-08-22T00:08:52+00:00 ERR (3): 
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`embrujo`.`bubble_stock_movement`, CONSTRAINT `FK_STOCK_MOVEMENT_USER` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE)' in /var/www/embrujo/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `bu...', Array)
#5 lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `bu...', Array)
#6 lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `bu...', Array)
#7 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(448): Zend_Db_Adapter_Abstract->insert('bubble_stock_mo...', Array)
#8 app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Bubble_StockMovements_Model_Stock_Movement))
#9 app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(133): Mage_Core_Model_Abstract->save()
#10 app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(119): Bubble_StockMovements_Model_Stock_Observer->insertStockMovement(Object(Mage_CatalogInventory_Model_Stock_Item), 'Product ordered...')
#11 app/code/core/Mage/Core/Model/App.php(1303): Bubble_StockMovements_Model_Stock_Observer->checkoutAllSubmitAfter(Object(Varien_Event_Observer))
#12 app/code/core/Mage/Core/Model/App.php(1284): Mage_Core_Model_App->_callObserverMethod(Object(Bubble_StockMovements_Model_Stock_Observer), 'checkoutAllSubm...', Object(Varien_Event_Observer))
#13 app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('checkout_submit...', Array)
#14 app/code/core/Mage/Checkout/Model/Type/Onepage.php(828): Mage::dispatchEvent('checkout_submit...', Array)
#15 app/code/core/Mage/Checkout/controllers/OnepageController.php(501): Mage_Checkout_Model_Type_Onepage->saveOrder()
#16 app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Checkout_OnepageController->saveOrderAction()
#17 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#18 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#20 app/Mage.php(640): Mage_Core_Model_App->run(Array)
#21 index.php(80): Mage::run('', 'store')
#22 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`embrujo`.`bubble_stock_movement`, CONSTRAINT `FK_STOCK_MOVEMENT_USER` FOREIGN KEY (`user_id`) REFERENCES `admin_user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE)' in /var/www/embrujo/lib/Zend/Db/Statement/Pdo.php:234
Stack trace:
#0 lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `bu...', Array)
#4 lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `bu...', Array)
#5 lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `bu...', Array)
#6 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(448): Zend_Db_Adapter_Abstract->insert('bubble_stock_mo...', Array)
#7 app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Bubble_StockMovements_Model_Stock_Movement))
#8 app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(133): Mage_Core_Model_Abstract->save()
#9 app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(119): Bubble_StockMovements_Model_Stock_Observer->insertStockMovement(Object(Mage_CatalogInventory_Model_Stock_Item), 'Product ordered...')
#10 app/code/core/Mage/Core/Model/App.php(1303): Bubble_StockMovements_Model_Stock_Observer->checkoutAllSubmitAfter(Object(Varien_Event_Observer))
#11 app/code/core/Mage/Core/Model/App.php(1284): Mage_Core_Model_App->_callObserverMethod(Object(Bubble_StockMovements_Model_Stock_Observer), 'checkoutAllSubm...', Object(Varien_Event_Observer))
#12 app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('checkout_submit...', Array)
#13 app/code/core/Mage/Checkout/Model/Type/Onepage.php(828): Mage::dispatchEvent('checkout_submit...', Array)
#14 app/code/core/Mage/Checkout/controllers/OnepageController.php(501): Mage_Checkout_Model_Type_Onepage->saveOrder()
#15 app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Checkout_OnepageController->saveOrderAction()
#16 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#17 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#19 app/Mage.php(640): Mage_Core_Model_App->run(Array)
#20 index.php(80): Mage::run('', 'store')
#21 {main}

(Edited the paths for clarity)

Duplicate Order

The order in the stock history is being doubled. can you help me to fix it? Thx.

image

"SQLSTATE[42S02]: Base table or view not found"

I have added this extension to a few other sites with no problem. But when I add it to this site, I am told that there is a missing table.

After I upload the extension and clear the cache, I clicked on a product to make sure that stock movements was there. When I click the product, I get this error.

I'm using Magento ver. 1.9.0.1. Could you please help me?

There has been an error processing your request
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopsorg_wzt5koj.bubble_stock_movement' doesn't exist

Trace:

0 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

1 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)

2 /home/shopsorg/domains/shophopenetwork.com/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)

3 /home/shopsorg/domains/shophopenetwork.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)

4 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)

5 /home/shopsorg/domains/shophopenetwork.com/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)

6 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)

7 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Data/Collection.php(225): Varien_Data_Collection_Db->getSize()

8 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Data/Collection.php(211): Varien_Data_Collection->getLastPageNumber()

9 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Data/Collection/Db.php(516): Varien_Data_Collection->getCurPage()

10 /home/shopsorg/domains/shophopenetwork.com/lib/Varien/Data/Collection/Db.php(563): Varien_Data_Collection_Db->_renderLimit()

11 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(533): Varien_Data_Collection_Db->load()

12 /home/shopsorg/domains/shophopenetwork.com/app/code/community/Bubble/StockMovements/Block/Adminhtml/Stock/Movement/Grid.php(41): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()

13 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(626): Bubble_StockMovements_Block_Adminhtml_Stock_Movement_Grid->_prepareCollection()

14 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()

15 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()

16 /home/shopsorg/domains/shophopenetwork.com/app/code/community/Bubble/StockMovements/Model/Stock/Observer.php(19): Mage_Core_Block_Abstract->toHtml()

17 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Model/App.php(1338): Bubble_StockMovements_Model_Stock_Observer->addStockMovementsTab(Object(Varien_Event_Observer))

18 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Bubble_StockMovements_Model_Stock_Observer), 'addStockMovemen...', Object(Varien_Event_Observer))

19 /home/shopsorg/domains/shophopenetwork.com/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)

20 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Controller/Varien/Action.php(385): Mage::dispatchEvent('controller_acti...')

21 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(269): Mage_Core_Controller_Varien_Action->renderLayout()

22 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->editAction()

23 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')

24 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

25 /home/shopsorg/domains/shophopenetwork.com/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()

26 /home/shopsorg/domains/shophopenetwork.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)

27 /home/shopsorg/domains/shophopenetwork.com/index.php(87): Mage::run('', 'store')

28 {main}

wrong stock movement for first time record

Hi jroinke,

Thanks for this great module! But I have a little problem with the stock data for the first time record.

03069 732 -1 Yes Product ordered (order: 100000006) keith kong 18/08/2014 2:28:09 PM
03069 733 +730 Yes Product ordered (order: 100000005) keith kong 18/08/2014 2:16:58 PM

I jsut install the module and do a test payment, it shows 733 stock and +730 movement. May I know how to fix that?

Cheers,

Keith

Recurring Profiles future start date

When we use recurring profiles to start now, Magento creates an order and stock history is maintained

When we use recurring profiles with a future start date, no order is created and we get the following fatal error
PHP Fatal error: Call to a member function getAllItems() on a non-object in .../app/code/community/Bubble/StockMovements/Model/Stock/Observer.php on line 97

version 1.2.1

Stock movement display a nonsense

The 'Movement' column in the admin grid doesn't seem to make any sense. The values are calculated on-the-fly after the collection is loaded, with each movement being relative to the previous item loaded(!). Unless you only have one product, this information would seem to make no sense. Furthermore, if you reorder the grid by clicking on one of the column headings (not 'Movement' as this throws an exception), the values in the Movement column are not updated and so make even less sense.

Instead, I suggest that the stock movement qty value should be stored against each row at the time of creation, and should be a calculation of the individual stock item's change in quantity.

I'm at a loss as to why this was created in the way it has been. Maybe when developing this feature only one product was used in testing, and no thought was given to a more general case? Very odd, especially given that the rest of the extension seems to be fairly well coded (although lacking comments).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.