Release notes for version 0.10

Upgrading to 0.10

This version requires django-CMS version 3.4.2 or higher and djangocms-cascade version 0.12.0 or higher. It is well tested with Django-1.10 but should work as well with Django-1.9.

There has been a lot of effort in getting a cleaner and more consistent API. If you upgrade from version 0.9 please note the following changes:

The REST serializers have been moved into their own submodule shop.serializers. They now are separated into bases and defaults following the same naming convention as beeing used in shop.models and shop.admin. Please ensure that you change your import statements.

Serializers ProductCommonSerializer, ProductSummarySerializer and ProductDetailSerializer have been unified into a single ProductSerializer, which acts as default for the ProductListView and the ProductRetrieveView. The ProductSummarySerializer (which is used to serialize attributes available across all products of the site) now must be configured using the settings directive SHOP_PRODUCT_SUMMARY_SERIALIZER.

All Angular directives have been checked for HTML5 mode compatibility. It is strongly recommended over hashbang mode.

Billing and shipping address have been unified into one single address form which makes them easier to interchange. The salutation field has been removed from the address model and can now optionally be added to the merchant representation.

All AngularJS directives for the catalog list and catalog search view support infinite scroll, as well as manual pagination.

After upgrading to angular-ui-bootstrap version 0.14, all corresponding directives have to be prefixed with uib-....

There is no more need for a special URL pattern to handle auto-completion search. Instead use the wrapping view

The model CartItem has a new CharField product_code. This replaces the product_code, which optionally is kept inside its extra dict. This requires to simplify some templates implementing {{ somevar.extra.product_code }} into {{ somevar.product_code }}; it applies to the cart, the add-to-cart and the order templates. Also check for ProductSerializer-s implemented for products with variations.

Look for methods implementing get_product_variant since its signature changed.

requires a database migration by the merchant implementation. Such a migration file must contain a datamigration, for instance:

from __future__ import unicode_literals

from django.db import migrations, models

def forwards(apps, schema_editor):
    CartItem = apps.get_model('myshop', 'CartItem')
    for item in CartItem.objects.all():
        item.product_code = item.extra.get('product_code', '')

def backwards(apps, schema_editor):
    CartItem = apps.get_model('myshop', 'CartItem')
    for item in CartItem.objects.all():
        item.extra['product_code'] = item.product_code

class Migration(migrations.Migration):

    dependencies = [
        ('myshop', '0001_initial'),

    operations = [
            field=models.CharField(blank=True, help_text='Product code of added item.', max_length=255, null=True, verbose_name='Product code'),
        migrations.RunPython(forwards, reverse_code=backwards),