How to validate form on keyup event in Magento2
Let’s say for example you need to validate customer registration form as customer types. You want to use the events like keyup,change,focusin,focusout etc. For the solution, all you need to do is add new js using requirejs-config.js, But I created a new module. Module files are as below. Create app\code\Vky\Core\registration.php …
How to add custom tab in product view page in Magento2
In this Post We will know How to add custom tab in product view page in Magento2? Folder structure:- 1. First of all You have to create a registration.php inside app/code/Webcreta/Customtab/registration.php [php] <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, ‘Webcreta_Customtab’, __DIR__ ); [/php] 2. Create a module.xml in app/code/Webcreta/Customtab/etc/module.xml [php] <?xml …
How to flush cache programmatically in magento2?
How to flush cache programmatically in magento2? The answer is here, You just need to add this cache flush code to your magento site by following just some easy steps, Define constructor – pass Magento\Framework\App\Cache\TypeListInterface and Magento\Framework\App\Cache\Frontend\Pool to your file’s constructor as defined below : [php] …
10 Interesting Facts about Magento
Magento is a leading ecommerce platform. It has appear up as the most effectual and cause-forcible platform for e-businesses around the globe. Several successful stores have gain their prosperity through Magento. Since its launch in 2008, Magento has successfully established itself as one of the …
How to recover hacked Magento site
There are main 2 reason to hack magento website. 1. Outdated Magento version. 2. Magento security patches missing. A hacked website loss trust on customer they will never do interactions on any hacked website. Generally in hacked website credit/debit card data stolen and misused. Customer …
How to add admin panel Custom Menu in Magento?
Added a new tab in the admin panel take a look at the picture Folder structure:- Here is what i have in my files:- 1) IN — app/etc/modules/Shraddha_CreateAdminController.xml [php] <?xml version=”1.0″?> <config> <modules> <Shraddha_CreateAdminController> <active>true</active> <codePool>community</codePool> </Shraddha_CreateAdminController> </modules> </config> [/php] 2) IN– app/code/community/Shraddha/CreateAdminController/etc/config.xml [php] <?xml version=”1.0″?> …
Restrict the date on second CJuiDatePicker based on selected date in first CJuiDatePicker
Hello guys, Having issue in datepicker where end date is greater then start date do as below. [php] <pre class=”prettyprint”>//booking_from datepicker <?php $this->widget(‘zii.widgets.jui.CJuiDatePicker’,array( ‘id’ => CHtml::getIdByName(get_class($model) . ‘[booking_from]’), ‘name’=>’booking_from’, ‘model’=>$model, ‘attribute’ => ‘booking_from’, //’flat’=>true, ‘model’=>$model, ‘options’=>array( ‘dateFormat’ => ‘D, d M yy’, ‘showAnim’=>’slide’,//’slide’,’fold’,’slideDown’,’fadeIn’,’blind’,’bounce’,’clip’,’drop’ ‘changeMonth’=>true, ‘changeYear’=>true, …
Remove index.php from magento url on aws ec2 cloud
Hello Guys, On AWS EC2 cloud instance if you have to remove index.php from the URL then you have to tweak apache2.conf file. Edit apache2.conf file and file below code. <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> You can find …
Import data from CSV sheet to Database in Yii
In this post we will see how we can Import data from CSV sheet to Database in Yii. For this You just have to download a JPhpExcelReader Extension. [php] $itu = CUploadedFile::getInstance($model,’csv_file’); $data = new JPhpExcelReader($itu->getTempName()); $rows = array(); for($j=1; $j<=$data->sheets[0][‘numRows’]; $j++) { if($j == 1){ $header …
Resize Images in Magento
Hello Guys, Today i am going to show you how to resize category image in Magento. Use this code to resize images for category. [php] public function getResizeImage(Mage_Catalog_Model_Category $category, $width = 250, $height = 250) { // return when no image exists if (!$category->getImage()) { …