Wednesday 30 September 2015

Add Product to Cart in Magento Programmatically

Hello All,

To add product to cart I followed the below code and its work for me -

For this you need to pass parameter - product id as $param['pid'] & customer id as $param['customerid']
Picture
 


FindNerd’s Php questions and answers forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.


Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java questions and answers forum.

Tuesday 29 September 2015

How to Open Android App from Web Browser and Get Data from the App and Return Back to Web Browser

Sometime we a have a situation in which we use android app in our web application.In that situation you can use this.
For opening the android app first we have to check 2 conditions .
1. If the device is android or not.
2. In the android device if the app is installed or not.
1. If the device is android or not- If device is not android then we do not perform that functionality. In that case you can either disable the button or hide the button by using this:
 
  1. $(document).ready(function () {
  2. var isMobile = {
  3. Android: function () {
  4. return navigator.userAgent.match(/Android/i);
  5. },
  6. any: function () {
  7. return (isMobile.Android());
  8. }
  9. };
  10. if (isMobile.Android()) {
  11. $("[id$btnOpenapp]").show(); //show the button
  12. }
  13. else
  14. {
  15. $("[id$btnOpenapp]").hide(); //hide the button
  16. }
  17. });
2.If the app is installed or not-.....

- Read the full Blog at : How to Open Android App from Web Browser and Get Data from the App and Return Back to Web Browser

Our Android questions and answers  forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.

Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s ios developer forum.

Monday 28 September 2015

How to resolve error "Could not start the IIS Admin Service - error code -2146893818”

Whilst setting up Sharepoint 2013 on Windows server 2012 R2, we need the IIS Admin Service running on the server. But sometimes service stopped running and raised the error says "Could not start the IIS Admin Service - error code 2146893818".

Another applications having dependencies on IIS may raise the error that IIS is not installed even it is installed on the machine. This error occurs when IIS Admin Service is not running.

For environment : IIS 6, Windows Server 2012 R2

The reason behind this error is the corrupted Machine Key files. IIS depends upon these keys for encryption decryption of metabase keys and we need to make sure that Machine Key folder has full control permissions for both ADMIN and SYSTEM. If the full control permissions are not set, IISADMIN won't be able to read the configuration from the metabase without this key and it will fail to start.

-Read the complete Blog at : How to resolve error "Could not start the IIS Admin Service - error code -2146893818”

FindNerd’s Java developer forum  is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.

Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Php questions and answers forum.

Friday 25 September 2015

How to Use Mandrill SMTP in LARAVEL 5?

Using Mandrill SMTP in LARAVEL4 is easy to use by following below changes in cofig/mail.php
 
  1. return array(

  2. /*
  3. |--------------------------------------------------------------------------
  4. | Mail Driver
  5. |--------------------------------------------------------------------------
  6. |
  7. | Laravel supports both SMTP and PHP's "mail" function as drivers for the
  8. | sending of e-mail. You may specify which one you're using throughout
  9. | your application here. By default, Laravel is setup for SMTP mail.
  10. |
  11. | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log"
  12. |
  13. */

Mandrill-SMTP-in LARAVEL5

-Rad the complete Blog : How to Use Mandrill SMTP in LARAVEL 5?
 
FindNerd’s Php developer forum  is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.


Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java questions and answers forum.

Thursday 24 September 2015

Redirect URLs in Magento with Parameters

we can redirect urls in magento with parameters by using magento's default _redirect() function you have to create an array for parameters you want to use in url see the following blog for example: -

Read the complete code and full Blog at: Redirect URLs in Magento with Parameters

Magento-Logo
You can check more informative blogs and tutorials at java development blogs section and can also browse the java questions and answers forum for posting and viewing latest questions on Java development.

Apart from this, If you have any Php issue, you can post it at Php Questions and answers forum.

Wednesday 23 September 2015

Sending WhatsApp Message in .Net

Hi Friends!
This time I am here with a very small article about sending WhatsApp Message from your .Net application.
You need following things for that.

1-WART(WhatsApp Registration Tool)
This a tool with which you can get the password to be used in API.

2-WhatsApp Api for C#(Highly Unstable Currently and Without any proper documentation)
 
3- Any mobile number on which you are not using WhatsApp currently and You will not be using it in future for WhatApp(As your number may be blocked if you send multiple messages. Again the blocking criteria is uncertain and my number was blocked after 3-5 messages !!):-(
So first thing first. Download the WhatsApp Api for C# via nuget package manager. If you see a reference of the API in your reference,that's good. Otherwise download the API manually and add the reference.

whatsapp-reg

- Read the full Blog at: Sending WhatsApp Message in .Net

FindNerd’s Php developer forum  is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.

Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java questions and answers forum.

Tuesday 22 September 2015

How to make the confirmation receipt through python code in OpenERP(Odoo)?

In below example, I have written Python script to confirmation receipt through python code. Use below python code in your .py file :

  1. 'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, required=True, states={'confirm':[('readonly', True)]}),

odoo
- Read the full Blog at: How to make the confirmation receipt through python code in OpenERP(Odoo)?
FindNerd’s Php questions and answers forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.

Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java developer Forum.

Monday 21 September 2015

What's the difference between @Component, @Repository, @Controller & @Service annotations in Spring?

When we define the annotations “ @Component, @Service, @Controller, @Repository” with the classes, Spring automatically scan and identifies those classes and register the Bean definition with the ApplicationContext.
Difference between @Component, @Repository, @Controller & @Service annotations in Spring:
  1. The main difference between @Component, @Repository, @Controller & @Service annotations is that these are used for different classification.
  2. In our application we can have different layers like presentation, service, business, data access etc. To annotate a class for auto-detection by Spring, we should use the respective annotations as below.
    @Component - generic and can be used across the application. It is a basic auto component scan annotation, it indicates annotated class is a auto scan component.
    @Service - annotate classes at service layer level ( Indicates a Service component in the business layer).
    @Controller - annotated class indicates that it is a controller components, and mainly used at presentation layer.
    @Repository - a data access object (Indicates DAO component in the persistence layer which will act as database repository).
  3. We can use @Component for any auto component scan, but for better readability and better standards we should use respective annotations. @Repository, @Controller & @Service annotations serve as specializations of @Component annotation.
For Example of @Service and @Repository, Visit full Blog: What's the difference between @Component, @Repository, @Controller & @Service annotations in Spring?
You can check more informative blogs and tutorials at java development blogs section and can also browse the java questions and answers forum for posting and viewing latest questions on Java development.
Apart from this, If you have any Php issue, you can post it at Php Questions and answers forum.

Friday 18 September 2015

SQLite with Flex

Hello Readers! This blog is about how to use SQLite in Flex.
Before proceeding a brief introduction to SQLite. SQLite is a relational database management system contained in a small C programming library,it is an embedded SQL database engine and a compact library. It implements a self-contained, serverless, zero-configuration, transactional SQL database engine and the transactions are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures.There is no set up required and does not need to be configured before it is used.
And here goes the code!! In this the "name" and "password" will insert into the table named "login" when a user click the button.
 
  1. import flash.data.SQLConnection;
  2. import flash.data.SQLMode;
  3. import flash.data.SQLResult;
  4. import flash.data.SQLStatement;
  5. import flash.errors.SQLError;
  6. import flash.events.EventDispatcher;
  7. import flash.events.SQLErrorEvent;
  8. import flash.events.SQLEvent;
  9. import flash.filesystem.File;
  10. import flash.net.Responder;

  11. public class SQLHandler extends EventDispatcher
  12. {

  13. private var conn:SQLConnection;
- Read the complete set of codes and Full Blog at: SQLite with Flex
 
FindNerd’s Php questions and answers forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.

Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java developer Forum

Thursday 17 September 2015

How to create global variables in CakePHP?

The majority of the developers, develop skepticism in which, what's the correct place/Page in which they should declare the constant variable in cakephp.
Previous going to variable declaration, we must consider that any of us will work over a MVC platform and also we should not break the rules of MVC.
There are many place in which we are able to establish the particular constant variables in cakephp, these include practices


METHOD-1
Get a file referred to as core.php inside app/config/ folder involving cakephp setup listing.

Presently there you will need to open the particular core.php.
app/config/core.php

For you to declare a constant global variable in cakephp, core.php only create following synta

- Read the full Blog at: How to create global variables in CakePHP?

You can check more informative blogs and tutorials at java development blogs section and can also browse the java questions and answers forum for posting and viewing latest questions on Java development.

Apart from this, If you have any Php issue, you can post it at Php developer forum.

Wednesday 16 September 2015

This tutorial will help you to learn how to create rest api in cakephp. For this we need to follow the following steps:

Step1: Create a database and a table say "users"

Step2: Now we will create the Users Model, Veiw and Controller.
 
  1. users model:

  2. class User extends AppModel {


  3. }

Step3: Create a restful controller: RestUsersController.php
 
  1. <?php

  2. class RestUsersController extends AppController {

  3. public $uses = array('User');
  4. public $helpers = array('Html', 'Form');
  5. public $components = array('RequestHandler');
  6. public function index() {
  7. $users = $this->User->find('all');
  8. $this->set(array(
  9. 'users' => $users,
  10. '_serialize' => array('users')
  11. ));
  12. }

  13. public function add() {
- Read the complete Blog at: Creating RESTful API in Cakephp
 
FindNerd’s Php questions and answers forum is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.

Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java developer Forum

Tuesday 15 September 2015

How to search record from dynamic data list in Liferay 6.2

Hello Guy's
Some time many of us faces difficultly in searching record from dynamic data list in Liferay 6.2, so for your help below I am mentioning how you can do this-

Here I have created two methods for search record from dynamic data list in liferay 6.2. 
ddlRecordnew.get(i).getField("firstName").getValue()
Here :
"ddlRecordnew" is instance of List<DDLRecord> and "firstName" is field name of data list in dynamic data list. 
So now :
ddlRecordnew.get(i).getField("FieldName").getValue() 
Following method print the matched record from searchString to database.
  1. public void SearchDdlRecord(String searchString){
  2. List<DDLRecord> ddlRecordnew = null;
  3. try {
  4. ddlRecordnew = DDLRecordLocalServiceUtil.getDDLRecords(-1, Integer.MAX_VALUE);
  5. if (ddlRecordnew != null) {
  6. StringTokenizer strPermit = null;
  7. String ptype = null;

- Read full Blog at: How to search record from dynamic data list in Liferay 6.2
 
You can check more informative blogs and tutorials at java development blogs section and can also browse the java questions and answers forum for posting and viewing latest questions on Java development.

Apart from this, If you have any Php issue, you can post it at Php developer forum.

Monday 14 September 2015

Using JSON Web Services with Liferay


Liferay Plugin Portal JSON Web Services :- Liferay support the REST API. By Using That we have to create restful web services and the data format of that is JSON.
Liferay internally supports to create JSON services. it already have many portal JSON web services, these are simple URL calls by using web services, we can get the JSON data and use any where to consume web services.

In this tutorial I am guiding you about the Plugin Portal Web Services of Liferay. you can see all portal JSON web service by accessing following URL.





To make a restful web services follow the following steps:-
1. create service.xml in your plugin portlet project.
service.xml
service.xml
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2&_0.dtd">
  3. <service-builder package-path="com.evon">
  4. <author>manish</author>
  5. <namespace>JSONService</namespace>
  6. <entity name="Student" local-service="true" remote-service="true">
  7. <!-- PK fields -->
  8. <column name="studentId" type="long" primary="true" />
  9. <!-- Other fields -->
  10. <column name="name" type="String" />
  11. <column name="address" type="String" />
  12. <!-- Order -->
  13. <order by="asc">
  14. <order-column name="name" />
  15. </order>
  16. </entity>
  17. </service-builder>
In above code we have created an entity Student and taken some fields like studentId, name and address then build your service.xml. We have seen that the all necessary files are automatically generated in your project after successful build of service.xml.
2. We need to write java method according to our requirement. We have to….


You can check more informative blogs and tutorials at java development blogs section and can also browse the java developer forum for posting and viewing latest questions on java development.

Apart from this, If you have any Php issue, you can post it at Php Questions and Answers Forum