Hi Brian,

Use the source!

>From your writing, it looks like you sorted out Product (
https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/models.py#L106
).

The other two for your examination are ProductImage (
https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/models.py#L161)
and ProductVariation (
https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/models.py#L222
).

Hope this helps.

best,
ken


On Fri, Jan 10, 2014 at 11:22 PM, Brian Lee <[email protected]> wrote:

> I just deployed a Mezzanine/Cartridge website and I was looking to
> install/load fixtures to load data into my database (using generated json
> files and the loaddata command) for Cartridge products and options.
>
>
> https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/fixtures/cartridge_optional.json
>
> I am following the format of the link above. Using this format, I am
> attempting to add product options, products, product images, and product
> variations. I successfully added product options to the database (since the
> fields were self-explanatory), but I cannot add the others since I am not
> sure of what the fields are. Is there any documentation to explain what
> these fields are?
>
> {
>
>         "pk": 1,
>         "model": "shop.product",
>         "fields": {
>             "status": 2,
>             "available": true,
>             "description": "<p>Magic that can't be removed!</p>",
>             "title": "Django Pony",
>
>             "image": "product/red.png",
>             "sale_id": 1,
>             "unit_price": "10",
>             "sku": "1",
>             "content": "<p>Magic that can't be removed!</p>",
>             "sale_price": "5",
>             "slug": "django-pony",
>             "categories": [
>                 7
>             ],
>             "site": 1
>
>         }
>     },
>     {
>         "pk": 1,
>         "model": "shop.productimage",
>
>         "fields": {
>             "product": 1,
>             "description": "",
>             "_order": 1,
>             "file": "product/red.png"
>         }
>     },
>
>
> {
>         "pk": 8,
>         "model": "shop.productvariation",
>         "fields": {
>             "sku": "8",
>             "product": 1,
>             "default": false,
>             "image": 3,
>             "sale_id": 1,
>             "unit_price": "10",
>             "sale_price": "5",
>             "option2": "Green",
>             "option1": "Medium"
>         }
>     },
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to