1

How to get quote Id from quote table via Customer Id or email.

I have Customer id & email & i want to check if quote id exist or not how to do that via create new module or programming

What i want : I want to pass customer id & excepting quote data

Any Help much be Appreciated

  • what do you want exactly ? – BornCoder Feb 3 '17 at 7:19
  • 2
    U want Current Quote id or all quote id which belong to particulate custome? – Bhavik Feb 3 '17 at 7:20
  • @bhavik : i updated my question please check – magento12345 Feb 3 '17 at 7:32
  • @BornCoder i updated my question please check – magento12345 Feb 3 '17 at 7:32
4

You can fetch quote data from quote table by customer id:

 public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
       \Magento\Quote\Model\Quote $item, 
        array $data = []
    ) {
          $this->_item=$item;
        parent::__construct($context, $data);
    }

After than you can get quote data using:

$this->_item->getCollection()->addFieldToFilter('customer_id',$customerid)->getData();

Not the answer you're looking for? Browse other questions tagged or ask your own question.