stephenmcd / cartridge

Ecommerce for Mezzanine
http://cartridge.jupo.org
BSD 2-Clause "Simplified" License
709 stars 299 forks source link

Is there a way to import orders ? #315

Closed tderouin closed 7 years ago

tderouin commented 7 years ago

Is there a way to import orders from a different system using a utils script from the command line?

e.g.

cart = Cart()
product_variation = ProductVariation.objects.get(pk=id)
cart.add(production_variation)
order = Order(cart=cart, status=complete, user=user)
order.save() 

The Order.setup seems to rely on the request and request.session objects, but maybe there's a different way?

Thanks! This is a great project.

stephenmcd commented 7 years ago

Again, please use the mailing list.