Hi Brian, Thanks for the clarification of your question. I think I can help you.
`_order` is a field on mezzanine.core.models.Orderable and controls the sequence in which items are displayed. https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/models.py#L333 `site` is a field on mezzanine.core.models.SiteRelated and is for mutli-site applications. This takes the ID of the Site object. You can safely use a value of '1' if you only have a single-site application (and have not made any additional Site objects). `status` is a field on mezzanine.core.models.Displayable and indicates the publication status, e.g. draft or published. Take a look at https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/models.py#L191-L196 . `default` is a field on cartridge.models.ProductVariation and is a boolean that identifies which variation is the default for display. For example, if your variations include "small", "medium", and "large", you can set the "large" one to be the default. hth. ken On Sat, Jan 11, 2014 at 9:56 AM, Brian Lee <[email protected]> wrote: > Thanks, Ken! > > I actually looked at that already, and I took the posted fixtures from the > initial json fixtures that were included in the Mezzanine package. I was > just wondering the meaning of some of the more ambiguous fields, such as > "_order" for ProductImage, "status" and "site" for Product, "default" for > ProductVariation, etc. > > > On Saturday, January 11, 2014 8:20:17 AM UTC-5, Kenneth Bolton wrote: > >> 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. > -- 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.
