logo

Blog

22 April

Apply coupon to Regular Price in Woocommerce
By: admin | Published On: Wed, 04/22/2020 - 22:13

When we apply coupon for discount its applied for sale price by default but we need to apply discount coupon on regular price so you can use this code on function.php By default cart and product show sale price after applying this code Regular price will be update on cart.

add_action( 'woocommerce_before_calculate_totals', 'add_custom_price', 10, 1);
function add_custom_price( $cart_object) {

    global $woocommerce;

    if ( is_admin()…
				  

22 April

How to add condition in views with custom field in DRUPAL 8
By: admin | Published On: Wed, 04/22/2020 - 22:13

If you want to add if condition in my "global custom text" field in views Drupal 8

Example 1: Check node status and put conditional link according to publish status

{% if  status  %}
   put your HTML as condition
{% endif %}

Example 2: In this example we are checking a field value is empty or not. according to value in we are showing link or status

{% if  field_final_layout_date is empty %}

put your HTML as condition

{% else…
				  

22 April

Custom code to add meta tag in Drupal 7
By: admin | Published On: Wed, 04/22/2020 - 22:13

In your theme's template.php file, you could add something like

/**
 * Implements hook_preprocess_html
 */
function THEME_NAME_preprocess_html(&$vars) {

  if (current_path() == 'my/custom/path') {
    $description = array(        
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => array(
        'name' => 'description',
        'content' => 'here all description goes',
      )
    );
    drupal_add_html_head($description, 'description');
  }

}

22 April

Set current date in custom form element in DRUPAL8
By: admin | Published On: Wed, 04/22/2020 - 22:13

Set current date in custom form element in DRUPAL8

Add this line at top

 use Drupal\Core\Datetime\DrupalDateTime; 

Add the following code to your form

function HOOK_form_alter(…
				  

22 April

When I want to installed Views Data Export module to export CSV then we getting error as "CSV Serialization requires the League\Csv library" We follow this step then I have installed module 1. Install module "Ludwig" module and enable the module 2. open this path "/admin/reports/packages" that will show missing library then you can download that library. 3 Upload required library in given location 4. Unzip that files and upload their all files and directory in /…

22 April

Set up Google plus login process Drupal 7
By: admin | Published On: Wed, 04/22/2020 - 22:13

Pre-requisites: Google Developer Account Go to developers.google.com Open the api console From the drop down menu in the top left: Select Create Give the project a name Press Create Project The Project will be created and set to active Select API Access from the left menu Click the button marked Create an oauth 2.0 client ID Give the product a name and logo (whatever you want here) Select web application enter your site address click create client id You will need to edit settings here once…

22 April

Online Reputation Management
By: admin | Published On: Wed, 04/22/2020 - 22:13

Online popularity control known as Online Reputation Management Company too is a key to success in online company. Why so? It is because it removes possibility for your company to earn bad name on the world wide web and increases your good picture through advertising good material relevant to your company. Under online popularity control assistance, everything published on the world wide web about you is considerably supervised. Content which contain harmful pieces of details are hidden on…

22 April

Get user list by role programmatically in Drupal8
By: admin | Published On: Wed, 04/22/2020 - 22:13

User this code before

use Drupal\user\Entity\User;

Thise code will be return user list of a given role (editor)

	$ids = \Drupal::entityQuery('user')
	->condition('status', 1)
	->condition('roles', 'editor')
	->execute();
	$users = User::loadMultiple($ids);
	foreach($users as $user){
		$username = $user->get('name')->value;
		$uid = $user->get('uid')->value;
		$userlist[$uid] = $username;
	}
				  

22 April

How to design OMR Sheets using the OMR Software?
By: admin | Published On: Wed, 04/22/2020 - 22:13

With the advancement of science and technology, the OMR industry too has experienced a major enhancement of the provided features. The traditionally developed OMR software was just used to read the OMR sheets that would be contributing to the effective checking and calculation of final scorecards. The user can conduct exams on a specific pattern of OMR sheets only. Now, with the modification to the OMR software the user can easily design a vivid range of OMR sheets. OMR sheet scanning…

22 April

Get installed a POS system to improve the business and manage accurately
By: admin | Published On: Wed, 04/22/2020 - 22:13

A small store to a large retail store is advisable to use Point of Service systems to easily customize their routine operations. It increases productivity, business, revenue, relationship with customers, and also saves time efficiently. Free POS applications can be used in simple business procedures using existing tools where advanced system is not affordable. POS is connected with multiple computers, printers, scanners at the administrator, sales counter, and many more locations. If…