Go to Admin » Appearance » Widgets » and move Gabfire Widget: Social into that MastheadOverlay zone
use Magento\Quote\Model\QuoteFactory; public function getCouponCodeFromQuote(QuoteFactory $quoteFactory, $quoteId)
If you need to know which coupon affected a specific cart item (useful for per‑item discount debugging).
class GetCouponFromOrder
public function execute()
// For logged-in customers if ($this->customerSession->isLoggedIn()) $customerId = $this->customerSession->getCustomerId(); $quote = $this->quoteRepository->getActiveForCustomer($customerId); else // For guest customers $quote = $this->checkoutSession->getQuote(); magento 2 get coupon code programmatically
public function getAllCoupons(): array
public function fromOrder(int $orderId): ?string isLoggedIn()) $customerId = $this->
$quote = $quoteFactory->create()->load($quoteId); return $quote->getCouponCode();
Figradihiina