Skip to content

Conversation

@0xUnicorn
Copy link
Contributor

Business logic for product labels has been moved from shop_index.html template to a Product model property, with tests.

Template now loads a default label template using a custom template tag for mapping label_type to css class.

I also changed the product labels to bootstrap badges

image

I started this refactoring with the goal of fixing #1985, so do we wanna change the logic for when we show any labels?

Refactor the logic for applying labels to a model property with test.
- Use templatetag for mapping 'label_type' to a css class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webshop not showing 'sale ends in X days' for all items with end date

1 participant