Redirecting Custom URL to Home in Magento using URL Rewrites

Sometimes, you might need to redirect some custom URLs to home page of your Magento store. Let’s say, you used to own a website where there were a number of URLs (products, categories or static pages) and you have recently migrated to Magento, but you don’t have same pages or URLs anymore but you don’t want the users to land on a 404 page when they open a link that you previously shared on social media, etc. Instead, you can make them land on the home page of your store.

Magento has in-built feature of redirecting and rewriting URLs which I guess you are already familiar with. If not, you may refer to this Magento Documentation.

If you need to redirect an URL to home, you just need to set Target Path to ../ and set Redirect Type to Permanent (301). Refer the image below:

How to manage Stock Classes in Magento

In this blog, we will discuss how Stocks work in magento. There are certain setting which we can do from Magento Core files and from System > Configuration.

Firstly we will see what we can do from Magento Admin Panel

Configuring the Inventory Stock Options

  1. From the Admin panel, select System > Configuration.
  2. In the Configuration panel on the left, under Catalog, select Inventory.
  3. Click to expand the Stock Options section. Then, do the following:
    • If you want to show the OutOfStock products on the Frontend then set Yes Includes “out of stock” products in the list else set No to “out of stock” products from the lists.
    • If you want to display of the stock availability message on the product detail page, set Display products availability in stock in the frontend to Yes else set No
  4. Click to expand the Product Stock Options section. Then, do the following:
    • If you want the inventory options are available for this single product to manage your inventory then goto Manage Stock and set Yes else set No to Manage Stock
    • If you want that customer can order a product even if its quantity is below 0 then goto Backorders and from there we can set Allow Quantity Below 0 or we can set Allow Quantity Below 0 and Notify Customer or if we dont want the customer to order a praticular product if its quantity is below 0 then we can set No BackOrders
  5. Click the Save Config button to save the setting.

Secondly,we can also work with Magento Stock Inventory Core files.

For that, Magento has a specific module for handling the Stock, named as ‘ StockInventory ‘. Basically how it works, whenever we add a product to cart it goes to checkQuoteItemQty() function of Mage_CatalogInventory_Model_Observer Observer. This function checks whether the requested product is in Stock or not. If the quantity of that particular product is available then it goes to checkQuoteItemQty() function of Mage_CatalogInventory_Model_Stock_Item and again it reverifies for product availability and if it is available then it added that product to cart else it throws an error message showing ‘ This product is currently out of stock ‘.
So, from there you can also add the product directly to the cart without checking the product availability by modifying both the files. Most of the Stock related Operations are managed from these two files.

Next we have a Resource Model class named Mage_CatalogInventory_Model_Resource_Indexer_Stock_Default for simple, virtual and downloadable products, Mage_CatalogInventory_Model_Resource_Indexer_Stock_Configurable for configurable products and Mage_CatalogInventory_Model_Resource_Indexer_Stock_Grouped for Grouped Products which manages the Stock of Magento Products. These classes used for reindexing of the Stock Inventory.
Basically what these Resource Model files does is that it changes the Stock_Status whenever admin Reindex the Product Prices or Stock Status according to the Quantity Availability.
Whenever we place an order in Magento, the quantity of product reduces, and then again product that is ordered is reindexed. This is done by _updateIndex() function of the Mage_CatalogInventory_Model_Resource_Indexer_Stock_Default class which checks the quantity availability and changes the Stock_Status accordingly.

Admin Password Reset From Database

In this blog, we will see how we can edit/reset our lost magento admin password in few simple steps.

Step 1:

First of all open your phpmyadmin database of your website. it should look like this

phpmyadmin_db

Step 2:

admin_table

Then select the admin_user table from it . This table contains your admin account details as follows

Step 3:

Select the admin user record for which you want to change the login password and click to edit the record. This leads u to the edit window of the phpmyadmin record

edit_window

Step 4:

Now, as the password stored  in the magento are MD5 encrypted.So, first we need to encryt our password using MD5 encryption. For this we require two things

1) New Password -Any Password that you want to use.

2)Salt – any 2 letters word to make your password more secure.

I will choose “pass” as my New Password and “xy” as my Salt. Then use any of the MD5 generator site to generate the MD5 of the string “xypass”. In my case MD5 is “1028ff89cc8dae9372f21a3dd889b8c8”.

Now, In the password column, put in the md5:salt i.e in my case “1028ff89cc8dae9372f21a3dd889b8c8:xy” and then click “Go” to  save the changes.

This will change your admin password. Now you will be able to login with new password.

Always remember that you will use password alone as login password not password with the salt. In my case i will use “pass” as password not “xypass”.

Or simply go to the SQL menu of the admin_user table of your phpmyadmin database and execute the following query,

UPDATE admin_user SET password=CONCAT(MD5('YOUR_SALT+YOUR_PASSWORD'), ':YOUR_SALT') WHERE username='YOUR_USERNAME';

Magento 2 Responsive Banner Slider

Banner Slider is a powerful marketing tool for the eCommerce Store and allowed promoting your latest products or offers amazing slider effects and grab your customer’s attention. The Banner Slider enhances visual effects and User Experience helps of visitors’ then increases CTR for your product promotional campaigns.

This fully responsive banner slider Magento 2 extension will allow you to create stunning banner sliders to showcase your products, brands, promotional offers on the homepage or any CMS pages.
This Magento 2 extension provides a better configuration option from the admin side. Admin can display this slider on any CMS pages easily.
Here is Best Banner Slider Extension Link.

How It Works :
Banner Slider for Magento 2 has always been the most favorite extension for Banner Slider in the eCommerce Website. Banner Slider is so adored as you can use it easily.
As long as you can install Banner Slider into your Magento 2 website, choosing a good position for your banner can be done after two steps:
Step 1: Configure sliders and banners in the backend
Step 2: Review showcase of banners in frontend

For Proceeding further, We have to create a fresh module to lean a Magento 2 whenever We cover back-end and front-end development, as well as administration guides to help you get up and running with Magento 2.
here is the link.

Now as we have Done With the basic knowledge of module structure.
Let’s get started with the slider part.

Here we will Discuss 4 sliders which we found to be widely used these days by implementing Using coding technique.

BxSlider, FlexSlider, Owl Carousel, and UnSlider.

Let Get Dig a bit more into all these Sliders on by one.

BXSLIDER:

BxSlider is one of the most relevant and broadly used jQuery content slider. The setup/markup is basic and has widely used options to give full control to its client. For more information, follow this link

OWL CAROUSEL:

Owl slider is a simple and frequently used slider that comes with touch enable functionality and has a lot more free functionality like speed control, hover effect and many more. Due to this it also is known as a simplified feature-rich slider too. For more information, follow this link

FLEX SLIDER:

Flex Slider is basically a fully responsive slider that comes with different adaptive functionalities which include custom-navigation, Fade Animation and last but not the least Horizontal/vertical slide. Also, its been supported by all types of Browsers and also compatible with recent Jquery Version too.
For more information, follow this link

UNSLIDER:

UnSlider is known by its characteristics of Fluid, Flexible and minimalistic approach. It basically makes use of Html and CSS, due to which it’s more lightweight( near about 3kb) and has more ranges of custom options in the slider. For more information, follow this link

Now as We have a basic understanding of Slider.

Let Proceed Further with its implementation in Magento 2

Now, implement Slider JS file through require-config.js

Let’s see how BXSLIDER can be implemented here:

First, add the dependency of BXSLIDER into require-config.js, if you don’t know about require-config.js you can check this Link

var config = {
    map:{
        '*' : {
            "bxslider" : "Vendor_Module/js/bxslider/jquery.bxslider",
        }
    },
    shim : {
        "bxslider" : {
            deps: ['jquery'],
            export : 'bxslider'
        },
    }
};

In above snippet map is used to swap out module definitions via configuration and here we are swapping BX slider jquery file.
And as for shim is used to build 3-rd party dependency like below and for more information follow this link

var config = {
     "shim": {
        "3-rd-party-plugin": ["jquery"]
     }
 };

After adding dependence we will add the image into the slider inside HTML file and to customize we can use different properties that BX slider provide us, to check these properties follow this Link

like this, we can implement other sliders too.

Here we are: For Owl carousel

In require-config.js File.

var config = {paths: { 'owlcarousel': "Vendor_Module/js/owlcarousel"},shim: {'owlcarousel': {deps: ['jquery']}}};

Now create a div structure for a slider
call Slider Css File In Phtml or in XML

To call your Slider on the catalog page, Simply just add your slider phtml in catalog_category_view.xml.

After the above part has done run following cmd to see changes

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

php bin/magento cache:clean

5 Must Have Extensions for Your Magento 2 E-Commerce Store

Magento 2 is already very feature-rich. But, in terms of running a successful E-Commerce store, you might need to have some more features in your store for better user experience. The best must-have Magento 2 extensions on your Magento eCommerce Store in 2019 now in one place, no need to search a lot on google. 

Here, we will list the best Magento 2 extensions which one every Magento eCommerce website needs. All extensions listed here are tested and fully compatible with Magento version 2. The most important things of Best 5 Magento 2 Must have Extensions are Free and Paid with high-quality extensions and reliable vendors in the Magento 2 marketplace.

Since the launch of Magento 2, several vendors have been developing and launching numerous Magento extensions. Some are free, some are paid. To help you get started, we present you our rundown of the best 5 must-have extensions for your Magento 2 store. The following list will help expand your e-commerce store’s functionality and attract new customers as well.

Magento 2 Out of Stock Notification

You don’t need to lose a client on the off chance that one of your store’s items is out of stock. Using this module, customers can subscribe to out-of-stock items. When you’re prepared to offer that item, a notification can be triggered to the customer. It can be done in both ways, automatic and manual.

GeoIP Store and Currency Switcher

If you offer your products in multiple languages or currencies, then this extension can be found very useful. You can configure the extension so that it can detect the frontend user’s location and then can automatically switch language/store based on the configuration done from the Admin panel.

Store Credit Extension for Magento 2.x

Magento 2 Store Credit extension by xMagestore is a powerful tool to increase customer loyalty and motivate customers. Store Credit extension significantly supports e-commerce stores to encourage customers’ purchases by awarding them credit amount which is automatically added to their account balance.

Twilio SMS Extension for Magento 2.x

You might need to send order updates via text message, or might need to verify the phone number of customer, in that case, this extension can be very useful. It uses Twilio API services, so to use this module, you will need to have an account on Twilio.

Alternatively, you can use some other extensions, if you want to use any other API service provider:

MSG91
Text Local

SEO Suite Ultimate Extension for Magento 2

SEO Suite Ultimate is a full-featured SEO solution that covers a full range of on-page SEO activities: from optimizing small page elements to building a well-thought site architecture.

Conclusion

We sincerely hope that you found our list of the must-have extensions for your Magento 2 e-commerce store helpful and educative. As you can see, there are numerous ways to fine-tune your store, reach more customers, and provide a pleasant shopping experience.