Skip to content

Instantly share code, notes, and snippets.

View rabu81's full-sized avatar

Rasmus Burkal rabu81

View GitHub Profile
@rabu81
rabu81 / keybase.md
Created July 19, 2016 22:45
keybase.md

Keybase proof

I hereby claim:

  • I am rabu81 on github.
  • I am rabu81 (https://keybase.io/rabu81) on keybase.
  • I have a public key ASApKkVYpBv4F5QlkZbsWrnbjWViaA6fD13u3YK1EQ5oEgo

To claim this, I am signing this object:

@rabu81
rabu81 / magento_get_total_amount.php
Last active August 29, 2015 13:57
How to load the total amount in Magento
<?php
// load the latest order
$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
// get the total amount
$amount = number_format($order->getGrandTotal(),2);
// now you can use the variable $amount in the same page, to print the total amount
// important! please add your own error handling to avoid exceptions or errors displayed on the page
?>
@rabu81
rabu81 / chosen-bootstrap.css
Created May 31, 2012 08:12
overwrite chosen styling to look like bootstrap
/*
* add this to your own css file,
* to overwrite the _chosen_ styling, to look more like bootstrap!
*
* note: for the error part to work, an .error class-name must be added
* to a wrapping DIV, to display the bootstrap error styling. I have
* just use the wrapping .control-group DIV
*
* credit: Rasmus Burkal, @rabu81
*/