To convert a Vue.js website to Nuxt.js, you need to follow a few steps. Nuxt.js is a framework built on top of Vue.js that provides server-side rendering (SSR) and other useful features for building universal web applications. Here's a general process to convert your Vue.js website to Nuxt.js:Set up a new Nuxt.js project: Create a new directory for your Nuxt.js project and initialize it using the Nuxt.js CLI. Run the following command in your terminal:npx create-nuxt-app <project-name>...

 

Generally we faced one issue on creating a clone of our any production site or staging server. The issue is that after setup the project, we are unable to login to admin while we entering the correct username and password. To fix this issue, follow the step: Go to PhpMyadminOpen table core_config_dataRun this command: SELECT * FROM core_config_data WHERE path LIKE '%cookie%'Change the value for the row which path is "web/cookie/cookie_domain"For my setup, I setup...

 

To get the Magento metapackage: Log in to your Magento server or localhost path where you would like to install the Magento. Make sure you have proper permissions to use that folder.Change to the web server docroot directory or a directory that you have configured as a virtual host docroot.Create a new Composer project using the Magento Open Source or Magento Commerce metapackage. Magento Open Source composer create-project --repository-url=https://repo.magento.com/...

 

Instead of look on the server directly, we should check first the Magento setup. Generally, this errors comes when the setup missing the .htaccess file in the pub/static folder. Here below I mentioned the .htaccess file code. You can copy it and create a .htaccess file inside pub/static folder and paste. <IfModule mod_php5.c> php_flag engine 0 </IfModule> <IfModule mod_php7.c> php_flag engine 0 </IfModule> # To avoid situation when web server...

 

On transferring a Magento website Database running on MySQL 5.7.34 to MariaDB 10.2.39, I get the following error: [naveenos@server2 etc]# mysql m1_db < db.sql ERROR 1005 (HY000) at line 4080: Can't create table `catalog_product_relation` (errno: 140 "Wrong create options") SQL Strict mode was already off on this MySQL server. MariaDB [(none)]> select @@sql_mode; +------------+ | @@sql_mode | +------------+ | | +------------+ 1 row in set (0.00 sec) MariaDB...

 

We all are developers and generally we do mistake in files and folders permission. It might be intentionally to fix any issue or by mistake. But how to fix the permissions back when it happened. Just go to your Magento setup root folder and run these all commands: find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find ./var -type d -exec chmod 777 {} \; find ./pub/media -type d -exec chmod 777 {} \; find ./pub/static -type d -exec chmod 777 {} \; chmod 777...

 

Getting error on Magento connect manager "Access is locked. Please try again in a few minutes." Go to var/ folder and open file /var/brute-force.ini Change the following two first lines to: brute-force-bad-attempts-count = 0 brute-force-diff-time-to-attempt = 180 and remove all other lines and Save.

 

PHP, Java and other languages provide replace all functionality to replace any character by any specific character. But REGEX is best method to replace or remove any specific value using pattern. Suppose, we have input string is

$xyz = "This is my best (friend)";
and we want to remove words from "()". So it so straight forward and simply:
"\\(.+?\\)"
That's it....

 

In my previous post [How to programmatically add shipment with a tracking number to any order : PART I], you found that how can we generate shipment for an order programmatically. Here we are going to learn next step to add tracking number with generated shipment. We are assuming that you are going to use UPS (United Parcel Service) shipping method for site order. Once you submitted your order to UPS, will get a tracking number from UPS dealer. And now you have to add this tracking number...

 

We are assuming that we have an order incremented id. and we want to make shipment for this order. Here also we are assuming that invoice has been generated for order already. so we are going to generate only shipment. $orderId = '1000001'; $order = Mage::getModel('sales/order')->loadByIncrementId($orderId); Here we are checking the current status of order that it is processing or not. Why we are checking? Because we do not want to generate shipment for any order that has been...

 

I tried to wrote this code when I was working on a cron file for all orders. My client wants a cron file that get all orders information including all ordered item and their detail. First, I searched on google but I didn't found any exact solution then I tried below code: By below code I got all orders on site: $orders = Mage::getModel('sales/order')->getCollection(); Now, I am going to fetch all ordered items for each order. foreach ($orders as $order) { $items =...

 

Magento provides following types of page layout in default. 1column, 2columns-left, 2columns-right, 3columns, empty, and print. But sometimes we need to change design in layout and we do not want to affect on other pages. For example, we want to use different layout for all static pages. and we want to use 2columns-left layout style but do not want to change in existing layout. That time what we have to do? Yes, we can create our custom layout. To make your custom layout, follow...

 

Magento provides lot of inbuild functionalities. Using "protected function _prepareColumns()" function we can create or add new column to the grid. Like: protected function _prepareColumns() { $this->addColumn('first_name', array( 'header' => Mage::helper('custommodule')->__('First Name'), 'align' => 'left', 'width' => '50px', 'index' => 'first_name', )); $this->addColumn('last_name', array( 'header' => Mage::helper('custommodule')->__('Last...

 

Have you upgraded your magento version OR installed any module/extension manually? If you getting this error: "Fatal error: Call to a member function addFieldToFilter() on a non-object ......" after doing any step above then you have to following steps to solve: Step 1: Re-index the all tables. a) To re-index Go to your site admin panel. b) System > Index Management c) Select all rows and submit button with reindex selection in dropdown. Step 2: Clear all cache and session. a) To...

 

Today we are working on cron file that will call all model methods of my custom module. But we are getting error: "Magento: Fatal error: Call to a member function getModelInstance() on a non-object in appMage.php on line 141". when we are using: require_once 'app/Mage.php'; $customobj = Mage::getModel('custommodule/custommodule'); It was amazing for us that we developed many extension but never get such type of issue. What may be reason? Oooofff........hmmm.... Then we...

 

Sometimes we need to give free shipping on some specific conditions but we do not want to enable free shipping method. Then what to do? After did much R&D and read many blogs I found a solution. It was so simple, it is possible by shopping cart price rule. First disable to Free shipping method from Shipping Methods section. Then create a shopping cart price rule for free shipping by following steps: 1. Go to Promotions > Shopping Cart Price Rules. 2. Click on Add New Rule...

 

We can add or remove anythings in magento core files but it is not a perfect solution. To make a perfect solution, we are creating a small module. By this module you will able to add / remove navigation links from customer account dashboard. Firstly, we create a module XML file to access from local folder: Step1: Create a file "Nos_Navigation.xml" in app\etc\modules\ folder Step2: Put below code in this xml file true local ...