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

[2.x] Add new exception for visibility in the flat table #563

Closed
wants to merge 2 commits into from

Conversation

Jade-GG
Copy link
Collaborator

@Jade-GG Jade-GG commented Sep 6, 2024

visibility does not come with its very own visibility_value column. As it seems there's already a list of exceptions for this scenario I've just added the visibility type to that.

@royduin
Copy link
Member

royduin commented Sep 6, 2024

But visibility is selected by default, see:

$model->qualifyColumn('visibility'),

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Sep 9, 2024

But visibility is selected by default, see:

$model->qualifyColumn('visibility'),

This is true, the issue comes from trying to add it as a cart attribute (after adding it to the gql schema), which then also adds it as a select automatically.

Given the fact that it does already get selected automatically here, maybe we should also add it in the default cart query? (which also requires adding it into the schema in compadre)

@royduin
Copy link
Member

royduin commented Sep 9, 2024

And where do you need the visibility for?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Sep 9, 2024

And where do you need the visibility for?

We use this in one project with a specific use case to determine how to link back to said product (whether or not it's a sub-product is based on whether or not it's visible). For now I can overwrite cart.graphql and manually put it in but surely that shouldn't be necessary.

@royduin
Copy link
Member

royduin commented Oct 9, 2024

So what's the follow-up on this?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Oct 21, 2024

We could just add visibility as a default gql variable, if that's an ok alternative.

@royduin
Copy link
Member

royduin commented Oct 23, 2024

The title is prefixed with v2, but it's going into master which is v3. Do we also need it in v2?

@royduin
Copy link
Member

royduin commented Oct 23, 2024

So I saw: rapidez/magento2-compadre#10, but this requires Compadre, we don't want that. It should stay optional.

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Oct 23, 2024

So I saw: rapidez/magento2-compadre#10, but this requires Compadre, we don't want that. It should stay optional.

I do want to put a compadre version check around it to make sure, but I don't know what the version number for compadre would be 😅

Could also just not put this in the core and keep it as a custom thing in projects that need it, it's only got one pretty specific use case for now.

@royduin
Copy link
Member

royduin commented Oct 23, 2024

Just override the query for now, if we need it again we can think this over. Thanks!

@royduin royduin closed this Oct 23, 2024
@royduin royduin deleted the Jade-GG-patch-5 branch October 23, 2024 14:40
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.

2 participants