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

[3.x] Config defaults #782

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

[3.x] Config defaults #782

wants to merge 2 commits into from

Conversation

Jade-GG
Copy link
Collaborator

@Jade-GG Jade-GG commented Mar 24, 2025

I've gone through the magento config.xml files and grabbed all of the config values that are currently being used by Rapidez or Rapidez packages, but are not from a third-party magento extension. Subsequently, I removed all the hardcoded defaults from all the Rapidez::config calls.

I also removed the show_customer_address_fields part because it is not being used anymore.

@royduin
Copy link
Member

royduin commented Mar 25, 2025

Looking good! But the tests are failing? And this solution vs using https://developer.adobe.com/commerce/webapi/graphql/schema/store/queries/store-config/, it looks like it can return a lot of configurations: https://developer.adobe.com/commerce/webapi/graphql-api/index.html#query-storeConfig

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Mar 25, 2025

Looking good! But the tests are failing?

Interesting, the error makes little sense for what I've changed. I'll look into it.

And this solution vs using https://developer.adobe.com/commerce/webapi/graphql/schema/store/queries/store-config/, it looks like it can return a lot of configurations: https://developer.adobe.com/commerce/webapi/graphql-api/index.html#query-storeConfig

You can't get the actual defaults from what I can see there, which is what we're looking for here.

@royduin
Copy link
Member

royduin commented Mar 25, 2025

@royduin
Copy link
Member

royduin commented Mar 25, 2025

You can't get the actual defaults from what I can see there, which is what we're looking for here.

The actual value is also fine, maybe even better. For the standalone checkout #711 it would be nice to remove the database access requirement. Plus with this we don't have to keep a list of defaults. We can do the query from the PHP side and cache the result? But not sure if we can use it for all configs?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Mar 25, 2025

But not sure if we can use it for all configs?

Just did a check, you cannot. Things you can't use it for include checking the flat table configuration, checking if backorders are enabled, seeing which customer address values we want to have on the frontend, seeing if guests can subscribe to the newsletter, and more---I didn't even check everything here. That's not even mentioning the fact that it's impossible to get a config value from extensions.

Basically, we would have to add functionality to Compadre (or a standalone Magento extension) which we don't really want to do here because then we would require that for basic Rapidez functionality.

@royduin
Copy link
Member

royduin commented Mar 25, 2025

Alrighty, todo:

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