Skip to main content

E-commerce solution

Project description

contribs
🇲🇺 🇵🇰 🇳🇬 🇮🇳 🇻🇳 🇬🇭 🇬🇧

First Timers Only

Discord CodeQL

ShopCube

E-commerce and POS platform built on the Shopyo Flask framework.

  • 🛒 cart
  • ⭐ wishlist
  • 📑 orders
  • 📤 upload by csv
  • 📊 charts
  • 🖌️ theming

Installation

python3 -m venv venv
source venv/bin/activate
pip install shopcube

Then initialise:

shopcube initialise
shopcube run

Dashboard: http://127.0.0.1:5000/dashboard -- Email: admin@admin.com, Password: admin

Production

Git clone

pip install gunicorn
gunicorn --bind 0.0.0.0:8000 shopcube.wsgi:application

For development:

pip install -e .
shopcube initialise
flask --debug run

Environment variables:

Variable Description Default
SHOPCUBE_CONFIG Environment type (production, development, testing) production
SECRET_KEY Secret key for session encryption Required
SHOPCUBE_DATA_DIR Directory for database and uploads Current directory

Features

Inventory

  • Products with barcode, images, colors, sizes, categories, subcategories, and vendors
  • Low-stock alerts with configurable thresholds
  • Stock adjustments with reason codes (manual, POS sale, return, count, PO receive)
  • Purchase orders with draft, ordered, received lifecycle; auto-updates stock on receipt
  • Vendor/supplier management with contact info
  • Physical inventory counts with variance application
  • Multi-location inventory with location management
  • Stock transfers between locations
  • Kit/bundle assembly from components
  • Cost price and margin tracking
  • Barcode label printing
  • Inventory reports (valuation, low-stock, margin)

POS

  • Product grid with category filtering, search, and barcode scanning
  • Cart with quantity controls and running total
  • Discount (percentage or fixed amount)
  • Order notes
  • Payment methods: Cash, Card, Other
  • Auto change calculation
  • Quick keys for one-tap product add
  • Transaction history
  • Sales reports by date, total, payment method
  • Returns with receipt lookup and stock reversal
  • Shift management with cash reconciliation
  • Cashier role for non-admin staff

Customers

  • Registration with email confirmation
  • Order history per customer
  • Customer groups with percentage discounts
  • Customer Lifetime Value tracking (total spent, order count, AOV)

Admin

  • Product CRUD with images, colors, sizes, vendor assignment
  • Category and subcategory management
  • Coupon management
  • Delivery and payment method configuration
  • Order management with status tracking and email notifications
  • Bulk product upload via Excel
  • Role-based access control

Security

  • CSRF protection on all POST routes
  • Admin-only access on management routes
  • Login required for all management endpoints
  • File upload type and size validation

Built on Shopyo with isolated module architecture.

E-Commerce Configuration

The shopyo_ecommerce module reads these Flask config keys. Defaults are applied automatically, override them in your config.py or instance config:

Key Default Description
SHOPYO_ECOMMERCE_URL /shopyo-ecommerce URL prefix for all ecommerce routes
SHOPYO_ECOMMERCE_CURRENCY USD ISO 4217 currency code (e.g. MUR, EUR, GBP)
SHOPYO_ECOMMERCE_SECTION_NAME Shop Section name shown in dashboard and settings
SHOPYO_ECOMMERCE_ITEMS_PER_PAGE 12 Products per page in shop listings
SHOPYO_ECOMMERCE_ENABLE_WISHLIST True Enable/disable the wishlist feature
SHOPYO_ECOMMERCE_ENABLE_REVIEWS False Enable/disable product reviews
SHOPYO_ECOMMERCE_CATEGORYPHOTOS_UPLOADSET categoryphotos Flask-Uploads set name for category images
SHOPYO_ECOMMERCE_SUBCATEGORYPHOTOS_UPLOADSET subcategoryphotos Flask-Uploads set name for subcategory images
SHOPYO_ECOMMERCE_PRODUCTEXCEL_UPLOADSET productexcel Flask-Uploads set name for product Excel imports
SHOPYO_ECOMMERCE_PRODUCTPHOTOS_UPLOADSET productphotos Flask-Uploads set name for product images
SHOPYO_ECOMMERCE_UPLOADED_CATEGORYPHOTOS_DEST static/uploads/categoryphotos Upload destination for category images
SHOPYO_ECOMMERCE_UPLOADED_SUBCATEGORYPHOTOS_DEST static/uploads/subcategoryphotos Upload destination for subcategory images
SHOPYO_ECOMMERCE_UPLOADED_PRODUCTEXCEL_DEST static/uploads/productexcel Upload destination for product Excel files
SHOPYO_ECOMMERCE_UPLOADED_PRODUCTPHOTOS_DEST static/uploads/productphotos Upload destination for product images

Example:

class Config:
    SHOPYO_ECOMMERCE_URL = "/shop"
    SHOPYO_ECOMMERCE_CURRENCY = "MUR"
    SHOPYO_ECOMMERCE_ITEMS_PER_PAGE = 24
    SHOPYO_ECOMMERCE_ENABLE_WISHLIST = False
    SHOPYO_ECOMMERCE_UPLOADED_PRODUCTPHOTOS_DEST = "/data/uploads/products"

Currency symbols are resolved from the ISO 4217 code via the iso4217parse package (e.g. MUR -> , EUR -> ).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shopcube-5.1.0.tar.gz (115.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shopcube-5.1.0-py3-none-any.whl (171.8 kB view details)

Uploaded Python 3

File details

Details for the file shopcube-5.1.0.tar.gz.

File metadata

  • Download URL: shopcube-5.1.0.tar.gz
  • Upload date:
  • Size: 115.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for shopcube-5.1.0.tar.gz
Algorithm Hash digest
SHA256 161d26ec2578e522a3a495f93129bd597f55caf4c065c6c62b5d8f80c0969dfc
MD5 f618f34323a1d4143debc56bf61fbe9d
BLAKE2b-256 a29e0351ca85e37bb292d56829760e54a1b04d5fe2a7c8fe73eea124dc6c10cc

See more details on using hashes here.

File details

Details for the file shopcube-5.1.0-py3-none-any.whl.

File metadata

  • Download URL: shopcube-5.1.0-py3-none-any.whl
  • Upload date:
  • Size: 171.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for shopcube-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0135574690cae8ec7b5f1b59df6d6d09ec50b9f1ad527fe8d4b79a0828f95fba
MD5 18f111d659d93d5315c708bfec25d4b0
BLAKE2b-256 d6f8c7174d3238038c44d42895e7f6e7fbde051eb5b850beadd6e72098c2c6b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page