How to redirect non www or non https url to www and https

This is very common problem to everyone to redirect non www urls to www with https. You can follow simple .htaccess rules to implement it.

The only real difference here is that first we redirect from non-WWW to WWW then we check for HTTPS and redirect it. If it does not work, try this… Read More »

Magento 1 how to get custom option values in cart or order page from quote

When customer select custom option from product and click add to cart then magento save these values in quote object. So you can get easily from quote object by loading anywhere in application. If you are on cart or checkout page on frontend then  you can get cart object from session.

If you want… Read More »

WHM cpanel magento 2 php cli command error

If you saw error php-cli: command not found when running magento command php bin/magento, then you need to run following commands. To fix this error, you need to enable php cli mode. Run following command source /opt/cpanel/ea-php72/enable It will solve your problem. but it will come again when you will reboot your server. You need… Read More »

SetEnv fails with Apache 2.4

If Apache error logs show below error message Invalid command ‘SetEnv’, perhaps misspelled or defined by a module not included in the server configuration The control of internal environment variables that are used by various Apache HTTP Server modules are controlled by the module mod_env. By default module ‘mod_env’ will not be enabled in apache2.4.… Read More »

Magento 2 – How to view CMS block in checkout page

Using CMS blocks, admin can easily change content of the store. CMS blocks can be used to display banners, sale blocks, return policies, important information message on some sections of the store etc. CMS blocks can carry plain text or HTML/JS/CSS code which means they can be used for even more complex content delivery like sliders,… Read More »

How to create shipping modules in magento

Shipping method is one of first requirements of every magento website. It is very easy to make it for any shipping carrier providers. Shipping method calculate the rates based on customer address and total product weights. Lets start by explaining how Magento handles shipping, and what would be needed to achieve our goal. When anyone… Read More »

How we can add each type of attribute filters in magento

Sometimes we need to add custom condition on product listing or some custom pages to fetch data. Here you will how easily we can add conditions with addAttributeToFilter .  addAttributeToFilter is a method that can be called on EAV collections in Magento. This includes product collections, category collections, customer collections and many more. In short,… Read More »