Magento 2 Product not saving into the catalog_product_save_after event. “No such entity” error occuredSend Copy of Order Confirmation email programmatically in magento 2Area code not setProceeding to an exception page after save new categoryMagento2: How to update the product price programaticallyModel class not found in …/magento/framework/ObjectManager/Factory/AbstractFactory.php:93Magento 2 : Error while adding product programatically On Observer Event `catalog_product_save_after`Having trouble exporting products from Magento 2.x. Fatal error: Uncaught Error: Call to a member function getName()Magento 2: Add a product to the cart programmaticallyMagento 2.2.5: Add, Update and Delete existing products Custom Options“No such entity” ERROR in magento 2.4 admin after upgrade

How are Core iX names like Core i5, i7 related to Haswell, Ivy Bridge?

Can you book a one-way ticket to the UK on a visa?

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

What is the best way for a skeleton to impersonate human without using magic?

Why was Thor doubtful about his worthiness to Mjolnir?

Ex-manager wants to stay in touch, I don't want to

Run script for 10 times until meets the condition, but break the loop if it meets the condition during iteration

How can dragons propel their breath attacks to a long distance

For the erase-remove idiom, why is the second parameter necessary which points to the end of the container?

What is Plautus’s pun about frustum and frustrum?

Who was this character from the Tomb of Annihilation adventure before they became a monster?

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

Can 'sudo apt-get remove [write]' destroy my Ubuntu?

What is the significance of 4200 BCE in context of farming replacing foraging in Europe?

Speculative Biology of a Haplodiploid Humanoid Species

Reaction of borax with NaOH

Drawing lines to nearest point

Usefulness of complex chord names?

Extrude the faces of a cube symmetrically along XYZ

Why can't RGB or bicolour LEDs produce a decent yellow?

Word for being out at night during curfew

Front derailleur hard to move due to gear cable angle

What does "Ich wusste, dass aus dir mal was wird" mean?

Size of a folder with du



Magento 2 Product not saving into the catalog_product_save_after event. “No such entity” error occured


Send Copy of Order Confirmation email programmatically in magento 2Area code not setProceeding to an exception page after save new categoryMagento2: How to update the product price programaticallyModel class not found in …/magento/framework/ObjectManager/Factory/AbstractFactory.php:93Magento 2 : Error while adding product programatically On Observer Event `catalog_product_save_after`Having trouble exporting products from Magento 2.x. Fatal error: Uncaught Error: Call to a member function getName()Magento 2: Add a product to the cart programmaticallyMagento 2.2.5: Add, Update and Delete existing products Custom Options“No such entity” ERROR in magento 2.4 admin after upgrade






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have added a programmatically customizable option into the product via observer "catalog_product_save_after" event but when I add product->save() then the




no such entity error occurred.




Please check the below my code:



$option = MagentoFrameworkAppObjectManager::getInstance()
->create('MagentoCatalogModelProductOption')
->setProductId($product->getId())
->setStoreId($product->getStoreId())
->addData($arrayOption);

$this->customoptionOperation($option, 'save');
$product->addOption($option);
$product->save(); // this gives the error no such entity









share|improve this question
























  • any solution please give me?

    – Hardik Makwana
    2 days ago

















1















I have added a programmatically customizable option into the product via observer "catalog_product_save_after" event but when I add product->save() then the




no such entity error occurred.




Please check the below my code:



$option = MagentoFrameworkAppObjectManager::getInstance()
->create('MagentoCatalogModelProductOption')
->setProductId($product->getId())
->setStoreId($product->getStoreId())
->addData($arrayOption);

$this->customoptionOperation($option, 'save');
$product->addOption($option);
$product->save(); // this gives the error no such entity









share|improve this question
























  • any solution please give me?

    – Hardik Makwana
    2 days ago













1












1








1








I have added a programmatically customizable option into the product via observer "catalog_product_save_after" event but when I add product->save() then the




no such entity error occurred.




Please check the below my code:



$option = MagentoFrameworkAppObjectManager::getInstance()
->create('MagentoCatalogModelProductOption')
->setProductId($product->getId())
->setStoreId($product->getStoreId())
->addData($arrayOption);

$this->customoptionOperation($option, 'save');
$product->addOption($option);
$product->save(); // this gives the error no such entity









share|improve this question
















I have added a programmatically customizable option into the product via observer "catalog_product_save_after" event but when I add product->save() then the




no such entity error occurred.




Please check the below my code:



$option = MagentoFrameworkAppObjectManager::getInstance()
->create('MagentoCatalogModelProductOption')
->setProductId($product->getId())
->setStoreId($product->getStoreId())
->addData($arrayOption);

$this->customoptionOperation($option, 'save');
$product->addOption($option);
$product->save(); // this gives the error no such entity






magento2 customizable-options






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 8 at 8:20









magefms

3,0502630




3,0502630










asked May 8 at 8:02









Hardik MakwanaHardik Makwana

17511




17511












  • any solution please give me?

    – Hardik Makwana
    2 days ago

















  • any solution please give me?

    – Hardik Makwana
    2 days ago
















any solution please give me?

– Hardik Makwana
2 days ago





any solution please give me?

– Hardik Makwana
2 days ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f273788%2fmagento-2-product-not-saving-into-the-catalog-product-save-after-event-no-such%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f273788%2fmagento-2-product-not-saving-into-the-catalog-product-save-after-event-no-such%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림