Skip to content

Commit

Permalink
Fix code examples with constructor arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurian Sluiman committed Jun 15, 2014
1 parent e86efe6 commit 39a521e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,9 @@ To track a transaction, you should use the
use SlmGoogleAnalytics\Analytics\Ecommerce\Transaction;
use SlmGoogleAnalytics\Analytics\Ecommerce\Item;

$transaction = new Transaction;
$transaction->setId('1234'); // order ID
$transaction->setTotal('28.28'); // total

$item = new Item;
$item->setPrice('11.99'); // unit price
$item->setQuantity('2'); // quantity
$transaction = new Transaction('1234', '28.28');

$item = new Item('5678', '11.99', '2', 'Blue elephant');
$transaction->addItem($item);

$ga->addTransaction($transaction);
Expand Down

0 comments on commit 39a521e

Please sign in to comment.