Fixed: Prevent duplicate entry fatal error when clicking the Save button twice on the Room Type Features tab

This commit is contained in:
amit sharma
2026-09-22 19:19:56 +05:30
parent de6ecd72f0
commit 7a59aab959

View File

@@ -4041,7 +4041,7 @@ class ProductCore extends ObjectModel
$id_value = Db::getInstance()->Insert_ID();
}
$row = array('id_feature' => (int)$id_feature, 'id_product' => (int)$this->id, 'id_feature_value' => (int)$id_value);
Db::getInstance()->insert('feature_product', $row);
Db::getInstance()->insert('feature_product', $row, false, true, Db::INSERT_IGNORE);
SpecificPriceRule::applyAllRules(array((int)$this->id));
if ($id_value) {
return ($id_value);