{"id":16300887,"url":"https://github.com/kberov/slovo-plugin-prodan","last_synced_at":"2025-04-09T22:22:01.633Z","repository":{"id":56831334,"uuid":"435211741","full_name":"kberov/Slovo-Plugin-Prodan","owner":"kberov","description":"Slovo::Plugin::Prodan – Make and manage sales in your Слово-based site","archived":false,"fork":false,"pushed_at":"2023-03-22T20:36:38.000Z","size":204,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T14:15:34.127Z","etag":null,"topics":["delivery","econt","invoice-pdf","mojolicious","perl","products","sales","shopping-cart","slovo"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kberov.png","metadata":{"files":{"readme":"README.pod","changelog":"Changes","contributing":null,"funding":null,"license":null,"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":"2021-12-05T15:56:34.000Z","updated_at":"2022-02-07T21:29:05.000Z","dependencies_parsed_at":"2024-12-23T18:13:24.724Z","dependency_job_id":"f5c8fa70-e1ec-4432-a141-a67c5f98b8a0","html_url":"https://github.com/kberov/Slovo-Plugin-Prodan","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kberov%2FSlovo-Plugin-Prodan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kberov%2FSlovo-Plugin-Prodan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kberov%2FSlovo-Plugin-Prodan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kberov%2FSlovo-Plugin-Prodan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kberov","download_url":"https://codeload.github.com/kberov/Slovo-Plugin-Prodan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120362,"owners_count":21050930,"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":["delivery","econt","invoice-pdf","mojolicious","perl","products","sales","shopping-cart","slovo"],"created_at":"2024-10-10T20:52:56.788Z","updated_at":"2025-04-09T22:22:01.598Z","avatar_url":"https://github.com/kberov.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=encoding utf8\n\n=head1 NAME\n\nSlovo::Plugin::Prodan - Make and manage sales in your Slovo-based site\n\n=head1 SYNOPSIS\n\n  # In slovo.conf\n  load_plugins =\u003e [\n    #...\n    'Themes::Malka',\n    {\n      Prodan =\u003e {\n        migrate  =\u003e 1,\n        consents =\u003e {\n          gdpr_url    =\u003e '/ѿносно/условия.bg.html',\n          phone_url           =\u003e $ENV{SLOVO_PRODAN_PHONE_URL},\n          delivery_prices_url =\u003e '/ѿносно/цени-доставки.bg.html',\n        },\n        econt =\u003e {\n          shop_id                 =\u003e $ENV{SLOVO_PRODAN_SHOP_ID},\n          private_key             =\u003e $ENV{SLOVO_PRODAN_PRIVATE_KEY},\n          shippment_calc_url      =\u003e 'https://delivery.econt.com/customer_info.php',\n          crupdate_order_endpoint =\u003e\n            'https://delivery.econt.com/services/OrdersService.updateOrder.json',\n          create_awb_endpoint =\u003e\n            'https://delivery.econt.com/services/OrdersService.createAWB.json'\n        }}\n    },\n    #...\n  ],\n\n=head1 DESCRIPTION\n\nThe word про̀дан (прода̀жба) in Bulgarian means sale. Roots are found in Old\nCommon Slavic (Old Bulgarian) I\u003cпроданьѥ\u003e. Here is an exerpt from Codex\nSuprasliensis(331.27) where this word was witnessed: I\u003cсꙑнъ божии. вол҄еѭ\nна сьпасьнѫѭ страсть съ вами придетъ. и на B\u003cпродании\u003e станетъ.\nискѹпѹѭштааго животворьноѭ кръвьѭ. своеѭ миръ.\u003e\n\nL\u003cSlovo::Plugin::Prodan\u003e is a L\u003cMojolicious::Plugin\u003e that extends a\nSlovo-based site and turns it into an online shop. \n\n=head1 FEATURES\n\nIn this edition of L\u003cSlovo::Plugin::Prodan\u003e we implement the following features:\n\n=head2 A Shopping cart\n\nA jQuery and localStorage based shopping cart. Two static files contain\nthe implementation and they can be inflated. The files are\nC\u003c/css/cart.css\u003e and C\u003c/js/cart.js\u003e. You should inflate these files into\nyour public forlder C\u003cdomove/example.com/public\u003e for the domain on which you\nwill use it. Even not inflated these will be referred from any page of the\nsite. The site layout C\u003clayouts/site.html.ep\u003e includes automatically these\ntwo static files if this plugin is loaded.\n\n  # Inflate new static files from Slovo::Plugin::Prodan\n  bin/slovo inflate --class Slovo::Plugin::Prodan -p --path domove/xn--b1arjbl.xn--90ae/public\n\nTo add a product to your cart and make an order, you need a button, containing\nthe product data. For example:\n\n    \u003cbutton class=\"primary sharer button add-to-cart\"\n        title=\"книжно издание\" data-sku=\"9786199169001\" \n        data-title=\"Житие на света Петка Българска от свети патриарх Евтимий\"\n        data-weight=\"0.5\" data-price=\"7.00\"\u003e\u003cimg\n        src=\"/css/malka/book-open-page-variant-outline.svg\"\u003e\n        \u003cimg src=\"/img/cart-plus-white.svg\"\u003e\u003c/button\u003e\n\nSee \"A template...\" below.\n\n=head2 Delivery of sold goods\n\nA \"Pay on delivery\" integration with Bulgarian currier L\u003cEcont (in\nBulgarian)|https://www.econt.com/developers/43-kakvo-e-dostavi-s-ekont.html\u003e.\n\n=head2 Products\n\nProducts - a products SQL table to populate your pages with products. You\ncreate a page with several articles (celini) in it. These celini will be the\nweb-pages for the products. You prepare a YAML file with products. Each product\nC\u003calias\u003e property must match exactly the celina C\u003calias\u003e and C\u003cdata_type\u003e on\nwich this product will be placed. See C\u003ct/products.yaml\u003e and\nC\u003ct/update_products.yaml\u003e for examples. See L\u003cSlovo::Command::prodan::products\u003e\non how to add and update products.\n\n=head2 Products template for books\n\nA template for displaying products within a C\u003ccelina\u003e. You can modify this\ntemplate as you wish to display other types of products - not just books as it\nis now. See C\u003cpartials/_kniga.html.ep\u003e inlined in this file's C\u003c__DATA__\u003e\nsection. It of course can be inflated using\nL\u003cSlovo::Command::Author::inflate\u003e. The template produces the HTML from the\nproducts table, including the button mentioned above already.\n\n  # Add the template form Prodan\n  bin/slovo inflate --class Slovo::Plugin::Prodan \\\n    -t --path domove/xn--b1arjbl.xn--90ae/templates/themes/malka\n\n\n=head2 Consents\n\nA section in the Prodan configuration for different settings - only urls for\nnow. C\u003c$app-E\u003cgt\u003econfig('consents')\u003e may contain any settings needed for the\nclient side of the plugin not related dierctly to integration with deliverers\nor payment providers.\n\n=head3 GDPR and Cookies consent\n\nA GDPR and cookies consent alert in the footer which upon click leads to the\npage (celina) where all conditions on using the site can be described. When the\nuser clicks on the link to the I\u003cConsent\u003e page a flag in C\u003clocalStorage\u003e is put\nso the alert is not shown any more. This flag disappears if the user clears any\nsite data and the alert will appear again if the user vists the site again.\nThe Consent celina is created automatically in the localhost domain as an\nexample. Search for C\u003cgdpr_consent\u003e in the source of this module to see how it\nis implemented.\n\nSettings:\n\n    Keys        Default Values\n    --------------------------------------------\n    gdpr_url    '/ѿносно/условия.bg.html'\n    ihost       punycode_decode(ed) current host\n\n=head3 Delivery prices URL\n\nThis is just a setting for this plugin - C\u003cdelivery_prices_url\u003e. Defaults to\n'/ѿносно/цени-доставка.bg.html'. This is a place where the prices for delivery\nare described. The link is displayed at the bottom of the shopping cart widget.\nIt is created automatically for localhost as the C\u003cgdpr_url\u003e\n\n=head3 phone_url\n\nCurrently displayed as a link in the _footer_right.html.ep template.\n\n\n=head2 TODO some day\n\n=over 1\n\n=item Invoices - generate an invoice in PDF via headless LibreOffice instance\non your server.\n\n=item Merchants - a merchants SQL table with Open API to manage and\nautomatically populate invoices.\n\n=item Other \"Pay on Delivery\" providers. Feel free to contibute yours. \n\n=item Other types of Payments and/or Online Payment Providers like online POS\nTerminals etc.\n\n=back\n\n=head1 METHODS\n\nThe usual method is implemented.\n\n=head2 register\n\nPrepends the class to renderer and static classes. Adds some REST API routes,\nconfigures the deliverer.\n\n=head1 EMBEDDED FILES\n\n    @@ css/cart.css\n    @@ js/cart.js\n    @@ img/arrow-collapse-all.svg\n    @@ img/cart-arrow-right.svg\n    @@ img/cart.svg\n    @@ img/cart-check.svg\n    @@ img/cart-off.svg\n    @@ img/cart-minus.svg\n    @@ img/cart-plus-white.svg\n    @@ img/cart-plus.svg\n    @@ img/cart-remove.svg\n    @@ img/econt.svg\n    @@ partials/_footer_right.html.ep\n    @@ partials/_consents.html.ep\n    @@ partials/_kniga.html.ep\n    @@ resources/data/prodan_migrations.sql\n\n=head1 SEE ALSO\n\nL\u003cSlovo::Command::prodan::products\u003e,\nL\u003cSlovo\u003e,\nL\u003cMojolicious::Guides::Tutorial/Stash and templates\u003e,\nL\u003cMojolicious/renderer\u003e,\nL\u003cMojolicious::Renderer\u003e,\nL\u003cMojolicious::Guides::Rendering/Bundling assets with plugins\u003e,\nL\u003cSlovo::Command::Author::inflate\u003e\n\n=head1 AUTHOR\n\n    Красимир Беров\n    CPAN ID: BEROV\n    berov на cpan точка org\n    http://слово.бг\n\n=head1 CONTRIBUTORS\n\nOrdered by time of first commit.\n\n=over\n\n=item * Your Name\n\n=item * Someone Else\n\n=item * Another Contributor\n\n=back\n\n=head1 COPYRIGHT\n\nThis is free software, licensed under:\n\n  The Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the\nLICENSE file included with this module.\n\nThis distribution contains icons from L\u003chttps://materialdesignicons.com/\u003e and\nmay contain other free software which belongs to their respective authors.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkberov%2Fslovo-plugin-prodan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkberov%2Fslovo-plugin-prodan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkberov%2Fslovo-plugin-prodan/lists"}