sushantvishwa1990
sushantvishwa1990
Magento
399 posts
Solutions For Magento Developrs
Don't wanna be here? Send us removal request.
sushantvishwa1990 · 2 years ago
Text
Magento 2:: Create Patch File
Step 1: The file to be changed should be added to the git. git add -f lib/web/jquery/jquery.validate.js Step 2: Then make the changes to the core file. Step 3: After making the changes run git diff lib/web/jquery/jquery.validate.js > m2-hotfixes/patch-name.patch This creates the patch in m2-hotfixes Step4: Finally apply the patch git apply m2-hotfixes/patch-name.patch
View On WordPress
0 notes
sushantvishwa1990 · 2 years ago
Text
Magento 2: Working with Wishlist
Number of items in Magento 2 wishlist sidebar By default, you can see the 3 last added wishlist items in the sidebar. This number is hardcoded in Magento\Wishlist\CustomerData\Wishlist class. There is no corresponding option in the admin panel. To override it we will use dependency injection functionality. – add the following line in the module di.xml to tell Magento to use our class instead of…
View On WordPress
0 notes
sushantvishwa1990 · 3 years ago
Text
Magento: Solve Reindex issue with Elasticsearch:
Magento: Solve Reindex issue with Elasticsearch:
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }' curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
View On WordPress
0 notes
sushantvishwa1990 · 3 years ago
Text
Php validation alphanumeric with spaces
Php validation alphanumeric with spaces
<?php $input = 'abcD 546aqwe'; if(preg_match('/^[a-zA-Z0-9\s]+$/', $input)) { // $input was alpha numeric with space echo 'true'; } else{ echo 'false'; } ?>
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Generate: Instagarm Token
https://spotlightwp.com/access-token-generator/
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Magento::1 Hide Skin Folder
Magento::1 Hide Skin Folder
Create a .htaccess file with the below content. Options All -Indexes
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Magento 2:: A session is active. You cannot change the session module's
Magento 2:: A session is active. You cannot change the session module’s
vendor/magento/framework/Session/SessionManager.php // Enable session.use_only_cookies ini_set('session.use_only_cookies', '1'); Remove above code with the below one. if (!$this->isSessionExists()) { // Enable session.use_only_cookies ini_set('session.use_only_cookies', '1'); }
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Magento 2 How to add js in Catalog Product Edit Section.
Magento 2 How to add js in Catalog Product Edit Section.
1. In your custom module create a file catalog_product_edit.xml app/code/VendorName/ModuleName/view/adminhtml/layout/catalog_product_edit.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="js"> <block…
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Magento 2 Could not save product "product_id" with position 0 to category category_id”
Magento 2 Could not save product “product_id” with position 0 to category category_id”
https://github.com/khasru/magento2UrlRewritebug https://github.com/magento/magento2/commit/97d5dcc7fbea21a870a17062e0d1e7d2ca1515ea
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Magento 2 .gitignore file
Magento 2 .gitignore file
# Metadata /.buildpath /.cache /.metadata /.project /.settings atlassian* /nbproject /robots.txt /sitemap /sitemap.xml /pub/sitemap /pub/sitemap.xml /.idea /.gitattributes # Magento specific…
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
WordPress:: update plugin or theme from localHost
WordPress:: update plugin or theme from localHost
View On WordPress
0 notes
sushantvishwa1990 · 4 years ago
Text
Magento 2 :: Invoice Date Issue (Override Magento core files)
Magento 2 :: Invoice Date Issue (Override Magento core files)
In Magento 2 you need to create a module. app/code/Vendorname/Mage2rewrite/etc/module.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Vendorname_Mage2rewrite" setup_version="1.0.0"/> </config> app/code/Vendorname/Mage2rewrite/composer.json { "name":…
Tumblr media
View On WordPress
0 notes
sushantvishwa1990 · 5 years ago
Text
Create a Git Repository In a project
Create a Git Repository In a project
View On WordPress
0 notes
sushantvishwa1990 · 5 years ago
Text
Magento2:: Image Field in system configuration
Magento2:: Image Field in system configuration
system.xml
Logo Image Allowed file types:PNG, GIF, JPG, JPEG, SVG. Vendor\Module\Model\Config\Backend\Image\logo folder/folder/logo
system.xml
_mediaDirectory->getAbsolutePath($this->_appendScopeInfo(self::UPLOAD_DIR)); } /** * Makes a decision about whether to add info about the scope. * * @return boolean */ protected function _addWhetherScopeInfo() { return true; } /** * Getter for…
View On WordPress
0 notes
sushantvishwa1990 · 5 years ago
Text
Magento2:: Disable Cache For Home Page Only.
Magento2:: Disable Cache For Home Page Only.
View On WordPress
0 notes
sushantvishwa1990 · 5 years ago
Text
Mysql: Search Duplicate Entry Based on Column Value.
Mysql: Search Duplicate Entry Based on Column Value.
SELECT * FROM `tmm_sales_shipment_track` WHERE order_id IN (SELECT order_id FROM `tmm_sales_shipment_track` GROUP BY order_id HAVING COUNT(order_id) > 1) ORDER BY `created_at` ASC
View On WordPress
0 notes
sushantvishwa1990 · 5 years ago
Text
Magento 2:: Join Collection
Magento 2:: Join Collection
$recycleCollection = $this->_postFactory->create()->getCollection() ->addFieldToFilter('main_table.customer_id', array('eq' => $customer_id)) ->addFieldToFilter('main_table.website_id', array('eq' => $websiteId)) ->addFieldToFilter('main_table.is_bulk', array('eq' => $isbulk)); $recycleCollection->getSelect()->joinLeft( ['fedexrecycle' => $this->_tableName4], "main_table.recycle_order_id =…
View On WordPress
0 notes