Skip to content

Commit

Permalink
fix the reset button
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Mar 17, 2017
1 parent cd63e65 commit e001804
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,21 +476,7 @@ public function resetErrors()
// clean the syncecommerce table with errors
$connection = $this->_mailChimpSyncEcommerce->getResource()->getConnection();
$tableName = $this->_mailChimpSyncEcommerce->getResource()->getMainTable();
$connection->delete($tableName,['mailchimp_sync_error is not null']);
// clean the errors in eav for products
// $productCollection = $this->_productCollection;
// $productCollection->addAttributeToFilter(
// array(
// array('attribute' => 'mailchimp_sync_error', 'neq' => '')
// ), '', 'left'
// );
// foreach ($productCollection as $product) {
// $product->setData("mailchimp_sync_delta", null);
// $product->setData("mailchimp_sync_error", '');
// $resource = $product->getResource();
// $resource->saveAttribute($product, 'mailchimp_sync_delta');
// $resource->saveAttribute($product, 'mailchimp_sync_error');
// }
$connection->truncateTable($tableName);
// clean the error in eav for customers
} catch(\Zend_Db_Exception $e) {
throw new ValidatorException(__($e->getMessage()));
Expand Down

0 comments on commit e001804

Please sign in to comment.