menu

Saleor Commerce

The world’s fastest growing open-source e-commerce platform with billions of dollars transacted. Powered by Python, GraphQL, ReactJS and PWA.

Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Design
view-forward
# Development
view-forward
# Saleor Features
view-forward
Team

Sale for ProductVariant

February 10, 2020 at 1:40pm

Sale for ProductVariant

February 10, 2020 at 1:40pm (Edited 2 months ago)
Is it possible to make sale for ProductVariant, not for Product?

February 11, 2020 at 1:35pm
Hey . Thanks for asking. It's not possible to create such a sale. I'll send your suggestion to the Saleor team.
  • reply
  • like

February 15, 2020 at 8:41am
Hey . Thanks for asking. It's not possible to create such a sale. I'll send your suggestion to the Saleor team.
Thanks
  • reply
  • like

February 21, 2020 at 10:30am
Why I can't add field "product_variants = models.ManyToManyField("product.ProductVariant", blank=True)" to saleor/discount/models.py class Sale ? I get this error: ERROR: INSERT or UPDATE in table "discount_sale_products" violates foreign key constraint "discount_sale_produc_productvariant_id_d7cdefac_fk_product_p" DETAIL: Key (productvariant_id)=(128) not in the table "product_productvariant".
Edited
  • reply
  • like

February 24, 2020 at 2:23pm
Hi there! Have you done python 'manage.py makemigrations' and then 'python manage.py migrate' which propagetes your changes into databse?
  • reply
  • like

March 13, 2020 at 12:41pm
Hi there! Have you done python 'manage.py makemigrations' and then 'python manage.py migrate' which propagetes your changes into databse?
I already solved this problem, thank you very much
like-fill
1
  • reply
  • like
I'm happy to hear that!
  • reply
  • like