|
NAMEDancer2::Plugin::Interchange6::CartDESCRIPTIONExtends Interchange6::Cart to tie cart to Interchange6::Schema::Result::Cart.ATTRIBUTESSee "ATTRIBUTES" in Interchange6::Cart for a full list of attributes inherited by this module.pluginDancer2::Plugin::Interchange6 plugin instance.Dancer2 app instance for "plugin".databaseThe database name as defined in the Dancer2::Plugin::DBIC configuration.Defaults to 'default'. dbic_cartdbic_cart_products"dbic_cart" related resultset "cart_products" with prefetched "product".schemaDBIC schema for "database".idExtends inherited "id" in Interchange6::Cart attribute.Defaults to "id" of "dbic_cart". product_classInherited. Default is Dancer2::Plugin::Interchange6::Cart::Product.sessions_idExtends inherited sessions_id attribute.Defaults to "session->id". METHODSSee "METHODS" in Interchange6::Cart for a full list of methods inherited by this module.BUILDLoad existing cart from the database along with any products it contains.METHODSaddAdd one or more products to the cart.Possible arguments:
In list context returns an array of Interchange6::Cart::Products and in scalar context returns an array reference of the same. clearRemoves all products from the cart.load_saved_productsPulls old cart items into current cart - used after user login.removeRemove single product from the cart. Takes SKU of product to identify the product.renameRename this cart. This is the writer method for "name" in Interchange6::Cart.Arguments: new name Returns: new name set_sessions_idWriter method for "sessions_id" in Interchange6::Cart.set_users_idWriter method for "users_id" in Interchange6::Cart.updateUpdate quantity of products in the cart.Parameters are pairs of SKUs and quantities, e.g. $cart->update(9780977920174 => 5, 9780596004927 => 3); Triggers before_cart_update and after_cart_update hooks. A quantity of zero is equivalent to removing this product, so in this case the remove hooks will be invoked instead of the update hooks. Returns updated products that are still in the cart. Products removed via quantity 0 or products for which quantity has not changed will not be returned. HOOKSThe following hooks are available:
AUTHORSStefan Hornburg (Racke), <racke@linuxia.de> Peter Mottram (SysPete), <peter@sysnix.com> LICENSE AND COPYRIGHTCopyright 2011-2016 Stefan Hornburg (Racke) <racke@linuxia.de>.This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.
Visit the GSP FreeBSD Man Page Interface. |