Download the PHP package ggggino/skuskucart-bundle without Composer
On this page you can find all versions of the php package ggggino/skuskucart-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package skuskucart-bundle
SkuskuCartBundle
Highly customizable cart management bundle for Symfony. The archievement of this cart manager is to do something like:
Add this thing to a cart
License
Installation
1 Add bundle to your vendor
2 Register the bundle in app/AppKernel.php
3 Create at least one currency
4 Set default locale and currency
Configuration
Bundle complete configuration
Extra configs
Add the target entities that replace the interfaces
Add the basics routes
Use resolve_target_entities
to replace the interface entities with the concrete ones
Every class used must implements the right interface.
-
Currency
-
User
-
Product
- Language
If you want an prebuilt entity you can extend their own base class.
- Currency
Twig functions
Print the cart preview
Print the language choice block
Print the currency choice block
CartManager API
Cart manager
Get the cart manager instance
CartManager::persistCart(SkuskuCart $cart)
Add the cart to EntityManager
CartManager::flushCart(SkuskuCart $cart);
Flush the cart
CartManager::addProductToCart(SkuskuProductInterface $product, int $quantity)
Add some product to the cart
CartManager::createNewCart(SkuskuCustomerInterface $customer = null)
Create new Cart from a given customer, if the customer is not passed is taken from the session
CartManager::createNewOrderFromCart(SkuskuCart $cart)
Build a new Order from a given cart. Used for example when the payment gone good
Cart page
/cart
Commands
bin/console ggggino_skusku:cart:clear
Clear all the skuskutables
bin/console ggggino_skusku:currency:create
Create a row of the given entity - DEV
bin/console ggggino_skusku:doctor:db
Check if the installation procedure was successful
Configuration details
You can decide if even the anonymous user can shop
Chose between use the default steps and create new ones, remember that for the "cart|chosePayment|payment" you can only override configs
If you need more customization in the formstep you can override it. Your CartFlow needs only to inherit
If you need to change the templates
Events
Name | Constant | Argument passed | Description |
---|---|---|---|
skusku_cart.pre_submit | CartFlow::PRE_SUBMIT |
CartForm |
Here you can modify entities or do custom action before the persist |
skusku_cart.post_submit | CartFlow::POST_SUBMIT |
CartForm |
Here you can do custom action after the persist |
skusku_cart.post_payment | CartFlow::POST_PAYMENT |
SkuskuPayment , $status |
Here you can do "anything" after the payment response |
skusku_cart.pre_persist_order | CartFlow::PRE_PERSIST_ORDER |
SkuskuOrder |
Here you can manipulate the Order before the persist |
Templates
Name | Arguments | Default | Description |
---|---|---|---|
skusku_cart.templates.cart_layout | Form, FormFlow | GGGGinoSkuskuCartBundle::cart_page.html.twig |
Set the template that render the cart page |
skusku_cart.templates.done_layout | Status, Payment | null | Set the template used after the payment was done |
TODO
- API for creating cart
- Ordering stepform items
Test taken from: https://github.com/nelmio/NelmioApiDocBundle
All versions of skuskucart-bundle with dependencies
craue/formflow-bundle Version ^3.0
payum/payum-bundle Version ^2.3
php-http/guzzle6-adapter Version ^1.1