How To Find Your Salesforce Organization (Org) ID

The Salesforce Organization (Org) ID is the unique identifier for your Salesforce identity. This information is helpful when opening cases with Salesforce Support, especially when requesting new features be enabled.

Improved Setup User Interface enabled

  • Login into SalesForce account
    From the top-right screen, select Setup
  • Go to your Company Profile.
    Scroll down and select Company Profile from the list of the left.
  • Look for Salesforce Organization ID.
    In the “Organization Detail” section, look for “Salesforce Organization ID” field starting with 00Dxxx.

Improved Setup User Interface disabled:

  • Open your Salesforce Settings.
    Click on your name in the upper right and then select Setup.
  • Go to your Company Profile.
    Scroll down and select Company Profile from the list of the left.
  • Look for Salesforce Organization ID.
    Look for Salesforce Organization ID. This is your Salesforce ID number.

Lightning Experience

  • From the top-right screen, click on the Gear symbol and click on “Setup”
  • On the left hand side of the screen scroll down and go to: Settings > Company Settings > Company Information
  • On the next screen scroll down the page and on the right hand side look for the field called “Salesforce.com Organization ID” starting with 00Dxxx

 

Note: The Org ID of your production environment is different than your Sandbox Org ID. Whenever a Sandbox is refreshed, a new Org ID is established.

Wp Ninja Form Addon for email modification.

Ninja Forms is a free WordPress plugin or easy tool for creating forms. It is a powerful tool through which you can create forms via drag and drop feature. In this article we are creating a short code for “All Fields” without showing colon “:” in email.

Basically ninja form fixed the colon “:” in their mail template for “All Fields” short code.

Copy below code and paste in theme’s function.php file.

function my_nf_all_fields_shortcode( $atts, $content = '' ) {
global $ninja_forms_fields, $ninja_forms_processing;

if ( ! isset ( $ninja_forms_processing ) )
return false;

$html = isset ( $atts['html'] ) ? $atts['html'] : 1;

if ( 1 == $html ) {
// Generate our "all fields" table for use as a JS var.
$field_list = '<table><tbody>';
} else {
$field_list = '';
}
foreach ( $ninja_forms_processing->get_all_fields() as $field_id => $user_value ) {
if ( ! $user_value )
continue;

$field = $ninja_forms_processing->get_field_settings( $field_id );
$type = $field['type'];
if ( ! isset ( $ninja_forms_fields[ $type ] ) || ! $ninja_forms_fields[ $type ]['process_field'] )
continue;

$value = apply_filters( 'nf_all_fields_field_value', ninja_forms_field_shortcode( array( 'id' => $field_id ) ), $field_id );

if( isset( $field[ 'data' ][ 'admin_label' ] ) && $field[ 'data' ][ 'admin_label' ] ){
$label = $field[ 'data' ][ 'admin_label' ];
} else {
$label = $field['data']['label'];
}
$label = strip_tags( apply_filters( 'nf_all_fields_field_label', $label, $field_id ) );

if ( 1 == $html ) {
$field_list .= '<tr id="ninja_forms_field_' . $field_id . '"><td>' . $label .'</td><td>' . $value . '</td></tr>';

 

} else {
$field_list .= $label . ' - ' . $value . "\r\n";
}
}

if ( 1 == $html )
$field_list .= '</tbody></table>';

return apply_filters( 'nf_all_fields_table', $field_list, $ninja_forms_processing->get_form_ID() );

}

add_shortcode( 'ninjaformsallfields', 'my_nf_all_fields_shortcode' );

Code Where we have have made changes.


$field_list .= '<tr id="ninja_forms_field_' . $field_id . '"><td>' . $label .'</td><td>' . $value . '</td></tr>';


Shortcode

[ninjaformsallfields]

Use above short code in “Email & Action” tab of Ninja Forms.

Wp Plugin Widget Logic

widgetlogicplugin

This plugin gives every widget an extra control field called “Widget logic” that lets you control the pages that the widget will appear on. It provide a text field “Widget logic” you write any WP’s Conditional Tags, or any general PHP code.


See Example

widgetlogic

In our theme I have created a menu area on header top right side visible one for non logged in user and one for logged in user. Simply I create two menu and using it on Header Top Right widget section by using “Custom Menu” individual widget.

See I am using WordPress conditional tags in widget logic text field.

Click Here for seeing all WordPress conditional tags where you can use them as per your requirements.

This is free plugin and available on WordPress Repository. For downloading this plugin please click on download button.

Download

Flamingo Address Book WordPress Plugin

Flamingo is a free WordPress plugin created to be a total CRM package. With this version, you can manage your contact list and messages submitted via contact form plugins. It has not yet matured, but we are enhancing it rapidly. I have recently used it in our website. It store complete information submitted by the visitor as well as additional information like ip address, browser, url etc. Important thing it also support Contact Form 7.

Woocommerce Free Gift Coupons Plugin

Give away a free item to any customer with the coupon code

With WooCommerce Free Gift Coupons, you can give away a free item(s) to any customer with the correct code. This can be to reward a specific customer or to encourage customers to spend more in order to be eligble for the bonus item.

Start rewarding customers

WooCommerce Free Gift Coupons works very similarly to the other coupon types. Free Gift Coupons allow all the same Usage Restriction and Usage Limits as other coupon types, such as by email address, minimum cart total, etc. However, instead of a discount, the customer is rewarded with a free gift item.

The coupon is redeemed exactly like other coupons. When a coupon is applied successfully, the free gift is automatically added to the cart and the customer may continue shopping or checkout normally.

=== WooCommerce Free Gift Coupons ===

2015.12.08 – version 1.0.9
* Fix: class $version variable
* Tweak: Update WordPress tested against 4.4
* Add: GPL3 license

2015.11.09 – version 1.0.8
* Fix: don’t squash other free shipping coupons

2015.10.13 – version 1.0.7
* Fix: make free shipping specific to free gift only. To use: Free Shipping must be enabled and set to “requires a valid free shipping coupon” if you don’t wish to make the entire order’s shipping free
* New: Add compatibility for adding Subscription as free gift

2015.09.25 – version 1.0.6
* Fix: allow free shipping with free gift

2015.05.06 – version 1.0.5
* Tweak: code improvements in coupon options output

2015.02.03 – version 1.0.4
* WooCommerce 2.3-compatible: switch to Select2

2014.11.12 – version 1.0.3
* Fix “non-static method WC_Free_Gift_Coupons::add_order_item_meta() should not be called statically”

2014.09.11 – version 1.0.2
* Fix “Sorry, this product cannot be purchased.” bug when adding points discount with Points and Rewards extension

2014.07.05 – version 1.0.1
* Fix: wc_add_error() to wc_add_notice()
* Fix: add variation attributes to cart/order if free gift is variation

2014.05.27 – version 1.0
* Initial release

2013.10.31 version 1.0 beta
* Beta release

Sales Page:

http://www.woothemes.com/products/free-gift-coupons/

Download:

Download Now

Run a function before sending email in contact form 7

Contact Form 7 is one of the most popular form management plugins available on WordPress repository. Which provide user friendly interface for managing form and email body. We can also manage addition settings like success or failure message form redirection etc in plugin settings.

We have on_sent_ok and wpcf7_before_send_mail which allow us to run our own custom commands before and after form submission. on_sent_ok is a JavaScript action hook. By using this hook, you can specify a JavaScript code that you wish to run after the form is successfully submitted. You will find the Additional Settings field at the bottom of the contact form page. Simply insert the following line into it

on_sent_ok: "location = 'http://example.com/';" 

I recently needed to create a function that needed to send sms to website owner for calling their executive to the visitor using Contact Form 7.

The code below creates a similar custom function before a Contact form 7 form is submitted. We need to add this code in theme’s functions.php file, adding the wpcf7_before_send_mail hook as an add_action call.

add_action('wpcf7_before_send_mail', 'my_custom_function');
 
function my_custom_function($cf7) {
    //Put PHP here
}

One thing to remember if you try and use echo to try and show any output, this will not be displayed because Contact Form 7 is designed to work using AJAX commands that execute PHP.

If you want to use form field data, we can grab this using regular $_POST variables as below:

	
add_action( 'wpcf7_before_send_mail', 'my_custom_function' );
 
function my_custom_function($cf7) {
   $output = "";
   $output .= "Name: " . $_POST['name'];
   $output .= "Email: " . $_POST['email'];
   $output .= "Message: " . $_POST['message'];
 
 file_put_contents("putoutput.txt", $output);
}

In this example, I have used file_put_contents php function which save form submitted data as a regular text in text file. The file is saved in the WordPress site root directory.