how do you perform bulk actions such as:
----------------------------------------
*quick price changes on a bunch of products.
*deleting multiple products at once.
without having to open each product item in admin area.
Thanks in advance
ionic
I never delete a product since that would affect order history. What I do is replace the default admin class for Product and add a new action that sets active to False. This allow me to tick the checkmark on any of the product and update them. As for price I have list_editable for the price admin which allows me to edit price on the list_change page.
I also added that for the product for inventory that gives an easy way to update.
Hope it helps
lzantal
> --
> You received this message because you are subscribed to the Google Groups "Satchmo users" group.
> To post to this group, send email to satchm...@googlegroups.com.
> To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
>
I was thinking about a solution similar to yours.
Thank you very much!
I will do exactly as you mentioned.
Best wishes
ionic
Sorry for the late reply, very busy weekend.
Here is my code to bulk update price. Please add this into any of your app models.py and admin.py
I have an app called storeoptions where I stick all these in.
Here is the model, I create a proxy class for it so I can easily define the ordering and other customization.
"""
class PriceUpdate(Price):
class Meta:
proxy = True
ordering = ['product','expires']
"""
Here is the admin class
"""
class PriceUpdateAdmin(admin.ModelAdmin):
list_display = ['product','price','quantity','expires']
list_editable = ['price','expires','quantity']
search_fields = ['product__name','product__sku']
admin.site.register(PriceUpdate, PriceUpdateAdmin)
"""
That's all. once you have that you will be able to bulk edit the price for your products
Hope it helps
lzantal