When you want to check a variable is an array or not in PHP. Please follow the following snippet.
The following will help you to get attribute names instead of ID numbers when handling product attributes
Getting customer details, there is handy function out there in Magento to achieve this. When working with Magento it’s very common that you need this information. So we are discussing how to get customer details in Magento. Follow the below steps Get customer Id from session in Magento Using the $customerId we can load the […]
To modify or alter a drupal view query, follow the below steps. Views are brilliant piece of functionality that can be added to drupal via a module. Step 1 Navigate to sites/all/modules/yourmodule and create your module.info file, to inform our module is ready to install on the system. yourmodule.info Step 2 Declare hook_views_api, as this […]
We can change single table’s engine, using a single query. For example, here I am changing a table engine from MyIsam to Innodb You can read more details in here
Today we are discussing insert a post programmatically in WordPress. Everyone knows how to add a post from the WordPress’s beautiful backend. This will be helpful if you want to use automated script add all your posts into WordPress. The same reason I used this technique in one of my websites. If you want to […]
How to get categories for a product in Magento, use the below snippet code anywhere in the magneto.
How to override Magento controller, must be a good practice whenever we want to add/update a new functionality to current Magento controller functions. Why overriding controllers? Controller is the entry point for any incoming request in Magento. To handle this Magento declares numerous functions in the Controller file mainly called actions. Suppose you want to […]
Everyone must be excited about the new windows 10 look and feel. But one question remains how to change the default lock screen timeout time. Please follow the below steps. How to change lock screen timeout in Windows 10 Step-1 : Press Windows icon and pull out the menu. Then click the settings Step-2 :Settings […]
How to find out how many times a web page shared on Facebook Everyone uses at least one social media websites every day. Did you ever think how do the social media websites are active? It’s the users who share or posts new content, their thoughts etc. When coming to Facebook, one the prominent platform, […]
If you want to get the children categories recursively, you can use: Get all children categories given a category id in Magento. This will retrieve all sub – sub categories recursively.
Building a Magento website is easy when comparing to figure out a good Magento hosting solution for the website. There are plenty of Magento hosting recommendations in the internet, but most of them are really confusing and sometimes misleading. Usually Magento developer companies suggest for the server, depending on the load and features of the website. […]
Magento Newsletter Tutorial When running an e-commerce store it is necessary to send out promotional emails and campaigns. Apparently, Magento having built in newsletter functionality and it’s easy to use. It allows site administrators to create and send email campaigns from admin panel. Before going to Magento newsletter page, we just need to set Magento email […]
A clean and neat looking theme is crucial for your online presence. Here comes WordPress easy to setup, featured rich website builder. WordPress has a great online presence when it comes to personal blog, movie website, shopping cart and what not. Market share trends for content management systems for websites, WordPress leads with 60%. So […]
How to Choose the Best WordPress Hosting? Webhosting is the key component of every successfull website. Choosing the best webhost will improve not only the traffic but also the SEO rankings. Up time of your web host really matters in this case. There are different types of the hosting such as free, shared, vps, dedicated […]
Selecting your target hosting type First selecting your target hosting type. In fact there are 3 hosting types, 1)shared hosting 2) VPS hosting 3) Dedicated hosting . I would suggest select shared hosting if your daily traffic below 3000 visits. If your daily limits exceeds this better consider any of the options 2 or 3. […]
If you need to redirect to external URLs in Magento you have to use There are similar method uses in Magento to redirect to another Magento internal path. $path would be an internal module/controller/action/param1/param1value page
To do this, go to System => Configuration => Catalog => Catalog => Search Engine Optimization and set “Use categories path for product URL’s” to “no”.
Using caching in Magento website is an essential part of development. Magento is well known for eating up the server resources. The below code snippet helps when someone deals with heavy data in Magento website.
Products are the basic thing in the e-commerce shop and Magento has good features to create it from the backend. But certain situations we have to create it via programmatically. For example a bulk upload from a API, or another store etc. How to create Magento simple products programmatically We can use API for this, […]
Getting all sub(recursively) categories in Magento, not an easy task. I’ve seen so many of them looping through the category model and creating overhead to the server. It’s mainly because the each model creates and SQL query. Good performance Single Query Solution: Let $parentCategory be your Main Category, then this collection will load all subcategories, […]
Magento stores all the configuration values in the database, but it has a particular format to retrieve the data. Getting data from system configuration table is easy. sectionName, groupName and fieldName are present in etc/system.xml file of your module. It will automatically fetch config value of currently viewed store as you have the option to enable […]
When we need to get currency code from order object use the below code 1) currency code from order object 2) With currency symbol
When making certain changes to Magento, it is necessary to clear the cache in order to reflect the changes to reflect. There are three ways to clear the cache in Magento: Through the Magento Admin Panel website. Log in to your Admin Panel account Go to the System -> Cache Management section Click on […]
It’s quick way to convert currency from one currency to another in Magento and vice-versa. It is useful when you are using multiple currencies in a shop. From below code, you can convert from currency to another chosen currency. Changing currency from one to another
A batch file contains a series of DOS commands and is commonly used to automate frequently performed various tasks. It makes the life as just save your commands in one file and double click on it from your Windows machine. Create a .bat file […]
Stopping the indexer process, its an easy task. When Magento starts indexing it updates the status in the table index_process to working. If script stopped working due to error or server problem, the status remains the same working and won’t bring the process back to pending automatically. One solution is log in to your database via PHPMyAdmin(or any […]
Re-indexing in Magento, such a huge process, so most people suggests to run it via command line instead of using browser. This could be a host problem, may be Magento timing out. However your catalog size increases its a pain to work with re-indexing. The Magento indexer file located in shell dir Checking status of […]
PHP Fatal error: Call to undefined function add_action() in p-content/plugins/hello.php, I was getting the above error in the error logs. Assuming someone calling this URL directly. To avoid these I’ve added the WordPress good practice line on top of the script.
Load product by id in Magento is very simple action And when we need to load the product by sku For the product collection in magento