Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add url and metadata for two product entities #15567 #15733

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions saleor/product/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ class ProductChannelListing(PublishableModel):
amount_field="discounted_price_amount", currency_field="currency"
)
discounted_price_dirty = models.BooleanField(default=False)
url = models.URLField(blank=True, null=True, help_text="Direct links to sales channels")
metadata = JSONField(default=dict, blank=True, help_text="Metadata for storing additional information")

class Meta:
unique_together = [["product", "channel"]]
Expand Down Expand Up @@ -508,6 +510,8 @@ class ProductVariantChannelListing(models.Model):
)

preorder_quantity_threshold = models.IntegerField(blank=True, null=True)
url = models.URLField(blank=True, null=True, help_text="Direct links to sales channels")
metadata = JSONField(default=dict, blank=True, help_text="Metadata for storing additional information")

objects = managers.ProductVariantChannelListingManager()

Expand Down