{"id":24973322,"url":"https://github.com/bluedynamics/bda.plone.cart","last_synced_at":"2026-02-28T05:20:22.983Z","repository":{"id":4177827,"uuid":"5294281","full_name":"bluedynamics/bda.plone.cart","owner":"bluedynamics","description":"Shopping Cart","archived":false,"fork":false,"pushed_at":"2024-04-18T06:03:20.000Z","size":904,"stargazers_count":1,"open_issues_count":9,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-25T05:41:42.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluedynamics.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-04T08:47:48.000Z","updated_at":"2022-02-10T16:38:43.000Z","dependencies_parsed_at":"2024-04-16T17:04:59.617Z","dependency_job_id":"d961c5a7-6804-4914-a23a-bcff43778409","html_url":"https://github.com/bluedynamics/bda.plone.cart","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.cart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.cart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.cart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.cart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluedynamics","download_url":"https://codeload.github.com/bluedynamics/bda.plone.cart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360477,"owners_count":21090703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-03T18:27:13.084Z","updated_at":"2026-02-28T05:20:22.939Z","avatar_url":"https://github.com/bluedynamics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"bda.plone.cart\n==============\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n\n.. image:: https://travis-ci.org/bluedynamics/bda.plone.shop.svg?branch=master\n    :target: https://travis-ci.org/bluedynamics/bda.plone.shop\n\n\nShopping cart for plone.\n\n.. contents::\n\n\nBase package Installation\n-------------------------\n\nDepend your instance to ``bda.plone.cart`` and install it as addon\nin plone control panel.\n\n\nProvide contracts\n-----------------\n\nThis package provides components needed to render a shopping cart. It expects\nseveral contracts defined in:\n\n- ``bda.plone.cart.interfaces.ICartDataProvider``\n- ``bda.plone.cart.interfaces.ICartItemDataProvider``\n- ``bda.plone.cart.interfaces.ICartItemStock``\n- ``bda.plone.cart.interfaces.ICartItemPreviewImage``\n- ``bda.plone.cart.interfaces.ICartItemAvailability``\n- ``bda.plone.cart.interfaces.ICartItemState``\n- ``bda.plone.cart.interfaces.ICartDiscount``\n- ``bda.plone.cart.interfaces.ICartItemDiscount``\n\nPlease take a look at the corresponding interfaces for contract details.\nFurther some abstract base implementations are available in\n``bda.plone.cart.__init__`` which can be used as base class for concrete\nimplementations.\n\n\nCart Visibility\n---------------\n\nThe cart can be rendered as a portlet or inside a viewlet in the portal\nheader. It's not possible to render the cart twice in one page. Thus, the\nviewlet gets skipped automatically if a cart portlet assignment is found.\nAlso, if cart summary, checkout, order confirmation or portal factory is\nrendered, regular cart rendering gets skipped.\n\nIts possible to define custom patterns which are checked against recent\nbrowser URL defining whether to skip cart rendering. This is useful for\ncustom payment implementations and similar:\n\n.. code-block:: python\n\n    from bda.plone.cart.browser.portlet import SKIP_RENDER_CART_PATTERNS\n\n    SKIP_RENDER_CART_PATTERNS.append('@@my_payment')\n\n\nMarkup\n------\n\nTake a look at ``bda.plone.cart.browser:tile.pt`` how HTML markup\nfor adding items to cart might look like.\n\nBasically a shop item consists of a container DOM element, containing an\nelement with CSS class ``cart_item_uid``, where the item UID is taken from:\n\n.. code-block:: html\n\n    \u003cspan class=\"cart_item_uid\" style=\"display: none;\"\u003e12345678\u003c/span\u003e\n\na text input field with CSS class ``cart_item_count`` which is read for\nitem count:\n\n.. code-block:: html\n\n    \u003cinput type=\"text\" size=\"2\" value=\"1\" class=\"cart_item_count\" /\u003e\n\na quantity unit:\n\n.. code-block:: html\n\n    \u003cspan class=\"cart_item_quantity_unit\"\u003eQuantity\u003c/span\u003e\n\nIf quantity unit can be be float, add ``quantity_unit_float`` CSS class:\n\n.. code-block:: html\n\n    \u003cinput type=\"text\" size=\"2\" value=\"1\"\n           class=\"cart_item_count quantity_unit_float\" /\u003e\n\nthe \"add to Cart\" action:\n\n.. code-block:: html\n\n    \u003ca href=\"\" class=\"add_cart_item\"\u003eadd to cart\u003c/a\u003e\n\nand the \"update cart\" action:\n\n.. code-block:: html\n\n    \u003ca href=\"\" class=\"update_cart_item\"\u003eupdate cart\u003c/a\u003e\n\nOptionally, If cart viewlet is used, a status message can be displayed when\nadding or updating cart items. This is useful if user should get\nclearly informed if cart data has changed. To display status messages,\nadd CSS class ``show_status_message`` to \"add to cart\" and \"update cart\"\nactions:\n\n.. code-block:: html\n\n    \u003ca href=\"\" class=\"update_cart_item show_status_message\"\u003eupdate cart\u003c/a\u003e\n\nand optionally an element defining a comment or an input for entering a\ncomment:\n\n.. code-block:: html\n\n    \u003cinput type=\"text\" size=\"16\" value=\"\" class=\"cart_item_comment\" /\u003e\n\nIf comment should be required, add CSS class ``required`` to comment input.\nIf comment is empty, an error message gets shown to the user when trying to\nadd or update a cart item:\n\n.. code-block:: html\n\n    \u003cinput type=\"text\" size=\"16\" value=\"\" class=\"cart_item_comment required\" /\u003e\n\n\nCreate translations\n-------------------\n\n::\n\n    $ cd src/bda/plone/cart/\n    $ ./i18n.sh\n\n\nDevelop CSS Styles\n------------------\n\nCSS Styles are written in Sass and compiled via `npm`::\n\n    $ npm install\n    $ npm run build  # to build the resources or\n    $ npm run watch  # to watch changes during development\n\n\nA ready-to-use implementation\n-----------------------------\n\nThis package was developed as part of the ``bda.plone.shop`` stack. Please\nrefer to `bda.plone.shop \u003chttps://github.com/bluedynamics/bda.plone.shop\u003e`_ for\nconcrete implementations of the expected contracts.\n\n\nContributors\n------------\n\n- Robert Niederreiter (Autor)\n- Sven Plage\n- Peter Holzer\n- Harald Friessnegger\n- Peter Mathis\n- Espen Moe-Nilssen\n- Johannes Raggam\n- Jure Cerjak\n- Icons by famfamfam\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.plone.cart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluedynamics%2Fbda.plone.cart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.plone.cart/lists"}