uno-de-piera / simplecart by unodepiera

Simplecart for Laravel 4
379
6
3
Package Data
Maintainer Username: unodepiera
Maintainer Contact: unodepiera@uno-de-piera.com (unodepiera)
Package Create Date: 2013-08-20
Package Last Update: 2014-02-13
Language: PHP
License: Unknown
Last Refreshed: 2024-05-15 15:17:48
Package Statistics
Total Downloads: 379
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 6
Total Watchers: 3
Total Forks: 3
Total Open Issues: 0
//add options to row
$item["options"] = array("color" => "blue", "avaliable" => "si");

//add row to cart
Simplecart::insert($item);
<h2>Update a product</h2>
```php
	$update = array(
    	'id' => 5,
        'rowid'	=> "e4da3b7fbbce2345d7772b0674a318d5",
        'qty' => 25,
        'price' => $price,
        'name' => "shirt",
        'medida' => "xl"
    );

    Simplecart::update($update);
//add options to row
$item["options"] = array("color" => "orange", "avaliable" => "yes");

//add row to cart
Simplecart::insert($item);

});

<h3>Then create the next view and visit the route show</h3>
```php
Route::get("show", function()
{
	$cart = Simplecart::get_content();
	$totalcart = Simplecart::total_cart();
	$totalitems = Simplecart::total_articles();
	return View::make("cart", array("cart" => $cart, "total_cart" => $totalcart, "total_items" => $totalitems));
});