Slovo-Plugin-Prodan

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Slovo::Plugin::Prodan - Make and manage sales in your Slovo-based site

=head1 SYNOPSIS

  # In slovo.conf
  load_plugins => [
    #...
    'Themes::Malka',
    {
      Prodan => {
        migrate  => 1,
        consents => {
          gdpr_url    => '/ѿносно/условия.bg.html',
          phone_url           => $ENV{SLOVO_PRODAN_PHONE_URL},
          delivery_prices_url => '/ѿносно/цени-доставки.bg.html',
        },
        econt => {
          shop_id                 => $ENV{SLOVO_PRODAN_SHOP_ID},
          private_key             => $ENV{SLOVO_PRODAN_PRIVATE_KEY},
          shippment_calc_url      => 'https://delivery.econt.com/customer_info.php',
          crupdate_order_endpoint =>
            'https://delivery.econt.com/services/OrdersService.updateOrder.json',
          create_awb_endpoint =>
            'https://delivery.econt.com/services/OrdersService.createAWB.json'
        }}
    },
    #...
  ],

=head1 DESCRIPTION

The word про̀дан (прода̀жба) in Bulgarian means sale. Roots are found in Old
Common Slavic (Old Bulgarian) I<проданьѥ>. Here is an exerpt from Codex
Suprasliensis(331.27) where this word was witnessed: I<сꙑнъ божии. вол҄еѭ
на сьпасьнѫѭ страсть съ вами придетъ. и на B<продании> станетъ.
искѹпѹѭштааго животворьноѭ кръвьѭ. своеѭ миръ.>

L<Slovo::Plugin::Prodan> is a L<Mojolicious::Plugin> that extends a
Slovo-based site and turns it into an online shop. 

=head1 FEATURES

In this edition of L<Slovo::Plugin::Prodan> we implement the following features:

=head2 A Shopping cart

A jQuery and localStorage based shopping cart. Two static files contain
the implementation and they can be inflated. The files are
C</css/cart.css> and C</js/cart.js>. You should inflate these files into
your public forlder C<domove/example.com/public> for the domain on which you
will use it. Even not inflated these will be referred from any page of the
site. The site layout C<layouts/site.html.ep> includes automatically these
two static files if this plugin is loaded.

  # Inflate new static files from Slovo::Plugin::Prodan
  bin/slovo inflate --class Slovo::Plugin::Prodan -p --path domove/xn--b1arjbl.xn--90ae/public

To add a product to your cart and make an order, you need a button, containing
the product data. For example:

    <button class="primary sharer button add-to-cart"
        title="книжно издание" data-sku="9786199169001" 
        data-title="Житие на света Петка Българска от свети патриарх Евтимий"
        data-weight="0.5" data-price="7.00"><img
        src="/css/malka/book-open-page-variant-outline.svg">
        <img src="/img/cart-plus-white.svg"></button>

See "A template..." below.

=head2 Delivery of sold goods

A "Pay on delivery" integration with Bulgarian currier L<Econt (in
Bulgarian)|https://www.econt.com/developers/43-kakvo-e-dostavi-s-ekont.html>.

=head2 Products

Products - a products SQL table to populate your pages with products. You
create a page with several articles (celini) in it. These celini will be the
web-pages for the products. You prepare a YAML file with products. Each product



( run in 1.044 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )