Sync/Export orders to google spreadsheet

Can anyone help with a solution through script or extension to automatically export/sync data to google spreadsheets such that whenever an order is placed, it instantly adds the data to the sheets on my drive as well. I have tried zapier for this purpose but it has task limits and also has 5 minutes intervals in between. i want a method to do this process instantly.

Unable to view Mageplaza extension configuration page. A blank page is displayed instead of configuration page

I have installed Mageplaza SMTP extension in my magento site (v 2.3.1). The problem I am facing is that I am unable to see its configuration page when I try to access it from Stores >> Configuration >> Mageplaza >> Smtp

The problem doesnot happen only with SMTP extension. I have tried Google Recaptcha of Mageplaza and it is showing me the same issue.

Instead of showing the configuration page in backend its showing a blank page.

Undefined property: DOMDocument::$documentElement in

Notice: Undefined property: DOMDocument::$ documentElement in /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php on line 148

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Config\Dom::_mergeNode() must be an instance of DOMElement, null given, called in /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php on line 148 and defined in /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php:164 Stack trace: #0 /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php(148): Magento\Framework\Config\Dom->_mergeNode(NULL, ”) #1 /var/www/html/projectnenny/vendor/magento/framework/Config/Reader/Filesystem.php(151): Magento\Framework\Config\Dom->merge(‘_readFiles(Object(Magento\Framework\Config\FileIterator)) #3 /var/www/html/projectnenny/generated/code/Magento/Framework/ObjectManager/Config/Reader/Dom/Proxy.php(95): Magento\Framework\Config\Reader\Filesystem->read(‘global’) #4 /var/www/html/projectnenny/vendor/magento/framework/Interception/C in /var/www/html/projectnenny/vendor/magento/framework/Config/Dom.php on line 164

Normally i use php 7.2 for Magento 2. Recently i received a complete project in Magento that are not not running in php 7.2, so i change my php version to 7.0 also. Install all require extension in php 7.0 version

and when open my project Homae page receiving this error. after that also run all issue related commands like:- sudo apt-get install php7.0-dom and sudo apt-get install php7.0-xml

but my problem is not solved.

Please help

I want to enable captcha on guest checkout in Magento 2.3.1. I am using one step checkout

I want to enable captcha on guest checkout in Magento 2.3.1. I am using the one-step checkout.

I know that it is a simple question and you can follow this nice article to do that: https://www.mageplaza.com/kb/how-to-enable-customer-login-register-captcha-magento-2.html

However, I believe that there is something wrong with my Magento installation and it is not showing me “Check out as guest” option in form section inside Captcha.

Can I enable “Check out as guest” option manually using the command line or terminal or FTP?

Magento 2 reindex error

Magento 2.2. Please can anyone help with this I am trying to run this in CLI

php bin/magento indexer:reindex catalogsearch_fulltext

Notice: getimagesize(): Read error! in /home/redjohnco/public_html/vendor/magento/module-catalog/Model/Product/Image.php on line 420 

I thought this issue would be bypass or resolved by switching from GD2 to ImageMagick

Magento 2 Create Shipping Method with Delivery Options

I created a new shipping method for home delivery and I want to be able to present options such as a building/unit/room number. My thought was when the user selected this method the options would appear with a text field for the user to enter information before moving to the payment page. Any guidance on the best way to make this happen?

This is in Model/Carrier

/**      * @param \Magento\Framework\App\Config\ScopeConfigInterface $  scopeConfig      * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $  rateErrorFactory      * @param \Psr\Log\LoggerInterface $  logger      * @param \Magento\Shipping\Model\Rate\ResultFactory $  rateResultFactory      * @param \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $  rateMethodFactory      * @param array $  data      */     public function __construct(         \Magento\Framework\App\Config\ScopeConfigInterface $  scopeConfig,         \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $  rateErrorFactory,         \Psr\Log\LoggerInterface $  logger,         \Magento\Shipping\Model\Rate\ResultFactory $  rateResultFactory,         \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $  rateMethodFactory,         array $  data = []     ) {         $  this->_rateResultFactory = $  rateResultFactory;         $  this->_rateMethodFactory = $  rateMethodFactory;         $  this->_logger = $  logger;         parent::__construct($  scopeConfig, $  rateErrorFactory, $  logger, $  data);     }      /**      * @param RateRequest $  request      * @return \Magento\Shipping\Model\Rate\Result|bool      */     public function collectRates(RateRequest $  request)     {         if (!$  this->getConfigFlag('active')) {             return false;         }          /** @var \Magento\Shipping\Model\Rate\Result $  result */         $  result = $  this->_rateResultFactory->create();          $  shippingPrice = $  this->getConfigData('price');         $  method = $  this->_rateMethodFactory->create();         $  method->setCarrier($  this->_code);         $  method->setCarrierTitle($  this->getConfigData('title'));         $  method->setMethod($  this->_code);         $  method->setMethodTitle($  this->getConfigData('name'));         $  method->setPrice($  shippingPrice);         $  method->setCost($  shippingPrice);         $  result->append($  method);           return $  result;     }      /**      * @return array      */     public function getAllowedMethods()     {          return [$  this->_code=> $  this->getConfigData('name')];     } 

I tried to create checkout_index_index.xml and add a custom phtml page to it with

<script type="text/javascript">     require([         'jquery',         'Magento_Checkout/js/model/quote',     ], function (jQuery, quote) {         jQuery(document).ready(function () {             quote.shippingMethod.subscribe(function (value) {                 if (quote.shippingMethod() && quote.shippingMethod().carrier_code == 'your_custom_shipping_method_code') {                     var customBlock = "<div class ='custom-information'><input type="text" id="your_custom_id"></div>";                     if((!$  ('.custom-information').length > 0)) {                         $  ('#checkout-shipping-method-load').append(customBlock);                     }                 });             });         });     }); </script> 

And then I added in Model

namespace Magento\Checkout\Model;  class GuestShippingInformationManagement implements \Magento\Checkout\Api\GuestShippingInformationManagementInterface {     /**      * @var \Magento\Quote\Model\QuoteIdMaskFactory      */     protected $  quoteIdMaskFactory;      /**      * @var \Magento\Checkout\Api\ShippingInformationManagementInterface      */     protected $  shippingInformationManagement;      /**      * @param \Magento\Quote\Model\QuoteIdMaskFactory $  quoteIdMaskFactory      * @param \Magento\Checkout\Api\ShippingInformationManagementInterface $  shippingInformationManagement      * @codeCoverageIgnore      */     public function __construct(         \Magento\Quote\Model\QuoteIdMaskFactory $  quoteIdMaskFactory,         \Magento\Checkout\Api\ShippingInformationManagementInterface $  shippingInformationManagement     ) {         $  this->quoteIdMaskFactory = $  quoteIdMaskFactory;         $  this->shippingInformationManagement = $  shippingInformationManagement;     }      /**      * {@inheritDoc}      */     public function saveAddressInformation(         $  cartId,         \Magento\Checkout\Api\Data\ShippingInformationInterface $  addressInformation     ) {         /** @var $  quoteIdMask \Magento\Quote\Model\QuoteIdMask */         $  quoteIdMask = $  this->quoteIdMaskFactory->create()->load($  cartId, 'masked_id');         return $  this->shippingInformationManagement->saveAddressInformation(             $  quoteIdMask->getQuoteId(),             $  addressInformation         );     } } 

and started to modify it but I think I may be headed in the wrong direction,

Thoughts on the best way to accomplish this?

Thanks!

Magento 2.3.1 varnish and cloudlfare – pages not caching as expected

We have a Magento 2.3.1 store that uses CloudFlare and has Varnish enabled. If we use wget or curl to load a page, that page is cached in Varnish if we try wget or curl again on that same page.

However, if we then test that URL via a browser, the page is not cached. It is then cached after the first browser visit, and then remains cached on reloads from a browser.

We added the CF+Varnish rules as listed at: https://support.cloudflare.com/hc/en-us/articles/200169376-Can-I-use-Cloudflare-and-Varnish-together-

but that did not seem to make a difference. We’re using the recommended Magento default.vcl file that is generated.

Any ideas what could be stopping a wget/curl from loading a page into the Varnish cache such that any request from a browser would be served that cached page instead of causing Varnish to cache the page again?

Magento2 How to query value in catalog_eav_attribute?

I’ve added a new value in catalog_eav_attribute, similar to Use for Promo Rule Conditions or Used in Product Listing. How do I call that property of the attribute in a phtml view template?

For example it’s called my_custom_field and I want to test for it to be true or false, like:

    <div class="additional-attributes-wrapper table-wrapper">         <table class="data table additional-attributes" id="product-attribute--specs-table">             <caption class="table-caption"><?= /* @escapeNotVerified */ __('More Information') ?></caption>             <tbody>             <?php foreach ($  _additional as $  _data): ?>                 <?php if($  _data['my_custom_field']): ?>  //this code is where I need to check if the attribute's property is true or false                     <tr>                         <th class="col label" scope="row"><?= $  block->escapeHtml(__($  _data['label'])) ?></th>                         <td class="col data" data-th="<?= $  block->escapeHtml(__($  _data['label'])) ?>">                           <?php echo  /* @escapeNotVerified */ $  _helper->productAttribute($  _product, $  _data['value'], $  _data['code']);?>                         </td>                     </tr>                 <?php endif;?>             <?php endforeach; ?>             </tbody>         </table>     </div> <?php endif;?> 

I get an error of “Error filtering template: Notice: Undefined index: my_custom_field” when the template is called.

This is how I created the attribute property: Magento 2 Load database value to custom field in product attribute