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

Add theme_settings to stores #244

Closed
Tracked by #243
MrNaif2018 opened this issue Oct 1, 2021 · 0 comments
Closed
Tracked by #243

Add theme_settings to stores #244

MrNaif2018 opened this issue Oct 1, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@MrNaif2018
Copy link
Member

MrNaif2018 commented Oct 1, 2021

As we are going to implement theming support in BitcartCC store, see bitcart/bitcart-store#319, we need to extend the API to allow storing css url.
CSS url for the theme is just an url which will be loaded by the frontend.
Ideally in the future we will allow to host css right on the server and use a permanent link to server storage, for that #161 and file storage support should be implemented, but that's for another issue
To add theme_settings, we need a new JSON field for Store model.
https://github.com/bitcartcc/bitcart/blob/712d7ffb829cfee517ffa95c056ab37310870a85/api/models.py#L266-L270
it should be marked as json field for our validators, see how checkout_settings field is implemented and referenced for guide on how to add it
A new scheme should be added, which will only have store_theme_url and admin_theme_url variables (type str)

After that, admin panel should be updated to allow editing new field.
https://github.com/bitcartcc/bitcart-admin/blob/05350eac9daa926649aba3ab4d200b8ebdc0fa22/pages/stores.vue#L31-L41
Add it in a similar way to checkout_settings, with a new icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant