How do I get the product updated timestamp? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I get all of the attribute name of a specific product using the product id or sku?How do I get just the product additional information in the view.phtml template?get the product instance from catalog_product_attribute_update_after eventMagento 2: How can I get all product attributes and get the value (Yes/No)Most Viewed Product not updatedHow to get product QTY on product view page?Get the item updated in cartMagento 2 Add new field to Magento_User admin formSet custom creation timestamp or modify creation timestamp for productHow to get the db updated at timestamp value form custom table in magento 2?
Can gravitational waves pass through a black hole?
Putting Ant-Man on house arrest
Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?
Unix AIX passing variable and arguments to expect and spawn
Is it OK if I do not take the receipt in Germany?
Can a Wizard take the Magic Initiate feat and select spells from the Wizard list?
Married in secret, can marital status in passport be changed at a later date?
Has a Nobel Peace laureate ever been accused of war crimes?
Marquee sign letters
Are there any AGPL-style licences that require source code modifications to be public?
Does using the Inspiration rules for character defects encourage My Guy Syndrome?
When does Bran Stark remember Jamie pushing him?
What documents does someone with a long-term visa need to travel to another Schengen country?
Where is Bhagavad Gita referred to as Hari Gita?
How to create a command for the "strange m" symbol in latex?
Is Vivien of the Wilds + Wilderness Reclamation a competitive combo?
Determine the generator of an ideal of ring of integers
Converting a text document with special format to Pandas DataFrame
Why did Israel vote against lifting the American embargo on Cuba?
Lights are flickering on and off after accidentally bumping into light switch
How to charge percentage of transaction cost?
What could prevent concentrated local exploration?
Why not use the yoke to control yaw, as well as pitch and roll?
Can the van der Waals coefficients be negative in the van der Waals equation for real gases?
How do I get the product updated timestamp?
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How do I get all of the attribute name of a specific product using the product id or sku?How do I get just the product additional information in the view.phtml template?get the product instance from catalog_product_attribute_update_after eventMagento 2: How can I get all product attributes and get the value (Yes/No)Most Viewed Product not updatedHow to get product QTY on product view page?Get the item updated in cartMagento 2 Add new field to Magento_User admin formSet custom creation timestamp or modify creation timestamp for productHow to get the db updated at timestamp value form custom table in magento 2?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to display the data and time for the last time the product was updated.
<?php
$product = $block->getProduct();
?>
<h1><?php echo $product->getData('spec_sheet');
?></h1>
<span><?php echo $product->getUpdated_At();?></span>
I am not getting any errors, but it also isn't displaying anything.
Edit:
Moved it to a different template
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Product additional attributes template
*
* @var $block MagentoCatalogBlockProductViewAttributes
*/
?>
<?php
$_helper = $this->helper('MagentoCatalogHelperOutput');
$_product = $block->getProduct();
?>
<?php if ($_additional = $block->getAdditionalData()): ?>
<div class="additional-attributes-wrapper table-wrapper">
<table class="data table additional-attributes" id="product-
attribute-specs-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('More Information') ?></caption>
<tbody>
<?php foreach ($_additional as $_data): ?>
<tr>
<th class="col label" scope="row"><?= $block-
>escapeHtml(__($_data['label'])) ?></th>
<td class="col data" data-th="<?= $block-
>escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */
$_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif;?>
<div class="spectab"><?php echo $_product-
>getData('specification_tab'); ?></div>
<div><?php echo $product->getUpdated_At(); ?></div>
Now I get-
Notice: Undefined variable: product
I changed the last line to
<div><?php echo $_product->getUpdated_At(); ?></div>
And the error clears but nothing displays.
magento2 product product-attribute
add a comment |
I am trying to display the data and time for the last time the product was updated.
<?php
$product = $block->getProduct();
?>
<h1><?php echo $product->getData('spec_sheet');
?></h1>
<span><?php echo $product->getUpdated_At();?></span>
I am not getting any errors, but it also isn't displaying anything.
Edit:
Moved it to a different template
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Product additional attributes template
*
* @var $block MagentoCatalogBlockProductViewAttributes
*/
?>
<?php
$_helper = $this->helper('MagentoCatalogHelperOutput');
$_product = $block->getProduct();
?>
<?php if ($_additional = $block->getAdditionalData()): ?>
<div class="additional-attributes-wrapper table-wrapper">
<table class="data table additional-attributes" id="product-
attribute-specs-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('More Information') ?></caption>
<tbody>
<?php foreach ($_additional as $_data): ?>
<tr>
<th class="col label" scope="row"><?= $block-
>escapeHtml(__($_data['label'])) ?></th>
<td class="col data" data-th="<?= $block-
>escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */
$_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif;?>
<div class="spectab"><?php echo $_product-
>getData('specification_tab'); ?></div>
<div><?php echo $product->getUpdated_At(); ?></div>
Now I get-
Notice: Undefined variable: product
I changed the last line to
<div><?php echo $_product->getUpdated_At(); ?></div>
And the error clears but nothing displays.
magento2 product product-attribute
add a comment |
I am trying to display the data and time for the last time the product was updated.
<?php
$product = $block->getProduct();
?>
<h1><?php echo $product->getData('spec_sheet');
?></h1>
<span><?php echo $product->getUpdated_At();?></span>
I am not getting any errors, but it also isn't displaying anything.
Edit:
Moved it to a different template
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Product additional attributes template
*
* @var $block MagentoCatalogBlockProductViewAttributes
*/
?>
<?php
$_helper = $this->helper('MagentoCatalogHelperOutput');
$_product = $block->getProduct();
?>
<?php if ($_additional = $block->getAdditionalData()): ?>
<div class="additional-attributes-wrapper table-wrapper">
<table class="data table additional-attributes" id="product-
attribute-specs-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('More Information') ?></caption>
<tbody>
<?php foreach ($_additional as $_data): ?>
<tr>
<th class="col label" scope="row"><?= $block-
>escapeHtml(__($_data['label'])) ?></th>
<td class="col data" data-th="<?= $block-
>escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */
$_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif;?>
<div class="spectab"><?php echo $_product-
>getData('specification_tab'); ?></div>
<div><?php echo $product->getUpdated_At(); ?></div>
Now I get-
Notice: Undefined variable: product
I changed the last line to
<div><?php echo $_product->getUpdated_At(); ?></div>
And the error clears but nothing displays.
magento2 product product-attribute
I am trying to display the data and time for the last time the product was updated.
<?php
$product = $block->getProduct();
?>
<h1><?php echo $product->getData('spec_sheet');
?></h1>
<span><?php echo $product->getUpdated_At();?></span>
I am not getting any errors, but it also isn't displaying anything.
Edit:
Moved it to a different template
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/**
* Product additional attributes template
*
* @var $block MagentoCatalogBlockProductViewAttributes
*/
?>
<?php
$_helper = $this->helper('MagentoCatalogHelperOutput');
$_product = $block->getProduct();
?>
<?php if ($_additional = $block->getAdditionalData()): ?>
<div class="additional-attributes-wrapper table-wrapper">
<table class="data table additional-attributes" id="product-
attribute-specs-table">
<caption class="table-caption"><?= /* @escapeNotVerified */ __('More Information') ?></caption>
<tbody>
<?php foreach ($_additional as $_data): ?>
<tr>
<th class="col label" scope="row"><?= $block-
>escapeHtml(__($_data['label'])) ?></th>
<td class="col data" data-th="<?= $block-
>escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */
$_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif;?>
<div class="spectab"><?php echo $_product-
>getData('specification_tab'); ?></div>
<div><?php echo $product->getUpdated_At(); ?></div>
Now I get-
Notice: Undefined variable: product
I changed the last line to
<div><?php echo $_product->getUpdated_At(); ?></div>
And the error clears but nothing displays.
magento2 product product-attribute
magento2 product product-attribute
edited 2 hours ago
magefms
2,8152528
2,8152528
asked 3 hours ago
Tyler JensenTyler Jensen
86111
86111
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Try <?php echo $product->getUpdatedAt(); ?>
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
add a comment |
At the end of the last template I used this instead-
<div><?php echo $_product->getData('updated_at'); ?></div>
And it works!
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%2f271000%2fhow-do-i-get-the-product-updated-timestamp%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try <?php echo $product->getUpdatedAt(); ?>
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
add a comment |
Try <?php echo $product->getUpdatedAt(); ?>
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
add a comment |
Try <?php echo $product->getUpdatedAt(); ?>
Try <?php echo $product->getUpdatedAt(); ?>
answered 3 hours ago
ne0nlightne0nlight
41219
41219
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
add a comment |
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
Same issue. That is the way I tried it first. Just to make sure I tried it that way again and still getting nothing. I did flush cache after each change.
– Tyler Jensen
3 hours ago
add a comment |
At the end of the last template I used this instead-
<div><?php echo $_product->getData('updated_at'); ?></div>
And it works!
add a comment |
At the end of the last template I used this instead-
<div><?php echo $_product->getData('updated_at'); ?></div>
And it works!
add a comment |
At the end of the last template I used this instead-
<div><?php echo $_product->getData('updated_at'); ?></div>
And it works!
At the end of the last template I used this instead-
<div><?php echo $_product->getData('updated_at'); ?></div>
And it works!
edited 2 hours ago
magefms
2,8152528
2,8152528
answered 3 hours ago
Tyler JensenTyler Jensen
86111
86111
add a comment |
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%2f271000%2fhow-do-i-get-the-product-updated-timestamp%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