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

Hide Master Price input when there's no default price #3155

Merged
merged 2 commits into from
May 2, 2019

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Mar 26, 2019

Description

This PR hides the Master Price input in the Amin Product Edit page when there's no available (not deleted) price for that product's master variant.

closes #1861
closes #1989

Before

Schermata 2019-03-26 alle 18 48 08

👆 Please note that all prices on this product have been deleted, $999 comes from a deleted (discarded) price.

After

Schermata 2019-03-26 alle 18 47 35

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)

@kennyadsl kennyadsl added type:bug Error, flaw or fault changelog:solidus_backend Changes to the solidus_backend gem labels Mar 26, 2019
@kennyadsl kennyadsl self-assigned this Mar 26, 2019
@kennyadsl kennyadsl force-pushed the kennyadsl/discarded-prices branch 2 times, most recently from ad53078 to 94bbe62 Compare March 27, 2019 10:58
Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am okay with this! Thanks @kennyadsl

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Just a small nit about wrong indentation

backend/app/views/spree/admin/products/_form.html.erb Outdated Show resolved Hide resolved
@kennyadsl kennyadsl force-pushed the kennyadsl/discarded-prices branch 2 times, most recently from 7425b6c to 6c8c4b1 Compare April 3, 2019 17:06
Copy link
Contributor

@aitbw aitbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from one, non-blocking comment, this is fantastic! Great work @kennyadsl 💪

backend/app/views/spree/admin/products/_form.html.erb Outdated Show resolved Hide resolved
Right now this method (still not used in the whole codebase) is
returning true, even when there is only a default price which has
been discarded.
while editing product in admin.

This should clarify that there's no current price available for
the product using the default pricing configuration.
@kennyadsl kennyadsl force-pushed the kennyadsl/discarded-prices branch from 6c8c4b1 to 51ce29b Compare April 30, 2019 21:45
@kennyadsl kennyadsl merged commit 63a769d into solidusio:master May 2, 2019
@kennyadsl kennyadsl deleted the kennyadsl/discarded-prices branch May 2, 2019 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem type:bug Error, flaw or fault
Projects
None yet
5 participants