Skip to content

Tag «is drupal 8 a cms»

Backup and restore Drupal sites with Drush

Backup and restore Drupal sites with Drush Submitted by abhishek on Thu, 11/08/2012 – 17:10 Drush is a really great tool! It provides two very useful commands to perform backup and restore operations on Drupal sites. Previously we had to create and restore sql dump and files tarball manually. With new Drush it’s really easy. Please check …

Create Order through Custom Code in Commerce [Drupal CMS]

function make_new_commerce_order($uid, $productID, $qty, $bc_order_id) { $cuser = user_load(array(‘uid’ => $uid)); $order = commerce_order_new($uid, ‘pending’); //Set order Number $order->order_number = $bc_order_id; $order->mail = $cuser->mail; // Save the order so its ID is assigned. commerce_order_save($order); // create an UC order for this user/product/qunatity $order_wrapper = entity_metadata_wrapper(‘commerce_order’, $order); //add products to order by ids array $product = …