{"id":13531725,"url":"https://github.com/bluedynamics/bda.plone.productshop","last_synced_at":"2025-04-01T20:30:29.433Z","repository":{"id":53000337,"uuid":"13014531","full_name":"bluedynamics/bda.plone.productshop","owner":"bluedynamics","description":"Productshop Solution for Plone","archived":false,"fork":true,"pushed_at":"2024-04-22T09:03:38.000Z","size":758,"stargazers_count":7,"open_issues_count":6,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-13T05:16:04.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"espenmn/bda.plone.shopviews","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}},"created_at":"2013-09-22T14:10:41.000Z","updated_at":"2024-12-16T10:48:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bluedynamics/bda.plone.productshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.productshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.productshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.productshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.plone.productshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluedynamics","download_url":"https://codeload.github.com/bluedynamics/bda.plone.productshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709921,"owners_count":20821296,"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":"2024-08-01T07:01:05.163Z","updated_at":"2025-04-01T20:30:28.947Z","avatar_url":"https://github.com/bluedynamics.png","language":"Python","funding_links":[],"categories":["Shop"],"sub_categories":[],"readme":"=====================\nbda.plone.productshop\n=====================\n\n.. image:: https://travis-ci.org/bluedynamics/bda.plone.productshop.svg?branch=master\n    :target: https://travis-ci.org/bluedynamics/bda.plone.productshop\n.. image:: https://coveralls.io/repos/bluedynamics/bda.plone.productshop/badge.png\n    :target: https://coveralls.io/r/bluedynamics/bda.plone.productshop\n\nProduct shop extension for ``bda.plone.shop``.\n\nOverview\n========\n\nThis package contains dexterity content types and the corresponding views\nfor building a typical product shop.\n\n\nA brief description about the contained types\n---------------------------------------------\n\n**Product**\n\nA product which can be added to folders. A product consists of default\nmetadata, an image, a detailed description, a datasheet and related items.\n\n**Product Group**\n\nA product group is a collection of product like objects with several aspects\napplied to it. The contained items are of type ``Variant``. Further a\nproduct group provides the same fields as a ``Product``. The default variant\naspects for newly created variants inside this product group can be defined\non the product group.\n\n**Variant**\n\nA Variant is a ``Product`` with several aspects applied to it, like weight,\nsize, etc. and is contained in a ``Product Group``. The different aspects\ncan be enabled and disabled explicitly after creation via object actions. The\ndefault aspects enabled are read from parent product group\n\n\nA brief description about the contained views\n---------------------------------------------\n\n**product tiles**\n\nThe product tiles view can be applied on site root and folders. The view\ndisplays a grid of tiles built of contained folders and buyable items. If tile\ncontext is a folder, title and description are taken from the folder, and the\npreview image is taken randomly from a contained buyable item. If tile context\nis a buyable item, title, description and preview image are taken from it and\non mouse over buyable controls are rendered in an overlay for this item. The\nnumber of grid columns rendered can be defined globally in control panel, or,\nif ``IProductTilesViewSettingsBehavior`` is applied on folders directly\n(``plone.app.contenttypes`` only, Archetypes folders are not suppoerted).\n\n**product listing**\n\nThe product listing can be applied on folders and on product groups. When\napplied on folder it lists the first level of the contained products and\nproduct groups. When applied on a product group it lists the contained variants\nand a filter at the top to restrict listing by variant aspects.\n\n**product view**\n\nThe product view can be applied on products, product groups an variants. When\napplied on products, it displays the product data and the buyable controls\nprovided by ``bda.plone.shop``. When applied on a variant, additionally the\naspect filter gets shown which can be used for instant navigation between\navailable variants in containing product group. When applied on a product group\nthe first contained variant gets displayed as descibed above.\n\n\nInstallation\n============\n\nInstall standalone\n------------------\n\nInstall system dependencies::\n\n    sudo apt-get install python-virtualenv\n\nInstall Instance::\n\n    virtualenv --no-site-packages vpython\n    ./vpython/bin/python bootstrap.py\n    ./bin/buildout\n\n\nInstall as product\n------------------\n\nAdd ``bda.plone.productshop`` to the instance eggs in buildout.cfg or depend\nyour integration package to it.\n\nInstall as addon in plone control panel or via generic setup dependency in your\nintegration package.\n\n\nProvide additional variant aspects\n==================================\n\nIf desired variant aspect is generic, fork this project from\n``https://github.com/bluedynamics/bda.plone.productshop``, add it directly\nthere and create a pull request.\n\n\nFollowing steps are necessary to add a variant aspect\n-----------------------------------------------------\n\nCreate a variant behavior like the ones in\n``bda.plone.productshop.behaviors``::\n\n    @provider(IFormFieldProvider)\n    class IDemandBehavior(IVariantAspect):\n        \"\"\"Demand variant behavior.\n        \"\"\"\n        model.fieldset(\n            'aspects',\n            label=_(u'aspects', default=u'Aspects'),\n            fields=['demand'])\n        demand = schema.TextLine(\n            title=_(u'demand_title', default=u'Demand'),\n            description=_(u'demand_description',\n                          default=u'Demand of the product'),\n            required=False)\n\n**Note**: Aspect field type must always be a text line to work correctly with\n          the filter views.\n\nRegister this behavior via ZCML::\n\n    \u003cplone:behavior\n      title=\"Demand\"\n      description=\"Extend content with product demand.\"\n      provides=\".behaviors.IDemandBehavior\"\n      for=\"collective.instancebehavior.IInstanceBehaviorAssignableContent\" /\u003e\n\nCreate an indexer for the aspect field like the ones in\n``bda.plone.productshop.indexer``::\n\n    @indexer(IDemandBehavior)\n    def demand_aspect(obj):\n        return obj.demand\n\n**Note**: Index name must be postfixed with ``_aspect`` all over the place.\n          this way we hopefully avoid naming collisions.\n\nRegister the indexer via ZCML::\n\n    \u003cadapter name=\"demand_aspect\" factory=\".indexer.demand_aspect\" /\u003e\n\nCreate the index at install time via generic setup profile. Add to\n``catalog.xml``::\n\n    \u003cindex name=\"demand_aspect\" meta_type=\"FieldIndex\"\u003e\n      \u003cindexed_attr value=\"demand_aspect\" /\u003e\n    \u003c/index\u003e\n\nCreate the object action for the aspect that it can be enabled ttw like the\nones in ``bda.plone.productshop.browser.actions``::\n\n    class DemandAction(VariantAspectAction):\n        aspect_title = _(u'aspect_demand', default=u'Demand')\n        aspect_behavior = 'bda.plone.productshop.behaviors.IDemandBehavior'\n        aspect_schema = IDemandBehavior\n\nConfigure necessary action views::\n\n    \u003c!-- demand --\u003e\n    \u003cbrowser:page\n      name=\"enable_demand\"\n      attribute=\"enable_aspect\"\n      for=\"..interfaces.IVariant\"\n      class=\".actions.DemandAction\"\n      permission=\"cmf.ModifyPortalContent\"\n      layer=\"..interfaces.IProductShopExtensionLayer\" /\u003e\n\n    \u003cbrowser:page\n      name=\"disable_demand\"\n      attribute=\"disable_aspect\"\n      for=\"..interfaces.IVariant\"\n      class=\".actions.DemandAction\"\n      permission=\"cmf.ModifyPortalContent\"\n      layer=\"..interfaces.IProductShopExtensionLayer\" /\u003e\n\n    \u003cbrowser:page\n      name=\"can_enable_demand\"\n      attribute=\"can_enable\"\n      for=\"*\"\n      class=\".actions.DemandAction\"\n      permission=\"cmf.ModifyPortalContent\"\n      layer=\"..interfaces.IProductShopExtensionLayer\" /\u003e\n\n    \u003cbrowser:page\n      name=\"can_disable_demand\"\n      attribute=\"can_disable\"\n      for=\"*\"\n      class=\".actions.DemandAction\"\n      permission=\"cmf.ModifyPortalContent\"\n      layer=\"..interfaces.IProductShopExtensionLayer\" /\u003e\n\nCreate the corresponding object actions at install time via generic setup\nprofile. Add to ``actions.xml``::\n\n    \u003c!-- demand --\u003e\n    \u003cobject name=\"enable_demand\"\n            meta_type=\"CMF Action\"\n            i18n:domain=\"bda.plone.productshop\"\u003e\n      \u003cproperty name=\"title\" i18n:translate=\"\"\u003e\n          Add demand\n      \u003c/property\u003e\n      \u003cproperty name=\"description\" i18n:translate=\"\"\u003e\n          Add demand to product variant\n      \u003c/property\u003e\n      \u003cproperty name=\"url_expr\"\u003e\n          string:${object/absolute_url}/@@enable_demand\n      \u003c/property\u003e\n      \u003cproperty name=\"icon_expr\"\u003e\u003c/property\u003e\n      \u003cproperty name=\"available_expr\"\u003e\n          object/@@can_enable_demand\n      \u003c/property\u003e\n      \u003cproperty name=\"permissions\"\u003e\n          \u003celement value=\"Modify portal content\" /\u003e\n      \u003c/property\u003e\n      \u003cproperty name=\"visible\"\u003eTrue\u003c/property\u003e\n    \u003c/object\u003e\n\n    \u003cobject name=\"disable_demand\"\n            meta_type=\"CMF Action\"\n            i18n:domain=\"bda.plone.productshop\"\u003e\n      \u003cproperty name=\"title\" i18n:translate=\"\"\u003e\n          Remove demand\n      \u003c/property\u003e\n      \u003cproperty name=\"description\" i18n:translate=\"\"\u003e\n          Remove demand from product variant\n      \u003c/property\u003e\n      \u003cproperty name=\"url_expr\"\u003e\n          string:${object/absolute_url}/@@disable_demand\n      \u003c/property\u003e\n      \u003cproperty name=\"icon_expr\"\u003e\u003c/property\u003e\n      \u003cproperty name=\"available_expr\"\u003e\n          object/@@can_disable_demand\n      \u003c/property\u003e\n      \u003cproperty name=\"permissions\"\u003e\n          \u003celement value=\"Modify portal content\" /\u003e\n      \u003c/property\u003e\n      \u003cproperty name=\"visible\"\u003eTrue\u003c/property\u003e\n    \u003c/object\u003e\n\n\nTODO\n====\n\n- Define which richtext fields of a product gets rendered as tabs in\n  product view.\n\n- Create control panel. This should contain global configuration which\n  variant aspects are available in the instance.\n\n\nContributors\n============\n\n- Robert Niederreiter (Autor)\n- Espen Moe-Nilssen\n- Peter Holzer\n\n\nDummy product image from\n========================\n\n- http://thelittlereaper.deviantart.com/art/Test-Crash-Dummy-169618976\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.plone.productshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluedynamics%2Fbda.plone.productshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.plone.productshop/lists"}