Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Shopinvader Product Variant Selector

Beta License: AGPL-3 shopinvader/odoo-shopinvader

This is shopinvader the odoo module for the new generation of e-commerce.

This module adds the field variant_selector in the product variant metadata (exported to algolia or elastic). The value of the field contains the possible combinations of variants that are available. This ease frontend development of variant selectors.

Example of value

[
    {
        "name": "Frame Type",
        "values": [
            {
                "name": "Poster",
                "sku": "Poster-White-70x50cm",
                "selected": True,
                "available": True,
            },
            {
                "name": "Wooden",
                "sku": "Wooden-White-70x50cm",
                "selected": False,
                "available": True,
            },
        ],
    },
    {
        "name": "Frame Color",
        "values": [
            {
                "name": "White",
                "sku": "Poster-White-70x50cm",
                "selected": True,
                "available": True,
            },
            {
                "name": "Black",
                "sku": "Poster-Black-70x50cm",
                "selected": False,
                "available": True,
            },
            {
                "name": "Grey",
                "sku": "Poster-Grey-70x50cm",
                "selected": False,
                "available": True,
            },

        ],
    },
    {
        "name": "Poster Size",
        "values": [
            {
                "name": "45x30cm",
                "sku": "",
                "selected": False,
                "available": False,
            },
            {
                "name": "70x50cm",
                "sku": "Poster-White-70x50cm",
                "selected": True,
                "available": True,
            },
            {
                "name": "90x60cm",
                "sku": "Poster-White-90x60cm",
                "selected": False,
                "available": True,
            },
        ],
    },
],

Understanding the way to select attributes

It’s also important to understand how variants are selected and how attributes’ values are filtered.

Imagine a case where you have shoes with - 6 sizes: 15, 16, 17, 18, 19, 20 - 3 colors: Green, Red, Yellow

and some exceptions: - Green is available in size: 18, 19 - Red is available in size: 15, 16, 17 - Yellow is available in size: 18, 19, 20

In your ERP you have configured to select first the size then the color. And the default variant is the first “Green 18”

Step 1 : You go to the page of your product.

You will have:

size : 15, 16, 17, [18], 19, 20
color : [Green], (Red), Yellow

[] mean selected
() mean not available

Only the color Green and Yellow are available because the size 18 is selected.

Step 2: Now you select the color Yellow

You will have:

size : 15, 16, 17, [18], 19, 20
color : Green, (Red), [Yellow]

Even if you select the color Yellow the size are now filtered because the second filter cannot affect the first one.

Step 3: Now you select the size 16

As only the Red color is available for this size you are redirected to the Red shoes and you have

size : 15, [16], 17, 18, 19, 20
color : (Green), [Red], (Yellow)

Why not trying to filter the size when changing the color?

Allowing this would mean that if you select the size 16 you will have something like this:

size : 15, [16], 17, (18), (19), (20)
color : (Green), [Red], (Yellow)

And you will be locked in this situation without any possibility to select the Yellow shoes with size 19. There is an order for filling/selecting the value of each options and selecting a value should only impact the next attribute not the previous one.

This is the Odoo side of Shopinvader.

Table of contents

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Akretion

Contributors

Other credits

The development of this module has been financially supported by:

  • Abilis

  • Cosanum

Maintainers

This module is part of the shopinvader/odoo-shopinvader project on GitHub.

You are welcome to contribute.

Metadata

Release files for odoo12-addon-shopinvader-product-variant-selector 12.0.1.0.0.99.dev7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo12-addon-shopinvader-product-variant-selector 12.0.1.0.0.99.dev7
File Interpreter ABI Platform
odoo12_addon_shopinvader_product_variant_selector-12.0.1.0.0.99.dev7-py3-none-any.whl Python 3 none any Details

Release files / odoo12_addon_shopinvader_product_variant_selector-12.0.1.0.0.99.dev7-py3-none-any.whl

Download URL odoo12_addon_shopinvader_product_variant_selector-12.0.1.0.0.99.dev7-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bed98cc70b8ffdbd387049f0d0ad4a1e320c7a12e8eaac2fa9f5137dd50a125
BLAKE2b-256 checksum
How to use checksums
52fa8cd88a98103e4e08536eaf1ba0ce2e21b3a727f03d6ed7f22a98ff85f1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page