I LOVE TO DEVELOPMENT

I AM

Blog

Magento 2 Rating Not Visible In Store



Hello Friends,

Today we discuss about Magento Rating. I have heard many times during development that many developer has concern that Rating not display in specific store. Same i have faced when i was started learning magento 2.

Actually it is not an bug there are two possibilities why magento 2 not showing or visible ratings on product.

1. Rating attribute is not active.
2. Rating attribute is not selected by store.

Rating attribute should be active and must need to select store under rating visibility.

Go To > Store > Rating

Add new one or edit existing and select active and select store and save.


Clear Cache and refresh page.

That's It...!!! Have A Nice Day...!!!

Can We Generate Sitemap In Magento 2 And Submit To Google Console For Seo Crawl...!



Hello  Friends,

Today we will learn how to generate Sitemap in magento 2 for crawl website and submit it to google. When we developed any site Google rank is the key point of success. Google console also provides facility where we can submit sitemap.xml file for crawl and search on google search engine.

To Generate sitemap

Go To > Admin > Marketing > Site Map

Filename - For ex - sitemap.xml
Path - '/' will be on root example: "/sitemap/" or "/" for base path (path must be writeable)

Now click on Save & Generate. after processing check path which we have placed during adding new sitemap.xml where new file is generated.



Now You can submit sitemap.xml file to google console. to submit sitemap to google just refer google webmaster tool where you can find sitemap option under Crawl.

That's It...!!! Have A Nice Day...!!!

Magento 2 Add Store URL In Static Block



Hello Friends,

Static blocks are very useful. we can use to place static contents but still admin user has power to change it any time from admin.

We can place it simply by using below methods.


To Add Store Url we can use

{{store url=""}}


To add any category page url we can use

{{store url="path of category"}}


To add cms page links

{{store url="path of cms page"}}


Taking one example to know more transparent. We are using footer links block



Just call that in another cms page to better understanding.


Now Clear cache and refresh the page. Links are added and working fine for redirect to specific page as we given store url.

You can refer previous post how we can call static blocks Different Ways To Call Static Block.

That's It....!!!  Have A Nice Day...!!!

Magento 2 Different ways to use static blocks



Cms Static block is most powerful where we want to place static content but we can change it by admin.

Direct place static content and change directly to files it's not recommended now a days. we should have control to change static contents. we can also reuse code in other places it's also a feature.

Add CMS Static Block.

Admin > Content > Blocks


Let's take an example, We have added Footer Links Block with Identifier footer_links.

Now we will discuss different ways of use.

I have found 3 different ways where we can call cms block. i am sharing with you my experiments.

1 - Layout xml file.

<referenceContainer name="content">
    <block class="Magento\Cms\Block\Block" name="block_identifier">
        <arguments>
            <argument name="block_id" xsi:type="string">block_identifier</argument>
        </arguments>
    </block>
</referenceContainer>

reference name can be change as per requirement where we want to place static block.

2 - Cms Content

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

3 - Directly in .phtml files.

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

This amazing feature of magento cms static block is so much useful.

That's It...!!! Have A Nice Day...!!!

Magento 2 Redirect Customer to Account Dashboard after Logging in




Costumer is a main focus for any websites success. We will discuss about magento feature which should be use on basis of customer behavior.

We are discuss about when customer is login we need to send customer to My Account section or Customer can stay on page where he was on the time of login or before login page.

Some where we have already experience that when we add wishlist product than first step it redirect us to login page and after login page it redirect us to where we was on page. in some sites it is stated that customer will always redirect to My Account Dashboard.

Let's Check the configuration option for the same.

Go To > Admin > Configuration > Customers > Customer Configuration > Login Options > Redirect Customer to Account Dashboard after Logging in


That's It...!!! Have A Nice Day...!!!

Magento 2 Account Sharing Option By Website And Global



Today i will share customer account sharing configuration information. we can configure Global and By Website.

Global - Customer account information is shared with each and every website and store in the Magento.

Per Website - Customer account information is limited to the website where we have created the account.

To Configure above scenarios in admin panel Go to

Admin > Store > Configuration > Customer > Customer Configuration > Share Customer Accounts

Behavior of the account information will be as per selection as we discussed Global And Per Website Point.


That's It...!!! Have A Nice Day...!!!

Magento 2 Secret Key for preventing CSRF (Cross-site request forgery)



Hello Friends,

First of all i will explain CSRF. CSRF stats for Cross-site request forgery. some times our website can be stuck due to malicious code or forgery to transmit unauthorized commands to be executed. a malicious website can transmit such commands, specially-crafted image tags, hidden forms, and JavaScript and harm to our website.

Magento Provides More Security than we assume and always try to make better. I am explaining one of the security of magento is Secret Key in Urls.

Whenever we open magento back-end we show security key existed in url. if we try to obtain remove key and enter it will always redirect to dashboard. it will check each and every time new url will call.

I am explaining how we can enable/disable security key from admin section but it is highly recommend always security key should be configured as yes.

Go To > Store > Configuration > Advanced > Admin > Security > Add Secret Key to URLs







That's It...!!! Have A Nice Day...!!!

Magento 2 Maximum Login Failures to Lockout Account Security



Hello Friends,

Today we will check an existing feature magento provide for security reasons.

Maximum Login Failures to Lockout - By default magento settings gives 6 attempts to try to login before account has been locked. Leave empty to give unlimited attempts. generally in other websites gives 3 attempts.

Will explain how we can configure settings for Maximum Login Failure To Lockout setting.

Go To > Store > Configuration > Advanced > Admin > Security 

Change Settings for Maximum Login Failures to Lockout Setting.



Magento has given much more functionaly and securities i will explain in future posts.

That's It...!!! Have A Nice Day...!!!

Magento 2 Admin Login Into Same Account From Multiple Computers. Security Reasons.



Hello Friends,

I have faced issue on time on starting phase of magento 2 learning to login issue with multiple computers in admin section with same credentials.

On starting phase of learning magento 2 learning i was assume  that it is magento 2 bug but actually it is not a bug of magento. it is functionality. magento 2 have given for security reasons.

If we want to share account we can change configurations. i am giving you brief.

Go To > Stores > Configuration > Advanced > Admin Tab > Admin > Security Section.

Admin Account Sharing To Yes.




Clear Cache and Try to obtain login with different machines. It Works...!!!

That's It...!!! Have A Nice Day...!!!

Magento 2 How To Enable Flat Rate by Per Order And Per Item.



Hello  Friends,

Today we will learn to enable flat rate by per order and per item.

Per Order - Per Order means flat rate will apply on order regardless counting items. when we place an order flat rate will be per cart order we are placing.



Per Item - Flat Shipping will be apply per items which we are adding into cart. when order placed shipping changes apply to each and every items which we have added into cart.


That's It...!!! Have A Nice Day...!!!

Magento 2 How To Configure Free Shipping In Magento Admin



Hello Friends,

Today we will learn to configure free shipping in magento 2 admin.

Go To > Stores > Configuration > Sales > Shipping Methods > Free Shipping

Enable To Yes


Minimum Order Amount - We can set minimum order amount when free shipping will be apply.

Ship to Applicable Countries - we can select if needed to apply on specific countries. depends on selection we can select specific countries on Ship to Specific Countries

Ship to Specific Countries - Depends on Ship to Applicable Countries selection.

Sort Order - We can configure sort order.

That's It...!!! Have A Nice Day...!!!


Magento 2 Add store information.



Hello Friends,

Today we will learn add store information in magento 2. where magento e-commerce store information can be store.

Go to Stores > Configuration > General Tab > General section > Store Information


Store Name - Store Name (Store View)
Store Phone Number - Phone Number of Store (Store View)
Store Hours of Operation - Working Days And Hours of store (Store View)
Country - Country of store (Website) 
Region/State - State of store (Website) 
ZIP/Postal Code - Zip of store (Website) 
City - City of store (Website) 
Street Address - Street Address of store (Website) 
Street Address Line 2 - Street Address Line 2 of store (Website) 
VAT Number - VAT Number of store (Website) 

Store Name, Store Phone Number and Store Hours And Operations can add by store view other details will be by website.

That's it...!!! Have A Nice Day...!!!





Magento 2 Cart Rule Free Shipping For Specific Products




Hello Friends,

Today we will discuss cart rule how we can apply free shipping for specific products by selecting free shipping attribute.

First we need to create attribute on free shipping with yes/no option.

Use for Promo Rule Conditions to yes.




As a second step, we wil assign that attribute to specific attribute set which we are currently using in products.

After drag and drop click on save. attribute is ready to use.



Third step we will apply in product. select attribute to yes for free shipping


Now on forth step is the main part to create cart rule for apply free shipping on specific product.

Go to Marketing > Cart Price Rules > Add New

Rule Name :- Free Shipping
Websites :- Select website where want to use
Customer Groups :- which customer group will use this rule



Now Go to Actions section.


Apply the rule only to cart items matching the following conditions (leave blank for all items). 

Apply rule as given below screen shot.





Save rule and now rule is ready to use for specific products.

Clear cache and add new product.

That's it...!!! Have A Nice Day...!!!





How to configure magento 2 checkout totals sort order.



Hello Friends,

Today we will discuss how we can configure sort order on magento 2.

First of all we check where it will affect. i am attaching screenshot for more transparency for change this functionality.


Secondly need to change sort order on admin section and we look how it affects. to change in admin section please look below screenshot.

i have already make red marks where we can easily find where we need to change for easy usability.



Now Clear cahce and check.

Compare below screenshot with figure 1.


That's it...!!! Have a noce day.

Magento 2 Checkout Summary Section Sort Order.


We will add sort order to summary section. we will move item section before totals with use of totals on checkout page.

First of all we will need to override layout file in our theme as i am giving you example.

checkout_index_index.xml we will override in our theme.

As a second step we need to add layout rearrangement as we given below.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="sidebar" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="summary" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="totals" xsi:type="array">
                                                    <item name="sortOrder" xsi:type="string">99</item>
                                                </item>
                                                <item name="cart_items" xsi:type="array">
                                                    <item name="sortOrder" xsi:type="string">0</item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Clear cache and deploy static content deploy and refresh the page.

Thats it...!!! Have a noce day...!!!

Popular Posts

Have You Any Questins Let Us Know.

Contact Us
DENISH VACHHANI
Ahmedabad India