Skip to content

Instantly share code, notes, and snippets.

View joshmiller83's full-sized avatar
🐢
Taking things one step at a time.

Josh Miller joshmiller83

🐢
Taking things one step at a time.
View GitHub Profile
<?php
global $user;
// Load the order object.
$order = commerce_cart_order_load($user->uid);
if (!empty($order)) {
// Create order entity metadata wrapper.
$wrapper = entity_metadata_wrapper('commerce_order', $order);
// Determine cart order total without taxes
// Maybe rszrama can help?
}
@joshmiller83
joshmiller83 / gist:5483972
Created April 29, 2013 19:14
Random Community Stats
// # of new committers
$commerce_module = "http://drupal.org/node/605898/committers";
echo return_new_committer_ul($commerce_module,'<a href="http://drupal.org/node/605898/committers">Drupal Commerce</a>');
$commerce_module = "http://drupal.org/node/1079066/committers";
echo return_new_committer_ul($commerce_module,'<a href="http://drupal.org/node/1079066/committers">Drupal Commerce Kickstart</a>');
function return_new_committer_ul ($url,$module) {
$doc = new DOMDocument();
@joshmiller83
joshmiller83 / gist:5033497
Created February 25, 2013 21:29
Tired of looking at the boring CSS for Drupalcon Portland comments? This will spice it up nicely:
.comments header {
width: 30%;
float: left;
margin-left: -210px;
}
.comments header p {
font-size: 12px;
color: #FFF;
margin-bottom: 0;
}