Magento: Get Payment Methods (All/Active/Used)

This article shows how to get payment methods in Magento 1. We will be fetching 3 types of payment methods. They are: 1) All Payment Methods 2) Active/Enabled Payment Methods 3) Payment Methods that have been used while placing orders To get all payment methods, we can either use Mage_Payment_Helper_Data or Mage_Payment_Model_Config class. To get … Read more

Magento: Get Customer Groups

This article shows how to get all customer groups name and id in Magento 1. To get all customer groups, we will be using Mage_Customer_Model_Resource_Group_Collection class. Here’s the code: $collection = Mage::getResourceModel('customer/group_collection'); $customerGroups = $collection->toOptionArray(); // adding a new element to the beginning of customerGroups array array_unshift($customerGroups, array('value'=>'', 'label'=>'Any')); Sample Output: print_r($customerGroups); Array ( [0] … Read more

PHP: Simple Pagination

This article shows how to create a simple pagination in PHP and MySQL. In the example code present in this article: – We will be fetching data from a MySQL database table. – We will be showing certain rows of data in first page and other rows will be displayed in next pages. – We … Read more

PHP MySQL: Simple CRUD (Add, Edit, Delete, View) using PDO

This article shows how to create a CRUD (Create, Read, Update, Delete) application in PHP & MySQL using PHP Data Objects (PDO). PDO is a PHP extension that provides an interface for accessing databases in PHP. PDO is portable and powerful. There are many good features of PDO. The best one is that it’s cross-database … Read more

Laravel: Simple CRUD (Add, Edit, Delete, View) [Beginner Tutorial]

This beginner tutorial/article shows how you can create a simple/basic CRUD (Create, Read, Update, Delete) system or application using Laravel. Laravel is a popular open-source PHP MVC Framework with lots of advanced development features. Installing Laravel has been explained here. Laravel Application Folder Structure After you have successfully installed Laravel, you need to know about … Read more

Laravel: Enable Proper Error Display

By default, you will see the following message in case any error occurs in your Laravel application: Whoops, looks like something went wrong. Whoops, looks like something went wrong. To show the exact error message details, you need to follow the steps below: Go to your Laravel root folder Rename .env.example to .env After this, … Read more

[SOLVED] Laravel Error: Failed to open stream: No such file or directory bootstrap/autoload.php

You might get the following error while trying to run Laravel for the first time. Warning: require(/var/www/laravel/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/laravel/bootstrap/autoload.php on line 17 Fatal error: require(): Failed opening required ‘/var/www/laravel/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/laravel/bootstrap/autoload.php on line 17 Problem Scenario: This error generally occurs when you download/clone Laravel from … Read more