{"id":24973346,"url":"https://github.com/bluedynamics/bda.plone.checkout","last_synced_at":"2025-04-11T08:13:18.596Z","repository":{"id":4177917,"uuid":"5294373","full_name":"bluedynamics/bda.plone.checkout","owner":"bluedynamics","description":"Checkout","archived":false,"fork":false,"pushed_at":"2024-04-18T06:03:09.000Z","size":479,"stargazers_count":1,"open_issues_count":2,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-25T05:41:44.074Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","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-04T09:03:51.000Z","updated_at":"2021-10-15T06:51:35.000Z","dependencies_parsed_at":"2025-02-03T18:39:16.045Z","dependency_job_id":"46281a20-e9a4-4f43-97f0-6d8e338f0a62","html_url":"https://github.com/bluedynamics/bda.plone.checkout","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.checkout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.checkout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.checkout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.checkout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluedynamics","download_url":"https://codeload.github.com/bluedynamics/bda.plone.checkout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360476,"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":["hacktoberfest"],"created_at":"2025-02-03T18:27:16.732Z","updated_at":"2025-04-11T08:13:18.578Z","avatar_url":"https://github.com/bluedynamics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"bda.plone.checkout\n==================\n\nShop checkout process and forms.\n\nThis package is part of the ``bda.plone.shop`` stack. Please refer to\n`bda.plone.shop \u003chttps://github.com/bluedynamics/bda.plone.shop\u003e`_ for\ninstallation instructions.\n\n\nCustomizing the checkout form\n-----------------------------\n\nTo customize the checkout form you'll typically start off with your own\nform having a custom ``provider_registry``.\n\nYou'll use the ``FieldsProvider`` objects that you're happy with and replace\nthose that need an adaption.\n\nIn this example, we'll add an additional field ``uid`` to the ``PersonalData``\nprovider an re-use the others:\n\n.. code-block:: python\n\n    from zope.i18nmessageid import MessageFactory\n    from bda.plone.checkout.browser import form as coform\n\n\n    _ = MessageFactory('my.package')\n    my_provider_registry = coform.ProviderRegistry()\n\n\n    class MyPersonalData(coform.PersonalData):\n        fields_template = 'my.package.shop:forms/personal_data.yaml'\n        message_factory = _\n\n\n    my_provider_registry.add(coform.CartSummary)\n    my_provider_registry.add(MyPersonalData)\n    my_provider_registry.add(coform.BillingAddress)\n    my_provider_registry.add(coform.DeliveryAddress)\n    my_provider_registry.add(coform.ShippingSelection)\n    my_provider_registry.add(coform.PaymentSelection)\n    my_provider_registry.add(coform.OrderComment)\n    my_provider_registry.add(coform.AcceptTermsAndConditions)\n\n\n    class MyCheckoutForm(coform.CheckoutForm):\n        \"\"\"Customized checkout form to add UID field for company.\n        \"\"\"\n        provider_registry = my_provider_registry\n\nCopy ``bda/plone/checkout/browser/forms/personal_data.yaml`` to\n``my/package/shop/forms/personal_data.yaml`` and make your changes.\n\nThis package uses `Yet Another FOrm WIdget Library`_ (`YAFOWIL`)\nfor rendering the checkout form.\n\n.. _`Yet Another FOrm WIdget Library`: http://docs.yafowil.info/\n\nWe'll append a new field `uid` at the end of the ``personal data``\nsection:\n\n.. code-block:: yaml\n\n    - company:\n        factory: \"#field:text\"\n        value: context.get_value\n        props:\n            label: i18n:label_company:Company\n            display_proxy: True\n        mode: expr:context.mode\n    - uid:\n        factory: \"#field:text\"\n        value: context.get_value\n        props:\n            label: i18n:label_companyuid:UID Number\n            display_proxy: True\n        mode: expr:context.mode \n\n(NOTE: it's not possible to mix i18n domains within a yaml file so\nyou're better off to add you translations to a separtate\n``bda.plone.checkout.po`` file in your package's locales)\n\nNow register your customized form by overriding the browser page\nfor your browserlayer or skinlayer:\n\n.. code-block:: xml\n\n    \u003cbrowser:page\n      for=\"*\"\n      name=\"checkoutform\"\n      class=\".checkout.MyCheckoutForm\"\n      permission=\"zope2.View\"\n      layer=\".browser.interfaces.IThemeSpecific\" /\u003e\n\n.. NOTE:: Your new field will automatically be included in the order data.\n\n    However, by default, it will not show up in order emails, the order export\n    (``@@exportorders``) or the order summary (``@@orders``).\n    See `bda.plone.orders`_ for instructions how to add them there.\n\n    .. _`bda.plone.orders`: https://github.com/bluedynamics/bda.plone.orders\n\n\nPermissions\n-----------\n\nbda.plone.checkout.PerformCheckout\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis permission controls whether a user can actually perform the checkout\nprocess. Checkout related views are bound to this permission, thus, a visitor\nwithout this permission granted gets redirected to the login / registration\nform.\n\nBy default, this permission is set for roles:\n\n* Manager\n* Site Administrator\n* Customer\n\nIn order to enable non-customers or anonymous users to perform the checkout,\nedit ``rolemap.xml`` in your integration package as needed.\n\n\nCreate translations\n-------------------\n\n::\n\n    $ cd src/bda/plone/checkout/\n    $ ./i18n.sh\n\n\nContributors\n------------\n\n- Robert Niederreiter (Author)\n- Peter Holzer\n- Harald Friessnegger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.plone.checkout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluedynamics%2Fbda.plone.checkout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.plone.checkout/lists"}