2017 © Pedro Peláez
 

symfony-bundle cart-bundle

Cart bundle.

image

chernecov/cart-bundle

Cart bundle.

  • Monday, October 27, 2014
  • by chernecov
  • Repository
  • 1 Watchers
  • 3 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

CartBundle

Symfony bundle., (*1)

Provides basic shopping cart functionality. Based on FOSRestBundle, HateoasBundle, NelmiApiDocBundle..., (*2)

Adding item to cart:, (*3)

POST to /cart/item/add, (*4)

{
  "title": "Tiffany heart signet ring in sterling silver.",
  "price": 158,
  "quantity": 2,
  "related_id": 74485
}

You can get cart by url: /cart/content?_embedded=true, (*5)

{
    "cart_id": "ea98738c",
    "channel": "default",
    "_links": {
        "self": {
            "href": "/cart/content",
            "method": "GET"
        },
        "clear": {
            "href": "/cart/clear",
            "method": "DELETE"
        }
    },
    "_embedded": {
        "items": [
            {
                "id": "46894fe9",
                "title": "Tiffany heart signet ring in sterling silver.",
                "price": 158,
                "quantity": 2,
                "related_id": 74485,
                "_links": {
                    "delete": {
                        "href": "/cart/item/46894fe9/remove",
                        "method": "DELETE"
                    },
                    "quantity": {
                        "href": "/cart/item/46894fe9/quantity/{quantity}",
                        "templated": true,
                        "method": "PATCH"
                    },
                    "patch": {
                        "href": "/cart/item/46894fe9/modify",
                        "templated": true,
                        "method": "PATCH",
                        "data": {
                            "json": [
                                "title",
                                "price",
                                "count",
                                "relatedId"
                            ]
                        }
                    }
                }
            }
        ]
    }
}

The Versions