Ecommerce for Mezzanine

Related tags

E-commercecartridge
Overview
https://secure.travis-ci.org/stephenmcd/cartridge.png?branch=master

Created by Stephen McDonald

Overview

Cartridge is a shopping cart application built using the Django framework. It is BSD licensed, and designed to provide a clean and simple base for developing e-commerce websites. It purposely does not include every conceivable feature of an e-commerce website; instead, Cartridge focuses on providing core features common to most e-commerce websites.

This specific focus stems from the idea that every e-commerce website is different, is tailored to the particular business and products at hand, and should therefore be as easy to customize as possible. Cartridge achieves this goal with a code-base that is as simple as possible and implements only the core features of an e-commerce website.

Cartridge extends the Mezzanine content management platform. A live demo of Cartridge can be found by visiting the Mezzanine live demo.

Features

  • Hierarchical categories
  • Easily configurable product options (colours, sizes, etc.)
  • Hooks for tax/shipping calculations and payment gateways
  • Sale pricing
  • Promotional discount codes
  • PDF invoice generation (for packing slips)
  • Stock control
  • Product popularity
  • Thumbnail generation
  • Built-in test suite
  • Separation of presentation (no embedded markup)
  • Smart categories (by price range, colour, etc)
  • Registered or anonymous checkout
  • Configurable number of checkout steps
  • Denormalised data for accessiblilty and performance
  • Authenticated customer accounts with transaction history

Dependencies

Cartridge is designed as a plugin for the Mezzanine content management platform, and therefore requires Mezzanine to be installed. The integration of the two applications should occur automatically by following the installation instructions below.

Installation

The easiest method is to install directly from PyPI using pip by running the command below, which will also install the required dependencies mentioned above:

$ pip install -U cartridge

Otherwise, you can download Cartridge and install it directly from source:

$ python setup.py install

Once installed, the command mezzanine-project can be used to create a new Mezzanine project, with Cartridge installed, in similar fashion to django-admin.py:

$ mezzanine-project -a cartridge project_name
$ cd project_name
$ python manage.py createdb --noinput
$ python manage.py runserver

Here we specify the -a switch for the mezzanine-project command, which tells it to use an alternative package (cartridge) for the project template to use. Both Mezzanine and Cartridge contain a project template package containing the settings.py and urls.py modules for an initial project. If you'd like to add Cartridge to an existing Mezzanine or Django project, you'll need to manually configure these yourself. See the FAQ section of the Mezzanine documentation for more information.

Note

The createdb command is a shortcut for using Django's migrate command, which will also install some demo content, such as a contact form, image gallery, and more. If you'd like to omit this step, use the --nodata option with createdb.

You should then be able to browse to http://127.0.0.1:8000/admin/ and log in using the default account (username: admin, password: default). If you'd like to specify a different username and password during set up, simply exclude the --noinput option included above when running createdb.

Contributing

Cartridge is an open source project managed using both the Git and Mercurial version control systems. These repositories are hosted on both GitHub and Bitbucket respectively, so contributing is as easy as forking the project on either of these sites and committing back your enhancements.

Please note the following guidelines for contributing:

  • Contributed code must be written in the existing style. For Python (and to a decent extent, JavaScript as well), this is as simple as following the Django coding style and (most importantly) PEP 8. Front-end CSS should adhere to the Bootstrap CSS guidelines.
  • Contributions must be available on a separately named branch based on the latest version of the main branch.
  • Run the tests before committing your changes. If your changes cause the tests to break, they won't be accepted.
  • If you are adding new functionality, you must include basic tests and documentation.

Here's a quick start to hacking on Cartridge after forking it on GitHub, by using the internal "project_template" as your current project:

$ git clone https://github.com/your-github-username/cartridge/
$ cd cartridge
$ git checkout -b your-new-branch-name
$ cp cartridge/project_template/project_name/local_settings.py{.template,}
$ python setup.py develop
$ python cartridge/project_template/manage.py createdb --noinput
$ python cartridge/project_template/manage.py runserver

"hack hack hack"

$ python setup.py test
$ git commit -am "A message describing what you changed."
$ git push origin your-new-branch-name

Note

Cartridge's development branch often relies on features that exist in Mezzanine's development branch, but haven't yet made it into an official release. To install Mezzanine's development version in your environment, run:

$ pip install --upgrade git+https://github.com/stephenmcd/mezzanine.git#egg=Mezzanine

Language Translations

Cartridge makes full use of translation strings, which allow Cartridge to be translated into multiple languages using Django's internationalization methodology. Translations are managed on the Transiflex website but can also be submitted via GitHub or Bitbucket. Consult the documentation for Django's internationalization methodology for more information on creating translations and using them.

Third-party Modules

The following modules have been developed outside of Cartridge. If you have developed a module to integrate with Mezzanine or Cartridge, and would like it listed in the documentation, send an email to the mezzanine-users mailing list. You can also add modules to the Mezzanine Grid on djangopackages.com.

Donating

If you would like to make a donation to continue development of Cartridge, you can do so via the Mezzanine Project website.

Support

To report a security issue, please send an email privately to [email protected]. This gives us a chance to fix the issue and create an official release prior to the issue being made public.

For all other Cartridge support, the primary channel is the mezzanine-users mailing list. Questions, comments, and all related discussions take place here amongst knowledgeable members of the community.

If you're certain you've come across a bug, then please use the GitHub issue tracker. It's crucial that enough information is provided to reproduce the bug. This includes things such as the Python stack trace generated by error pages, as well as other aspects of the development environment used, such as operating system, database, Python version, etc. If you're not sure you've found a reproducable bug, then please try the mailing list first.

Finally, feel free to drop by the #mezzanine IRC channel on Freenode, for a chat!

Communications in all Cartridge and Mezzanine spaces are expected to conform to the Django Code of Conduct.

Sites Using Cartridge

Comments
  • Support for custom Product models

    Support for custom Product models

    This is not intended to be merged immediately.

    This adds support for subclassing Product, using the same strategy used in Mezzanine for subclassing Page:

    • A content_model field and corresponding method Product.get_content_model() are added.
    • ProductAdmin.change_view() is added which redirects to the subclass's change view.
    • The product view looks for a template called "shop/products/customproduct.html", where customproduct is the lower-cased name of the Product subclass.

    Things that need doing:

    • tests
    • the names of content_model and get_content_model() are taken directly from Mezzanine and don't really make sense here. I think they should either be changed, or this functionality should be factored out into a mixin in Mezzanine core.
    • the template names and directory structure might warrant some attention
    • we should think about variations and how that's going to work

    In the long term I'd like Category models to be able to be limited to a single Product subclass. That would allow templates, sort options, and custom page processors that are specific to a single Product type.

    opened by AlexHill 42
  • Custom Product Models Reborn

    Custom Product Models Reborn

    This is a rebase and update of the work of @AlexHill and @joshcartme in #57.

    • [x] Factor subclassability functionality from Mezzanine's Page into a mixin and use it here.
      • Insert content models into context rather than using a template tag, as Mezzanine's Page now does.
    • [ ] Add a default product type (like RichTextPage in Mezzanine).
    • [ ] Add a migration for existing products to the default product type.
    • [x] Pull out just the functionality needed for change_list.html and remove page_tree.js.
    released 
    opened by ryneeverett 15
  • Handlers skipped when returning to existing checkout step

    Handlers skipped when returning to existing checkout step

    As reported here:

    https://groups.google.com/forum/#!topic/mezzanine-users/D5Wh5iTH2Aw

    We recently added handling in the checkout steps to support leaving at a particular step, browsing the site further, then returning to the last step the user was at - I suspect this is the cause of one or more "handler" style functions not being called, since in the described case, the first step is skipped.

    Perhaps we simply need to call the handler functions at each checkout step.

    opened by stephenmcd 14
  • Check session data for checkout step when POST data not present

    Check session data for checkout step when POST data not present

    Currently we just check POST for the checkout step before defaulting to CHECKOUT_STEP_FIRST. This checks the order form's initial data for a "step" entry after checking the POST data.

    My use case for this is to correctly redirect the user when returning via redirect from an external payment gateway when an error has occurred. Currently, the user is redirected to the checkout url and, lacking any POST data, shown the first checkout step. With this change, their progress through the cart is loaded from the session and they are correctly shown the payment step.

    released 
    opened by AlexHill 14
  • Main refactor to Django 4.0 and a similar Setup as Mezzanine 5.1

    Main refactor to Django 4.0 and a similar Setup as Mezzanine 5.1

    Making similar upgrades as in Mezzanine 5.1 which the same modern setup and configuration. I was going through all the latest history from Mezzanine and made similar changes. All tests are passing. I didn't update the docs or Changelog, but I think it can be merged.

    This includes also #356 as I started from that branch.

    released 
    opened by henri-hulski 12
  • Would you like to install an initial Category and Product? (yes/no)

    Would you like to install an initial Category and Product? (yes/no)

    I get asked the question "Would you like to install an initial Category and Product? (yes/no)" on almost every manage.py command I use, test, migrate, etc etc. This should probably only happen on syncdb/createdb.

    opened by overshard 10
  • mezzanine-project mezzanine_project: error: unrecognized arguments: -a

    mezzanine-project mezzanine_project: error: unrecognized arguments: -a

    Trying to use cartridge master with Mezzanine master and django 1.8, I get the following error when I try to create the cartridge project

    $ mkvirtualenv mezmaster
    $ pip install git+https://github.com/stephenmcd/mezzanine.git#egg=mezzanine
    $ pip install git+https://github.com/stephenmcd/cartridge.git#egg=cartridge
    $ mezzanine-project -a cartridge localvore-dev
    usage: mezzanine-project mezzanine_project [-h] [--version] [-v {0,1,2,3}]
                                               [--settings SETTINGS]
                                               [--pythonpath PYTHONPATH]
                                               [--traceback] [--no-color]
                                               [--template TEMPLATE]
                                               [--extension EXTENSIONS]
                                               [--name FILES]
                                               name [directory]
    mezzanine-project mezzanine_project: error: unrecognized arguments: -a
    

    installed packages

    $ pip freeze
    Cartridge==0.9.5
    Django==1.8.2
    Mezzanine==3.1.10
    Pillow==2.8.2
    PyPDF2==1.24
    argparse==1.2.1
    beautifulsoup4==4.3.2
    bleach==1.4.1
    chardet==2.3.0
    django-contrib-comments==1.6.1
    filebrowser-safe==0.3.8
    future==0.14.3
    grappelli-safe==0.3.13
    html5lib==0.99999
    oauthlib==0.7.2
    pytz==2015.4
    reportlab==3.2.0
    requests==2.7.0
    requests-oauthlib==0.5.0
    six==1.9.0
    tzlocal==1.2
    wsgiref==0.1.2
    xhtml2pdf==0.0.6
    

    Let me know if you need more info

    opened by n1ywb 9
  • Adding

    Adding "sku" to ProductAdmin.search_fields doesn't work

    If I add "sku" to the ProductAdmin.search_fields tuple (either by monkey-patching or modifying the source), I would expect to be able to search on a Product's SKU in the admin, just like you can search on a ProductVariation SKU (through variations__sku).

    However I always get 0 results returned even when doing a direct database lookup on sku=blah works.

    Can't seem to figure it out.

    opened by sjkingo 9
  • "value too long for type character varying(200)" when adding a Product to the shopping cart

    I created completely localized website in russian, so everything is in russian including product names, product variations etc..

    Wher adding a product to the shopping cart (with one variation, which is in russian too) I get the error (below). And here the SQL statement (from PostgreSQL logs, below). Probably the "url" field is too short, probably because of this translation Unicode->%D0%B8

    The quick fix could be just increasing the field length.

    Hint: may be such kilometer long urls make not so much sense... is there an easy way to install a custom "encoding" function?. I mean to translate the product name "Полоски вертикальные, полотенцесушитель" to url "poloski-vertikalnie-polotenzesushitel" (this is so called "translit", a special way to write in russian using latine alphabet, there are enough functions to do this translation, I'm asking about a possibility to plug-in such function into Cartridge. I want to edit products in Admin and get the urls in Latine/english automatically)

    2013-06-03 01:07:20 EEST 0 LOG:  statement: BEGIN
    2013-06-03 01:07:20 EEST 0 LOG:  duration: 0.049 ms
    2013-06-03 01:07:20 EEST 0 LOG:  statement: SELECT (1) AS "a" FROM "shop_cartitem" WHERE "shop_cartitem"."id" = 57  LIMIT 1
    2013-06-03 01:07:20 EEST 0 LOG:  duration: 0.187 ms
    2013-06-03 01:07:20 EEST 0 LOG:  statement: UPDATE "shop_cartitem" SET "sku" = '96', "description" = 'Полоски вертикальные, полотенцесушитель 
    Размер, мм: 500x600', "quantity" = 1, "unit_price" = '1900.00', "total_price" = '1900.00', "cart_id" = 38, "url" = '/shop/product/%D0%BF%D0%BE
    %D0%BB%D0%BE%D1%81%D0%BA%D0%B8-%D0%B2%D0%B5%D1%80%D1%82%D0%B8%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D0%BF%D0%BE%D0%BB%D0%BE%D1%82%D0%B5%D
    0%BD%D1%86%D0%B5%D1%81%D1%83%D1%88%D0%B8%D1%82%D0%B5%D0%BB%D1%8C/', "image" = 'product/DSC02493.jpg' WHERE "shop_cartitem"."id" = 57 
    2013-06-03 01:07:20 EEST 0 ERROR:  value too long for type character varying(200)
    2013-06-03 01:07:20 EEST 0 STATEMENT:  UPDATE "shop_cartitem" SET "sku" = '96', "description" = 'Полоски вертикальные, полотенцесушитель Разме
    р, мм: 500x600', "quantity" = 1, "unit_price" = '1900.00', "total_price" = '1900.00', "cart_id" = 38, "url" = '/shop/product/%D0%BF%D0%BE%D0%B
    B%D0%BE%D1%81%D0%BA%D0%B8-%D0%B2%D0%B5%D1%80%D1%82%D0%B8%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D0%BF%D0%BE%D0%BB%D0%BE%D1%82%D0%B5%D0%BD%
    D1%86%D0%B5%D1%81%D1%83%D1%88%D0%B8%D1%82%D0%B5%D0%BB%D1%8C/', "image" = 'product/DSC02493.jpg' WHERE "shop_cartitem"."id" = 57 
    2013-06-03 01:07:20 EEST 0 LOG:  statement: ROLLBACK
    
    Environment:
    
    
    Request Method: POST
    Request URL: http://localhost:8000/shop/product/%D0%BF%D0%BE%D0%BB%D0%BE%D1%81%D0%BA%D0%B8-%D0%B2%D0%B5%D1%80%D1%82%D0%B8%D0%BA%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5-%D0%BF%D0%BE%D0%BB%D0%BE%D1%82%D0%B5%D0%BD%D1%86%D0%B5%D1%81%D1%83%D1%88%D0%B8%D1%82%D0%B5%D0%BB%D1%8C/
    
    Django Version: 1.5.1
    Python Version: 2.7.3
    Installed Applications:
    ('mezzanine.boot',
     'theme1',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.redirects',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.sitemaps',
     'django.contrib.staticfiles',
     'cartridge.shop',
     'mezzanine.conf',
     'mezzanine.core',
     'mezzanine.generic',
     'mezzanine.blog',
     'mezzanine.forms',
     'mezzanine.pages',
     'mezzanine.galleries',
     'mezzanine.accounts',
     'filebrowser_safe',
     'grappelli_safe',
     'django.contrib.admin',
     'django.contrib.comments')
    Installed Middleware:
    ('django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'cartridge.shop.middleware.ShopMiddleware',
     'mezzanine.core.request.CurrentRequestMiddleware',
     'mezzanine.core.middleware.TemplateForDeviceMiddleware',
     'mezzanine.core.middleware.TemplateForHostMiddleware',
     'mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware',
     'mezzanine.core.middleware.SitePermissionMiddleware',
     'mezzanine.pages.middleware.PageMiddleware')
    
    
    Traceback:
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
      109.                         response = middleware_method(request, callback, callback_args, callback_kwargs)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/mezzanine/pages/middleware.py" in process_view
      71.             response = view_func(request, *view_args, **view_kwargs)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/cartridge/shop/views.py" in product
      58.                 request.cart.add_item(add_product_form.variation, quantity)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/cartridge/shop/utils.py" in add_item
      47.         cart.add_item(*args, **kwargs)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/cartridge/shop/models.py" in add_item
      555.         item.save()
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/cartridge/shop/models.py" in save
      638.             super(SelectedProduct, self).save(*args, **kwargs)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/models/base.py" in save
      546.                        force_update=force_update, update_fields=update_fields)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
      626.                             rows = manager.using(using).filter(pk=pk_val)._update(values)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/models/query.py" in _update
      591.         return query.get_compiler(self.db).execute_sql(None)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
      1014.         cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
      840.         cursor.execute(sql, params)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
      41.             return self.cursor.execute(sql, params)
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py" in execute
      58.             six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
    File "/home/dima/.virtualenvs/prj_inox/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py" in execute
      54.             return self.cursor.execute(query, args)
    
    Exception Type: DatabaseError at /shop/product/полоски-вертикальные-полотенцесушитель/
    Exception Value: value too long for type character varying(200)
    
    
    released 
    opened by stargazer33 9
  • Save order fails with UnicodeEncodeError at /shop/checkout/

    Save order fails with UnicodeEncodeError at /shop/checkout/

    Order save (last step on checkout) fails with UnicodeEncodeError The string that could not be encoded/decoded was: Стоимость дост

    it is the following string failed:

    : checkout.py:40

    msgid "Flat rate shipping"

    This error is only occurred if localization is enabled (RU language). Database is MySQL 5.1:0.2.17, charset is utf8_general_ci Products, pages, variations are kept in Russian without issues.

    LANGUAGE_CODE = "ru"

    LANGUAGES = ( ('ru', _('Russian')), )

    USE_I18N = True

    Environment:

    Request Method: POST Request URL:

    Django Version: 1.6.7 Python Version: 2.7.5 Installed Applications: (u'mezzanine.boot', u'django.contrib.auth', u'django.contrib.contenttypes', u'django.contrib.redirects', u'django.contrib.sessions', u'django.contrib.sites', u'django.contrib.sitemaps', u'django.contrib.staticfiles', u'mhapp', u'mhapp.mhtheme', u'cartridge.shop', u'mezzanine.conf', u'mezzanine.core', u'mezzanine.generic', u'mezzanine.blog', u'mezzanine.forms', u'mezzanine.pages', u'mezzanine.galleries', u'mezzanine.accounts', u'filebrowser_safe', u'grappelli_safe', u'django.contrib.admin', u'django.contrib.comments') Installed Middleware: (u'django.contrib.sessions.middleware.SessionMiddleware', u'django.middleware.locale.LocaleMiddleware', u'django.contrib.auth.middleware.AuthenticationMiddleware', u'django.contrib.redirects.middleware.RedirectFallbackMiddleware', u'django.middleware.common.CommonMiddleware', u'django.middleware.csrf.CsrfViewMiddleware', u'django.contrib.messages.middleware.MessageMiddleware', u'cartridge.shop.middleware.ShopMiddleware', u'mezzanine.core.request.CurrentRequestMiddleware', u'mezzanine.core.middleware.TemplateForDeviceMiddleware', u'mezzanine.core.middleware.TemplateForHostMiddleware', u'mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware', u'mezzanine.core.middleware.SitePermissionMiddleware', u'mezzanine.pages.middleware.PageMiddleware')

    Traceback: File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

    1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
    2.     response = view_func(request, _args, *_kwargs)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/cartridge/shop/views.py" in checkout_steps
    3.             order.setup(request)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/cartridge/shop/models.py" in setup
    4.     self.save()  # We need an ID before we can add related items.
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/mezzanine/core/models.py" in save
    5.     super(SiteRelated, self).save(_args, *_kwargs)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/base.py" in save
    6.                    force_update=force_update, update_fields=update_fields)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/base.py" in save_base
    7.             self._save_parents(cls, using, update_fields)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/base.py" in _save_parents
    8.         self._save_table(cls=parent, using=using, update_fields=update_fields)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/base.py" in _save_table
    9.         result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/base.py" in _do_insert
    10.                            using=using, raw=raw)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/manager.py" in _insert
    11.     return insert_query(self.model, objs, fields, **kwargs)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/query.py" in insert_query
    12. return query.get_compiler(using=using).execute_sql(return_id)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
    13.         cursor.execute(sql, params)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/backends/util.py" in execute
    14.         return super(CursorDebugWrapper, self).execute(sql, params)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/backends/util.py" in execute
    15.             return self.cursor.execute(sql, params)
      
      File "/var/lib/openshift/52d044ace0b8cdfcd400021b/python/virtenv/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in execute
    16.         return self.cursor.execute(query, args)
      
      File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py" in execute
    17.         query = query % db.literal(args)
      
      File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/MySQLdb/connections.py" in literal
    18.     return self.escape(o, self.encoders)
      
      File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/MySQLdb/connections.py" in string_literal
    19.             return db.string_literal(obj)
      

    Exception Type: UnicodeEncodeError at /shop/checkout/ Exception Value: 'ascii' codec can't encode characters in position 0-8: ordinal not in range(128)

    opened by wyzex 8
  • Try except around request.cart.delete() on Order.complete()

    Try except around request.cart.delete() on Order.complete()

    I'm not exactly sure how this happens but it isn't the first time. Just got: "AttributeError: 'EmptyCart' object has no attribute 'delete' when a user was completing an order. The cart is already empty once the user reaches this point.

    My guess is the buyer completes an order, presses back which gets the success url we send to Paypal for the redirect back from Paypal after a buyer pays. The cart would have already been deleted at that point. Thats my best guess at 2:30am, and waking up to fix this.

    opened by emilepetrone 8
  • How to remove a checkout field if cart item is from some specific product category

    How to remove a checkout field if cart item is from some specific product category

    Hi!

    Thanx for the awesome work on Cartridge! I need to add a second checkout path for specific products. I don't need all the fields or any shipping adress at all. What would be the best approach to remove a checkout field if the cart item is from some specific product category?

    Thnk you! Best, headkit

    opened by headkit 0
  • Stripe integration no longer works

    Stripe integration no longer works

    It appears that the Stripe payment integration is no longer functional.

    After fixing an initial error ("module 'stripe' has no attribute 'CardError'), test payments are still declined by Stripe, coming back with a message

    { "error": { "message": "Sending credit card numbers directly to the Stripe API is generally unsafe. We suggest you use test tokens that map to the test card you are using, see https://stripe.com/docs/testing.", "type": "invalid_request_error" } }

    The reason is that Stripe now seems to require tokenization of the CC number, rather than passing the number directly. Some related links:

    https://packagist.org/packages/omnipay/stripe https://stackoverflow.com/questions/46720159/stripe-payment-params-error-type-invalid-request-error https://groups.google.com/g/mezzanine-users/c/e8bSj0e7KI0/m/rNEaZm1kDAAJ https://groups.google.com/g/mezzanine-users/c/aN8nZUuM4Oc/m/Mof4rTW0CgAJ https://stripe.com/docs/payments/accept-a-payment?integration=checkout https://stripe.com/docs/payments/integration-builder

    opened by jbrnd 1
  • Executing management import and export products

    Executing management import and export products

    See my post on Stackoverflow

    I don't see how to execute the product import/export functions standalone or from within mezzanine admin. I was able to load product_db.py into an interactive python shell (with some editing) and successfully import products to the database from a CSV file, but I am guessing that is not the way the author designed them to be accessed.

    opened by rickrcomm 0
  • Duplicate admin order confirmation email sent upon

    Duplicate admin order confirmation email sent upon "Re-send order email"

    If a user has completed an order they are presented with a page that gives them the opportunity to "Re-send order email" (the /checkout/complete url)

    If the site has a settings.SHOP_ORDER_EMAIL_BCC variable set then this second email will also be sent to the admin (https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/checkout.py#L182) which could potentially cause confusion for the shop owners as they may think they have duplicate orders.

    We could potentially just duplicate the send_order_email function as a "send_admin_order_email" function and call that once in the order view (https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/checkout.py#L182) and remove the BCC when the customers email is called but I would be interested to know if people thought this is the optimum path.

    opened by petedermott 0
Releases(v1.3.4)
Currency Conversion in Python

CurrencyConversion connect to an API to do currency conversions, save as json text or screen output exchangeratesAPI.py -h Exchange Rates via 'api.cur

soup-works 1 Jan 29, 2022
An eBay-like e-commerce auction site that will allow users to post auction listings, place bids on listings, comment on those listings, and add listings to a watchlist.

e-commerce-auction-site This repository is my solution to Commerce project of CS50’s Web Programming with Python and JavaScript course by Harvard. 🚀

3 Sep 03, 2022
Fully functional ecommerce website with user and guest checkout capabilities and Paypal payment integration.

ecommerce_website Fully functional ecommerce website with user and guest checkout capabilities and Paypal payment integration. pip install django pyth

2 Jan 05, 2022
Foreign exchange rates, Bitcoin price index and currency conversion using ratesapi.io

forex-python Forex Python is a Free Foreign exchange rates and currency conversion. Note: Install latest forex-python==1.1 to avoid RatesNotAvailableE

MicroPyramid 540 Jan 05, 2023
A web application to search for input products across several supermarkets' e-commerce to return price, detail of products running on Python.

Price Checker A web application to search for input products across several supermarkets' e-commerce to return price, detail of products. Requirements

3 Jun 28, 2022
Display money format and its filthy currencies, for all money lovers out there.

Python Currencies Display money format and its filthy currencies, for all money lovers out there. Installation currencies is available on PyPi http://

Alireza Savand 64 Dec 28, 2022
Storefront - An E-commerce StoreFront Application Built With Python

An E-commerce StoreFront Application A very robust storefront project. This is a

Fachii Felix Zasha 1 Apr 04, 2022
Ecommerce for Mezzanine

Created by Stephen McDonald Overview Cartridge is a shopping cart application built using the Django framework. It is BSD licensed, and designed to pr

Stephen McDonald 680 Jan 03, 2023
A Django based shop system

django-SHOP Django-SHOP aims to be a the easy, fun and fast e-commerce counterpart to django-CMS. Here you can find the full documentation for django-

Awesto 2.9k Jan 02, 2023
imager is a modern ecommerce & social network platform that helps users to find the most matching products

imager is a modern ecommerce & social network platform that helps users to find the most matching products. Users can follow their favourite brands and to be aware of friends' actions. If you have se

Sardor 1 Jan 11, 2022
Portfolio and E-commerce site built on Python-Django and Stripe checkout

StripeMe Introduction Stripe Me is an e-commerce and portfolio website offering communication services, including web-development, graphic design and

3 Jul 05, 2022
Python money class with optional CLDR-backed locale-aware formatting and an extensible currency exchange solution.

Python Money Money class with optional CLDR-backed locale-aware formatting and an extensible currency exchange solution. This is version 1.4.0-dev. De

Carlos Palol 214 Dec 22, 2022
A Django e-commerce website

BRIKKHO.com E-commerce website created with Django Run It: Clone the project or download as zip: $ git clone https://github.com/FahadulShadhin/brikkho

Shadhin 1 Dec 17, 2021
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.

Saleor Commerce Customer-centric e-commerce on a modern stack A headless, GraphQL-first e-commerce platform delivering ultra-fast, dynamic, personaliz

Mirumee Labs 17.7k Dec 31, 2022
Domain-driven e-commerce for Django

Domain-driven e-commerce for Django Oscar is an e-commerce framework for Django designed for building domain-driven sites. It is structured such that

Oscar 5.6k Dec 30, 2022
Re-write of floppshop e-commerce site

Floppshop V2 Python: 3.9.5 FastAPI: 0.68 Tortoise-orm: 0.17.8 pytest: 5.2 PostgreSQL: 13.4 Setup Srak jak nie wiesz jak Clone repository $ git clone

jakub-figat 3 Nov 30, 2022
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.

Saleor Commerce Customer-centric e-commerce on a modern stack A headless, GraphQL commerce platform delivering ultra-fast, dynamic, personalized shopp

Saleor Commerce 17.7k Jan 01, 2023
PVE with tcaledger app for payments and simulation of payment requests

tcaledger PVE with tcaledger app for payments and simulation of payment requests. The purpose of this API is to empower users to accept cryptocurrenci

3 Jan 29, 2022
EasyShop User Interface - a shopping program we created for people who want to buy specific cloth wear

EasyShop-User-Interface Welcome to the EasyShop User Interface! This program fetches images from urls as per choices of clothes made by you and displa

Adit Sinha 1 Apr 23, 2022
A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant Django-Merchant is a django application that enables you to use multiple payment processors from a single API. Gateways Following gate

Agiliq 997 Dec 24, 2022