2

This will give you the ids of the rules applied to the quote separated by comma. public function __construct( ---------- \Magento\Checkout\Model\Session $checkoutSession, \Magento\SalesRule\Api\RuleRepositoryInterface $ruleRepositoryInterface, ...


1

@PKTG, I seem to have had a similar issue. If you have followed the standard approach to retrieve the gift message, adding the following piece of code snippet would most likely help fix the issue. Let me know in case of any questions. $gift_object = $this->_orderGiftRepo->get($order->getId()); $gift_message = $gift_object->getMessage(); } catch ...


1

You can use below code to check Customer is Logged in Or Not ? Using Object Manager : $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->get('Magento\Customer\Model\Session'); if($customerSession->isLoggedIn()) { // customer login action } In Controller : $this->_objectManager->get('...


1

@andhi Irawan you can achieve same thing in Magento 2 using below code. create events.xml on path Namespace\ModuleName\etc\adminhtml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="adminhtml_block_html_before"> ...


Only top voted, non community-wiki answers of a minimum length are eligible