Skip to content

Commit

Permalink
Merge pull request #43 from pwaszkis/magento2
Browse files Browse the repository at this point in the history
Fix for update image label
  • Loading branch information
n0kit31 authored Apr 19, 2019
2 parents f6b370b + 4997520 commit 5f8e55d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,11 @@ public function updateLabel($attrdesc, $pid, $sids, $label)
$tgv = $this->tablename('catalog_product_entity_media_gallery_value');
$vc = $this->tablename('catalog_product_entity_varchar');
$sql = "UPDATE $tgv as emgv
JOIN $tg as emg ON emg.value_id=emgv.value_id AND emg.entity_id=?
JOIN $vc as ev ON ev.entity_id=emg.entity_id AND ev.value=emg.value and ev.attribute_id=?
JOIN $tg as emg ON emg.value_id=emgv.value_id
JOIN $vc as ev ON ev.entity_id=emgv.entity_id AND ev.value=emg.value and ev.attribute_id=?
SET label=?
WHERE emgv.store_id IN (" . implode(",", $sids) . ")";
$this->update($sql, array($pid, $attrdesc["attribute_id"], $label));
WHERE emgv.store_id IN (" . implode(",", $sids) . ") AND emgv.entity_id=?";
$this->update($sql, array($attrdesc["attribute_id"], $label, $pid));
}

public function processItemAfterId(&$item, $params = null)
Expand Down

0 comments on commit 5f8e55d

Please sign in to comment.