/** * @param Product $product */ private function saveDescription($product) { if ($product->isDescriptionsModified()) { $this->getDb()->query("DELETE FROM product_description WHERE product_id = :productId", [':productId' => $product->getId()]); foreach ($product->getDescriptions() as $description) { $this->getDb()->query("\n INSERT INTO product_description\n SET\n product_id = :productId,\n language_id = :languageId,\n name = :name,\n meta_keyword = :metaKeyword,\n meta_description = :metaDescription,\n description = :description,\n seo_title = :seoTitle,\n seo_h1 = :seoH1\n ", [':productId' => $product->getId(), ':languageId' => $description->getLanguageId(), ':name' => $description->getName(), ':metaKeyword' => $description->getMetaKeyword(), ':metaDescription' => $description->getMetaDescription(), ':description' => $description->getDescription(), ':seoTitle' => $description->getSeoTitle(), ':seoH1' => $description->getSeoH1()]); } } }