Skip to main content
3 of 3
added 4 characters in body
Masud Shaikh
  • 1.2k
  • 22
  • 53

Magento2: Object DOMDocument should be created

I have installed the Tigren_Ajaxcompare extension. Got the error message below

Object DOMDocument should be created.

Block

<?php
/**
 * @copyright Copyright (c) 2017 www.tigren.com
 */

namespace Tigren\Ajaxcompare\Block;

use Magento\Framework\View\Element\Template\Context;
use Tigren\Ajaxcompare\Helper\Data;

class Js extends \Magento\Framework\View\Element\Template
{

    protected $_template = 'js/main.phtml';

    protected $_ajaxCompareHelper;

    public function __construct(
        Context $context,
        Data $ajaxCompareHelper,
        array $data = []
    )
    {
        $this->_ajaxCompareHelper = $ajaxCompareHelper;
        parent::__construct($context, $data);
    }

    public function getAjaxCompareInitOptions()
    {
        return $this->_ajaxCompareHelper->getAjaxCompareInitOptions();
    }
}
Masud Shaikh
  • 1.2k
  • 22
  • 53