How to get the gift message value in Magento2.1.7?Moving Gift message form block from Cart to Checkout step 1How to implement gift message form functionality in cart page?Magento 2: Display Gift option form on review and Payment PageMagento 1.9 - Looking for the “Gift Message” on the transactional email templateMagento 2.2.6 — How to get gift message on Packing List?How to save a custom field value in DB for add new customers in backend magento2.2.5?How to show base image on minicart in magento2.1.7?Magento 2 DropDown Attribute - Get “Admin” label value, not the StoreView valueHow to get all state code in magento 2.1.7?How to show current date and time list in dropdown in magento2.1.7?

Multiplicative persistence

Creepy dinosaur pc game identification

Why should universal income be universal?

Has any country ever had 2 former presidents in jail simultaneously?

Why is it that I can sometimes guess the next note?

Melting point of aspirin, contradicting sources

Is it safe to use olive oil to clean the ear wax?

Loading commands from file

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Is there a name for this algorithm to calculate the concentration of a mixture of two solutions containing the same solute?

Are the IPv6 address space and IPv4 address space completely disjoint?

The screen of my macbook suddenly broken down how can I do to recover

Freedom of speech and where it applies

Pre-mixing cryogenic fuels and using only one fuel tank

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

The IT department bottlenecks progress. How should I handle this?

Yosemite Fire Rings - What to Expect?

Is it better practice to read straight from sheet music rather than memorize it?

In Qur'an 7:161, why is "say the word of humility" translated in various ways?

Can I sign legal documents with a smiley face?

How to implement a feedback to keep the DC gain at zero for this conceptual passive filter?

Removing files under particular conditions (number of files, file age)

Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?



How to get the gift message value in Magento2.1.7?


Moving Gift message form block from Cart to Checkout step 1How to implement gift message form functionality in cart page?Magento 2: Display Gift option form on review and Payment PageMagento 1.9 - Looking for the “Gift Message” on the transactional email templateMagento 2.2.6 — How to get gift message on Packing List?How to save a custom field value in DB for add new customers in backend magento2.2.5?How to show base image on minicart in magento2.1.7?Magento 2 DropDown Attribute - Get “Admin” label value, not the StoreView valueHow to get all state code in magento 2.1.7?How to show current date and time list in dropdown in magento2.1.7?













1















How to get the gift message value in Magento2.1.7?



I am getting the gift message value as $getgiftMessage = $item->giftMessage();



But I am not able to get the value.



Any help would be appreciated.










share|improve this question
























  • Are you trying to fetch it from quote?

    – Ramkishan Suthar
    yesterday











  • I am fetching it from order.

    – Amy
    yesterday











  • I think you will get only gift message id from there.

    – Ramkishan Suthar
    yesterday















1















How to get the gift message value in Magento2.1.7?



I am getting the gift message value as $getgiftMessage = $item->giftMessage();



But I am not able to get the value.



Any help would be appreciated.










share|improve this question
























  • Are you trying to fetch it from quote?

    – Ramkishan Suthar
    yesterday











  • I am fetching it from order.

    – Amy
    yesterday











  • I think you will get only gift message id from there.

    – Ramkishan Suthar
    yesterday













1












1








1


1






How to get the gift message value in Magento2.1.7?



I am getting the gift message value as $getgiftMessage = $item->giftMessage();



But I am not able to get the value.



Any help would be appreciated.










share|improve this question
















How to get the gift message value in Magento2.1.7?



I am getting the gift message value as $getgiftMessage = $item->giftMessage();



But I am not able to get the value.



Any help would be appreciated.







magento2 giftmessage






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Ronak Rathod

57011




57011










asked yesterday









AmyAmy

3329




3329












  • Are you trying to fetch it from quote?

    – Ramkishan Suthar
    yesterday











  • I am fetching it from order.

    – Amy
    yesterday











  • I think you will get only gift message id from there.

    – Ramkishan Suthar
    yesterday

















  • Are you trying to fetch it from quote?

    – Ramkishan Suthar
    yesterday











  • I am fetching it from order.

    – Amy
    yesterday











  • I think you will get only gift message id from there.

    – Ramkishan Suthar
    yesterday
















Are you trying to fetch it from quote?

– Ramkishan Suthar
yesterday





Are you trying to fetch it from quote?

– Ramkishan Suthar
yesterday













I am fetching it from order.

– Amy
yesterday





I am fetching it from order.

– Amy
yesterday













I think you will get only gift message id from there.

– Ramkishan Suthar
yesterday





I think you will get only gift message id from there.

– Ramkishan Suthar
yesterday










1 Answer
1






active

oldest

votes


















0














You can get Gift message for order item using below code.



public function __construct(
MagentoGiftMessageApiOrderItemRepositoryInterface $orderItemGiftRepo
)
$this->orderItemGiftRepo = $orderItemGiftRepo;


public function getGiftMessage($orderId, $orderItemId)

$giftMessage = $this->orderItemGiftRepo->get($orderId, $orderItemId);
$giftMessage->getMessage(); // This will give you message



I hope it will helpful :)






share|improve this answer























  • I want to call gift message in phtml file.

    – Amy
    yesterday











  • Then you can put this code in block file and call getGiftMessage() function

    – Ramkishan Suthar
    yesterday










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%2f267013%2fhow-to-get-the-gift-message-value-in-magento2-1-7%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









0














You can get Gift message for order item using below code.



public function __construct(
MagentoGiftMessageApiOrderItemRepositoryInterface $orderItemGiftRepo
)
$this->orderItemGiftRepo = $orderItemGiftRepo;


public function getGiftMessage($orderId, $orderItemId)

$giftMessage = $this->orderItemGiftRepo->get($orderId, $orderItemId);
$giftMessage->getMessage(); // This will give you message



I hope it will helpful :)






share|improve this answer























  • I want to call gift message in phtml file.

    – Amy
    yesterday











  • Then you can put this code in block file and call getGiftMessage() function

    – Ramkishan Suthar
    yesterday















0














You can get Gift message for order item using below code.



public function __construct(
MagentoGiftMessageApiOrderItemRepositoryInterface $orderItemGiftRepo
)
$this->orderItemGiftRepo = $orderItemGiftRepo;


public function getGiftMessage($orderId, $orderItemId)

$giftMessage = $this->orderItemGiftRepo->get($orderId, $orderItemId);
$giftMessage->getMessage(); // This will give you message



I hope it will helpful :)






share|improve this answer























  • I want to call gift message in phtml file.

    – Amy
    yesterday











  • Then you can put this code in block file and call getGiftMessage() function

    – Ramkishan Suthar
    yesterday













0












0








0







You can get Gift message for order item using below code.



public function __construct(
MagentoGiftMessageApiOrderItemRepositoryInterface $orderItemGiftRepo
)
$this->orderItemGiftRepo = $orderItemGiftRepo;


public function getGiftMessage($orderId, $orderItemId)

$giftMessage = $this->orderItemGiftRepo->get($orderId, $orderItemId);
$giftMessage->getMessage(); // This will give you message



I hope it will helpful :)






share|improve this answer













You can get Gift message for order item using below code.



public function __construct(
MagentoGiftMessageApiOrderItemRepositoryInterface $orderItemGiftRepo
)
$this->orderItemGiftRepo = $orderItemGiftRepo;


public function getGiftMessage($orderId, $orderItemId)

$giftMessage = $this->orderItemGiftRepo->get($orderId, $orderItemId);
$giftMessage->getMessage(); // This will give you message



I hope it will helpful :)







share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









Ramkishan SutharRamkishan Suthar

2,24721334




2,24721334












  • I want to call gift message in phtml file.

    – Amy
    yesterday











  • Then you can put this code in block file and call getGiftMessage() function

    – Ramkishan Suthar
    yesterday

















  • I want to call gift message in phtml file.

    – Amy
    yesterday











  • Then you can put this code in block file and call getGiftMessage() function

    – Ramkishan Suthar
    yesterday
















I want to call gift message in phtml file.

– Amy
yesterday





I want to call gift message in phtml file.

– Amy
yesterday













Then you can put this code in block file and call getGiftMessage() function

– Ramkishan Suthar
yesterday





Then you can put this code in block file and call getGiftMessage() function

– Ramkishan Suthar
yesterday

















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%2f267013%2fhow-to-get-the-gift-message-value-in-magento2-1-7%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

Sum ergo cogito? 1 nng

三茅街道4182Guuntc Dn precexpngmageondP