basic product repository save not work in cron - magento2Magento product stock alert cron jobCron job doesn't workCron.php/Cron.sh Not being called/Manual only - Permission problemSlow Magento 2 saving for configurable productsmagento 2 - category attribute with checkbox input throws exception on admin saveCheck if product exists before savingMagento2: CRON Job is scheduled but Not RunningHow to load custom template file for product detail page in magento2Magento 1.9 cron timeout 240 seconds1.9.2 catalog price rule - Cron not working.. Discounts disappear
How was Luke's prosthetic hand in Episode V filmed?
How much did all the space agencies spent on rockets launching and space exploration? What are the benefits for me and you?
Why is the forgetful functor representable?
Soft constraints and hard constraints
Grease/lubricate rubber stabilizer bar bushings?
How to hide your own body?
How does the Gameboy's memory bank switching work?
Satellite in orbit in front of and behind the Moon
She told me that she HAS / HAD a gun
Where can I find standards for statistical acronyms and whether they should be capitalized or lower case?
Why would word of Princess Leia's capture generate sympathy for the Rebellion in the Senate?
Rule of thumb to choose right mix of Rodinal developer?
Inside Out and Back to Front
What is the difference between uniform velocity and constant velocity?
What's a German word for »Sandbagger«?
What does a Nintendo Game Boy do when turned on without a game cartridge inserted?
What's the physical meaning of the statement that "photons don't have positions"?
Three phase systems - are there any single phase devices that are connected between two phases instead of between one phase and neutral?
Can two waves interfere head on?
Would using carbon dioxide as fuel work to reduce the greenhouse effect?
Does the Bracer of Flying Daggers really let a thief make 4 attacks per round?
Manager is asking me to eat breakfast from now on
Why didn't Balak request Bilam to bless his own people?
A bicolour masyu
basic product repository save not work in cron - magento2
Magento product stock alert cron jobCron job doesn't workCron.php/Cron.sh Not being called/Manual only - Permission problemSlow Magento 2 saving for configurable productsmagento 2 - category attribute with checkbox input throws exception on admin saveCheck if product exists before savingMagento2: CRON Job is scheduled but Not RunningHow to load custom template file for product detail page in magento2Magento 1.9 cron timeout 240 seconds1.9.2 catalog price rule - Cron not working.. Discounts disappear
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I tried the below code in custom controller and cron job method [just load and save] after that I felt some issues
$product = $this->productRepository->getById(548);
$this->productRepository->save($product);
From Controller:
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
From Cron
- It change the product type from simple to virtual
- product detail page goes to 404 page not found
- It removes the product from category page.
Update
I checked the same in Magento 2.1.3
From Cron
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
is there any limitation to use product repository in cron? or did I something wrong?
magento2 cron sku crontab magento2.0.8
add a comment |
I tried the below code in custom controller and cron job method [just load and save] after that I felt some issues
$product = $this->productRepository->getById(548);
$this->productRepository->save($product);
From Controller:
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
From Cron
- It change the product type from simple to virtual
- product detail page goes to 404 page not found
- It removes the product from category page.
Update
I checked the same in Magento 2.1.3
From Cron
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
is there any limitation to use product repository in cron? or did I something wrong?
magento2 cron sku crontab magento2.0.8
Did anybody report a core-issue on github for this?
– Alex
Aug 2 '17 at 11:11
add a comment |
I tried the below code in custom controller and cron job method [just load and save] after that I felt some issues
$product = $this->productRepository->getById(548);
$this->productRepository->save($product);
From Controller:
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
From Cron
- It change the product type from simple to virtual
- product detail page goes to 404 page not found
- It removes the product from category page.
Update
I checked the same in Magento 2.1.3
From Cron
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
is there any limitation to use product repository in cron? or did I something wrong?
magento2 cron sku crontab magento2.0.8
I tried the below code in custom controller and cron job method [just load and save] after that I felt some issues
$product = $this->productRepository->getById(548);
$this->productRepository->save($product);
From Controller:
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
From Cron
- It change the product type from simple to virtual
- product detail page goes to 404 page not found
- It removes the product from category page.
Update
I checked the same in Magento 2.1.3
From Cron
- It change the product type from simple to virtual
- No issues in product detail page
- It removes the product from category page.
is there any limitation to use product repository in cron? or did I something wrong?
magento2 cron sku crontab magento2.0.8
magento2 cron sku crontab magento2.0.8
edited Feb 7 '17 at 7:51
Bilal Usean
asked Feb 6 '17 at 10:34
Bilal UseanBilal Usean
5,4506 gold badges40 silver badges94 bronze badges
5,4506 gold badges40 silver badges94 bronze badges
Did anybody report a core-issue on github for this?
– Alex
Aug 2 '17 at 11:11
add a comment |
Did anybody report a core-issue on github for this?
– Alex
Aug 2 '17 at 11:11
Did anybody report a core-issue on github for this?
– Alex
Aug 2 '17 at 11:11
Did anybody report a core-issue on github for this?
– Alex
Aug 2 '17 at 11:11
add a comment |
1 Answer
1
active
oldest
votes
I think you mismatch object to save a update product info. I tried blow code using corn its works for me.
$product = $this->productRepository->getById($product_id);
$product->setName("Testing");
$product->save();
Update:
I saw vendor/magento/module-catalog/Model/ProductRepository::save()
same way to save product, its works for me.
I use
$this->productRepository->save($target, $saveOptions = false);
Instread of below line
$this->productRepository->save($target);
could you look at thismodule-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f158332%2fbasic-product-repository-save-not-work-in-cron-magento2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think you mismatch object to save a update product info. I tried blow code using corn its works for me.
$product = $this->productRepository->getById($product_id);
$product->setName("Testing");
$product->save();
Update:
I saw vendor/magento/module-catalog/Model/ProductRepository::save()
same way to save product, its works for me.
I use
$this->productRepository->save($target, $saveOptions = false);
Instread of below line
$this->productRepository->save($target);
could you look at thismodule-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
add a comment |
I think you mismatch object to save a update product info. I tried blow code using corn its works for me.
$product = $this->productRepository->getById($product_id);
$product->setName("Testing");
$product->save();
Update:
I saw vendor/magento/module-catalog/Model/ProductRepository::save()
same way to save product, its works for me.
I use
$this->productRepository->save($target, $saveOptions = false);
Instread of below line
$this->productRepository->save($target);
could you look at thismodule-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
add a comment |
I think you mismatch object to save a update product info. I tried blow code using corn its works for me.
$product = $this->productRepository->getById($product_id);
$product->setName("Testing");
$product->save();
Update:
I saw vendor/magento/module-catalog/Model/ProductRepository::save()
same way to save product, its works for me.
I use
$this->productRepository->save($target, $saveOptions = false);
Instread of below line
$this->productRepository->save($target);
I think you mismatch object to save a update product info. I tried blow code using corn its works for me.
$product = $this->productRepository->getById($product_id);
$product->setName("Testing");
$product->save();
Update:
I saw vendor/magento/module-catalog/Model/ProductRepository::save()
same way to save product, its works for me.
I use
$this->productRepository->save($target, $saveOptions = false);
Instread of below line
$this->productRepository->save($target);
edited Feb 7 '17 at 9:55
answered Feb 7 '17 at 7:55
Rajkumar .ERajkumar .E
1,8155 gold badges17 silver badges47 bronze badges
1,8155 gold badges17 silver badges47 bronze badges
could you look at thismodule-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
add a comment |
could you look at thismodule-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
could you look at this
module-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in 2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
could you look at this
module-catalog/Model/ProductRepository::save()
, it seems like pass the product as the argument. by the way I tried you suggestion but it is not work in 2.0.8
– Bilal Usean
Feb 7 '17 at 8:07
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f158332%2fbasic-product-repository-save-not-work-in-cron-magento2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Did anybody report a core-issue on github for this?
– Alex
Aug 2 '17 at 11:11