-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Cart transform can send the title override for cart #3304
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think this create a bit of an ugly fallback that isn't wanted.
Here is a comparison of the before vs after:
screenshot
We're already mentioning the variant/options picked in a nicer visual way and this is repeating that content.
We should involve a theme UX designer to get their opinion on what would be best here.
It doesn't seem like we can tell when a transform has been applied or not right ? There isn't logic we could apply to it to only use
item.title
when a transform is detected 🤔cc: @melissaperreault
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.
Thanks for feedback! Yeah, agree that this might be not the nicest representation.
We might expand and add such logic to liquid. Or introduce new entire property for cart item, for instance
item.presentment_title
Another option would be can redefine
item.title
to be the same asitem.product.title
instead of concatenation ofproduct title + variant title
From representing point of view, what is the purpose of
cart.item.title
? would it make sense to be the same as product title for dawn or other themes?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.
+1 to @ludoboludo's concerns: repeating the variant name in the product title is redundant for all buyers, including buyers using voice over. I am sure there are more clever outcome we can explore 🙏
For example, when selling plans are available, it would be listed as a line item under the variant choices details; both in cart and checkout.
Curious to learn where this lands!
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.
Thank you @melissaperreault and @ludoboludo!
Example with selling plans makes much sense, we probably should look into some conditional rendering here as well.
contextually for existing representation it makes sense to keep
item.product.title
and with listed variant details under. For all merchants that not using cart transform it is not needed regression. Overridingproduct.title
doesn't seem right either, as we are not overriding product's title, but cart item's title.I will need to speak with product about this one, but suspect the best solution would be probably to introduce a new field here to have something like
item.title_override?
anditem.title_override
for this specific use case.cc @dpwolf @ignacio-chiazzo
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.
@dpwolf I think we might need some UX advice here,
would it make sense to have some kind of different behaviour in case if we have title override?
have something like this in default case (current behaviour)
and totally different rendering for case when we have title overrides, like skipping the variants values and have only
Should it even be on theme by default? or those changes have to be available for customization for each merchant for them to decide?