Validate Google Captcha via JavaScript

Suppose You have Form Similar to the code below <form id=”myformId” class=”col s12″ action=”” method=”post” novalidate> <input placeholder=”Name” id=”mpfaqs-form-fieldset-input” type=”text” name=”username”> <input placeholder=”Email” id=”mpfaqs-form-fieldset-input” type=”text” name=”useremail”> <input placeholder=”What is your …

Read More

Add Color Chooser in Module Configuration via system.xml

  Add the following code in your etc/adminhtml/system.xml <field id=”color_picker” translate=”label” type=”text” sortOrder=”1″ showInDefault=”1″> <label>Choose Color</label> <frontend_model>Vendor\Module\Block\ColorPicker</frontend_model> <comment>Choose FAQ mainpage heading color.</comment> </field> Now Insert the following code in your …

Read More

Create Image Upload in Configuration Magento 2

Create system.xml <field id=”countdown_product_page” translate=”label comment” type=”Magento\Config\Block\System\Config\Form\Field\Image” sortOrder=”10″ showInDefault=”1″ showInWebsite=”1″ showInStore=”1″> <label>Select Countdown for Homepage</label> <source_model>PME\FlashSales\Model\Config\Source\Timer</source_model> <frontend_model>PME\FlashSales\Block\Adminhtml\Form\Renderer\Config\Timers</frontend_model> </field> Create Uploader Class. Vendor\Module\Model\Config\Backend;   <?php namespace PME\FLashSales\Model\Config\Backend; class Image extends \Magento\Config\Model\Config\Backend\Image …

Read More

Joins In Magento 2

In this article we will learn magento2 mysql join queries. The Syntax of Join is $query = $salesRelatedProducts->getSelect() ->join( [‘rpt’ => ‘sales_related_products_list’], ‘main_table.sales_id = rpt.sales_id’ )->where(“main_table.sales_id = 3”); echo $query->__toString(); …

Read More