Page 5 - Samdoit Infotech
-
- September 05, 2015
Introduction:
Few days ago I received a comment from one of the reader of my blog to show an example on CRUD (Create, Read, Update and Delete) with the database. So in this post we will explore the use of CRUD operation using SQLite database in PhoneGap application.Description:
CRUD can be described as a process, which helps the user to add, view, search and modify the information inside the database.Here are the basic steps which demonstrates CRUD operation.
- Create or add new entries
- Read, retrieve, search or view existing entries
- Update, modify or edit existing entries
- Delete, deactivate or destroy existing entries
Before doing any operation on database let’s initialize the database first, either using HTML5 local database concept or using SQLite plugin.
Let’s add the following javascript to initilze the database.
var databaseName ="DummyDB";var databaseVersion ="1.0";var databaseDisplayName ="DummyDatabase";var databaseSize =2*1024*1024;var myDB ="";//Accessing -
- January 11, 2014
Magento e-commerce has a standard newsletter function that is useful if you get it to work. This post will highlight the major reasons why your newsletter is not sent to your customers.
- Magento schedules and sends the newsletters using a cronjob script called “cron.php” in your Magento installation root folder. To schedule this cronjob you need to access your web server using SSH (You can use for example Putty). For more information see the Magento wiki.
- If you don’t want to schedule the cronjob you need to go twice to the cron.php file in your browser e.g. www.yoursite.com/cron.php every time you want to send your newsletter. The first time it will schedule the newsletter and the second time it will send it.
- After login with ssh type: crontab -e This will open an editor. The contents may be empty if you have never set up crontabs for the current user.
- To schedule the cronjob every 5 minutes you should enter: */5 * * * * php /absolute/path/to/magento/cron.php
- Save and close
- Now you can
-
- January 11, 2014
1.1 Defining your module
Once you've set up Magento and entered it into the root Magento directory, go into app/code/local/. This will be where your module lives on the system. The first folder is your namespace, usually your company name. Then directory underneath this is your module name.
All your module folders will live underneath this module directory. We will create many here, but for starters just create the etc/ and controllers/ directories. We will also create a file called config.xml in this etc/ directory. This is the main, and incredibly important, the configuration file for your module.
Create this folder structure now. Your directory layout should look as follows:
[magentodir]/app/code/local/NAMESPACE/MODULENAME/etc/config.xml
[magentodir]/app/code/local/NAMESPACE/MODULENAME/controllers/
The content of config.xml should be as follows. It adds this module to the rest of the <modules> in the Magento system. And everything is in a module, even the 'core' Magento classes
-
- September 05, 2013
Workflow model in vTigercrm how to create custom workflow.
It have simple steps to follow to make custom workflow.Step1:create one new file (registerworkflow.php) to register workflow in ur vTiger root .add all these line in that file. -
- September 05, 2013Create default widget for vtigerYou change happen in following files
modules/Users/Users.php modules/Users/language/en_us.lang.php modules/Home/language/en_us.lang.php include/Home.phpStep 1want to see your widget in your home page you follow this step.Add your widget identifier to $homeorder_array in Users.php search "$homeorder_array"I added 'SOLD'var $homeorder_array = array('HDB','ALVT','PLVT','QLTQ','CVLVT','HLT','OLV','GRT','OLTSO','ILTI','MNL','OLTPO','LTFAQ', 'UA', 'PA', 'SOLD');Do the same in the function getHomeStuffOrder($id) function$this->homeorder_array = array('UA','PA','ALVT','HDB','PLVT','QLTQ','CVLVT','HLT','GRT','OLTSO','ILTI','MNL','OLTPO','LTFAQ','SOLD');The above will allow vtiger to pull the widget into your myprefrecnes view so you can select to make visibleStep 2:Adding language file to how you look like add line in these files modules/Users/language/en_us.lang.php modules/Home/language/en_us.lang.php search using "Home page order" and add like