Skip to content

Instantly share code, notes, and snippets.

View vijayrami's full-sized avatar
🎯
Magento2

Vijay Rami vijayrami

🎯
Magento2
  • India
View GitHub Profile
@vijayrami
vijayrami / configurable_product.php
Last active July 23, 2021 08:59
configurable_product.md
<?php
ini_set("memory_limit","-1");
ini_set('max_execution_time', 300);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
use Magento\Framework\App\Bootstrap;// add bootstrap
@vijayrami
vijayrami / Infortis_Ultimo_Theme_Customisation.md
Last active August 17, 2020 06:21
Infortis Ultimo Theme Customisation and Bugs

Siderbar related products checkbox not working.

in app/design/frontend/Infortis/base/Infortis_Base/templates/product/list/slider.phtml

change role="select-all" to data-role="select-all"

Remove review tab and review link from product detail page.

Add catalog_product_view.xml file in app/design/frontend/Infortis/ultimo_child/Magento_Catalog/layout

@vijayrami
vijayrami / Porto_theme_Customization_and_bugs.md
Last active August 10, 2020 08:33
Porto Theme Customization and bugs

Remove JS from WYSIWYG editor

##### Add New file in app/design/frontend/Smartwave/porto_child/Magento_Cms/layout/cms_index_index.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.

*/

@vijayrami
vijayrami / m2codesample.md
Last active February 5, 2023 10:12
Magento2 Code Samples

Add image path in CSS

background: url('@{baseDir}images/icon_sprite.png');

Add Static Block

In .phtml tempalte file:

<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?>

In CMS content:

{{block class="Magento\\Cms\\Block\\Block" block_id="block_identifier"}}

In layout .xml file:

@vijayrami
vijayrami / .htaccess
Created June 1, 2020 05:59
Magento2 improved .htaccess
############################################
## overrides deployment configuration mode value
## use command bin/magento deploy:mode:set to switch modes
# SetEnv MAGE_MODE developer
############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi
@vijayrami
vijayrami / prestashop.txt
Created May 31, 2020 06:43
Prestashop Common constant
https://catalogo-onlinersi.net/en/content/33-prestashop-17-global-variables
@vijayrami
vijayrami / magento2commands.md
Last active April 13, 2022 17:48
basic Magento2 Comamnd list
@vijayrami
vijayrami / laravelschema.txt
Created April 24, 2020 18:02
laravel Table Schema
$table->string('id')->unique();
$table->unsignedInteger('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
@vijayrami
vijayrami / magento_installation.txt
Last active April 25, 2020 08:48
Install Magento 1.9 (With Sample Data)
## Magento 1 + SampleData
gunzip magento-sample-data-1.9.2.4-2016-10-11-07-38-13.tar.gz
tar xf magento-sample-data-1.9.2.4-2016-10-11-07-38-13.tar
sudo apt-get update && \
sudo apt-get install -y git wget unzip
git clone https://github.com/OpenMage/magento-mirror.git ./ ;
@vijayrami
vijayrami / CsvImportRequest.php
Created April 14, 2020 18:09
Create Custom request to apply validation
create file in App/Http/Requests/CsvImportRequest.php
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CsvImportRequest extends FormRequest
{
/**