Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copied From Magento Product Entity to update url_keys as well #423

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,22 @@ protected function _saveProductAttributes(array $attributesData)
));
}
}

if ($attributeId == $this->_getUrlKeyAttributeId()) {
/*
If the store based values are not provided for a particular store,
we default to the default scope values.
In this case, remove all the existing store based values stored in the table.
*/
$where = $this->_connection->quoteInto('store_id NOT IN (?)', array_keys($storeValues)) .
$this->_connection->quoteInto(' AND attribute_id = ?', $attributeId) .
$this->_connection->quoteInto(' AND entity_id = ?', $productId) .
$this->_connection->quoteInto(' AND entity_type_id = ?', $this->_entityTypeId);

$this->_connection->delete(
$tableName, $where
);
}

if (Mage_ImportExport_Model_Import::BEHAVIOR_APPEND != $this->getBehavior()) {
/**
Expand Down