Blogs on

Drush

knackforge blog

How to delete an order if the order is in cart for N days

In drupal commerce, the order will be created when a product is added to cart and the order will exist until the order is deleted or order status is changed to completed.

We have an e-commerce site in which most of the orders are idle in the shopping cart. So we decided to delete the order if the order is in the shopping cart for more than 'N' days or weeks. I have written a custom drush command for deleting the order.

The following code is used to delete an order if it is in the cart for more than 25 days.
 

Continue reading →

Using Drush to administer multisite

One of the admiring features about Drupal is its ability to leverage single code base to power a stack of sites. Drush the excellent command line utility eases the work of administering Drupal sites.

Our recent work raised a question, will these two blend & work together?

Of course we tried this, the answer is yes but to be used with more caution!!

Continue reading →
knackforge blog

Different ways to reset Drupal admin password

I was a part of Learn Drupal on Global Drupal Training Day!, Drupal Chennai event to deliver a talk about installation and Drupal in general. The attendees were from different genre, but majority of them were students. After the presentations, Shyamala propounded to form teams and let the student participants to try a Drupal installation and come up with a site of their own taste and novelty.

Continue reading →
knackforge blog

The most frequently used drush commands

If you are into Drupal development and a vivid user of GNU/ Linux (or *nix) for a while, then Drush is a must learn tool for you. As a part of Drupal development project, we extensively use drush. A few commands that help us develop sites at the phase of clients expectation are briefed below,

1. drush cc [type] :- Clears a specific cache, or all Drupal caches.

Example

$ drush cc all

Continue reading →
knackforge blog

How to bulk delete drupal nodes with drush script

I have been working on an interesting project that integrates Drupal, Apache Solr and mahout for providing content recommendation engine. Needless to say it has been an interesting ride filled with a lots of sapid and amusing challenges. More details about this project will be shared in follow up post. In this post, quickly I would like to share a trick to delete a bunch of Drupal nodes using drush script.

Continue reading →