Mango::Cart::Item - Module representing an individual shopping cart item
use Mango::Cart::Item; my $items = $cart->items; while (my $item = $items->next) { print $item->sku; };
Mango::Cart::Item represent a part in the shopping cart to be ordered.
Returns the id of the current cart item.
print $item->id;
Gets/sets the sku (stock keeping unit/part number) for the cart item.
$item->sku('ABC123'); print $item->sku;
Gets/sets the quantity, or the number of this item being purchased.
$item->quantity(3); print $item->quantity;
Gets/sets the price for the cart item. The price is returned as a stringified Mango::Currency object.
$item->price(12.95); print $item->price; print $item->price->format;
Returns the total price for the cart item as a stringified Mango::Currency object. This is really just quantity*total and is provided for convenience.
print $item->total; print $item->total->format;
Gets/sets the description for the current cart item.
$item->description('Best Item Ever'); print $item->description;
Saves any changes made to the current item.
Mango::Cart, Mango::Schema::Cart::Item, Mango::Currency
Christopher H. Laco CPAN ID: CLACO claco@chrislaco.com http://today.icantfocus.com/blog/
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mango
CPAN shell
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.