-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Show unit price in checkout process (both cart page and cart sidebar) #6905
Show unit price in checkout process (both cart page and cart sidebar) #6905
Conversation
037e9d6
to
5ac00de
Compare
@@ -219,6 +219,12 @@ def unit_value | |||
final_weight_volume / quantity | |||
end | |||
|
|||
def unit_price_price_and_unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be unit_price_and_unit
? I also think we should document why this is random. No other dev will understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I havent' spend to much time on it since @andrewpbrett will re-do this part.
I wanted to create a structure like:
def unit_price
price = # ... whateever
unit = # ... whatever
return {
price: price,
unit: unit
}
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, we can live with it until he works on it 👍
"question-mark-with-tooltip-animation" => true, | ||
context: "'cart-sidebar'"} | ||
.options-text | ||
{{ line_item.variant.unit_price_price | localizeCurrency }} / {{ line_item.variant.unit_price_unit }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed that unit_price_price
. I think it should be changed to unit_price
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I commented here #6905 (comment) I wanted to have such thing like : unit_price.price
and unit_price.unit
.
- .total-price element must be a div (display: block) to be text right aligned (and not being float: right) - use .option-text to display a grey text - use display: flex to display question mark icon and text information
- This behavior permit use to create custom CSS specifications to display this tooltip best fitted to the context.
- Use a new class to specify css customization - Add to `line_item.rb` a fake method: `unit_price_price_and_unit` @andrewpbrett will change it with real values. - Add a new variable: $text-xs to specify small font-size squash "Display unit price on /cart page"
5ac00de
to
dd0ef0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked it locally and it's working great. What I'm missing is some testing, even at view level so can confidently know we're showing the right unit price and hiding it when no toggled. I can help you with that.
Hey @jibees , Nice, unit prices are now showing up in the cart side bar as well, on desktop: And mobile iPhone 12: Agree with @sauloperez , it's a good idea to add a simple feature test here 👍 Created this tech-debt issue. Moving to ready to go. |
Agree. We can work on it separately. |
What? Why?
Closes #6498
This issue display fake unit price in the checkout process, both cart sidebar and
/cart
page.What should we test?
/cart
should display the item's unit price.Screenshots
Shopping cart
Sidebar cart
Release notes
Display unit price on checkout process
Changelog Category: User facing changes