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

JS file never included - Invalid gift card renders JSON #79

Closed
bonswouar opened this issue Jul 22, 2020 · 3 comments
Closed

JS file never included - Invalid gift card renders JSON #79

bonswouar opened this issue Jul 22, 2020 · 3 comments

Comments

@bonswouar
Copy link

Obviously a JS problem, same as #44, so I checked which JS files are loaded... And the only one, setono-sylius-gift-card-add-gift-card-to-order.js, isn't.
I checked in the vendor files, and apparently it's never included anywhere ! And surprisingly I didn't find any issue here about this.
I also tried to manually include it, but that doesn't seem to fix the problem.
I even tried to copy this block from test cart summary file (only file I found using this js here) :

    <script src="{{ asset('bundles/setonosyliusgiftcardplugin/setono-sylius-gift-card-add-gift-card-to-order.js') }}"></script>
    <script>
        $('#setono-sylius-gift-card-add-gift-card-to-order').addGiftCardToOrder();
    </script>

But again, that didn't fix the problem.

@bonswouar bonswouar changed the title Invalid gift card renders JSON JS file never included - Invalid gift card renders JSON Jul 22, 2020
@igormukhingmailcom
Copy link
Member

@bonswouar
Copy link
Author

Okay I didn't notice it was normal that the template to copy was in test directory, that's not very intuitive. Should have fully read the readme though ;)
But as I said, I did copy the javascript block from this template. It then does correctly load the JS file (yes my assets are installed), but it doesn't affect the problem.

@bonswouar
Copy link
Author

Anyway I just noticed the project is using an old version of this bundle, nevermind

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

No branches or pull requests

2 participants