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

Modified Add-to-card form and token function on homepage #443

Closed
wants to merge 2 commits into from

Conversation

sudo-do
Copy link
Contributor

@sudo-do sudo-do commented Jan 28, 2023

Questions Answers
Description? An ID has been added to the 'add-to-card' form on the homepage and the function that provides tokens in the 'product.ts' file has been modified to only affect forms with that specific ID.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #441
Sponsor company
How to test? The ability to add items to a card on the homepage, the capability to include a new address during the checkout process, and the capability to add a new address in the 'My Account' page should be present and function correctly without any errors.

@sudo-do
Copy link
Contributor Author

sudo-do commented Jan 28, 2023

The relevant functions are functioning correctly without any issues.
https://user-images.githubusercontent.com/104589134/215268782-8d9d38f8-c663-4491-bf39-f9c40c8580c8.mp4

@SharakPL
Copy link
Contributor

SharakPL commented Jan 30, 2023

We can't use ID here as this button will appear many times on products list.

Check the comment above your change. It states this has to be fixed inside core.js so please try fixing it on the main Prestashop repo.

@SharakPL SharakPL closed this Jan 30, 2023
@sudo-do
Copy link
Contributor Author

sudo-do commented Jan 30, 2023

I didn't know id must be unique thanks.

@SharakPL
Copy link
Contributor

SharakPL commented Jan 30, 2023

I didn't know id must be unique thanks.

id attribute must identify a single html element on the page. Only classes can be repeated multiple times.

@dennispw
Copy link
Contributor

Also, make sure to name it correctly: cardcart.

Misspelling this is a recipe for compatability issues where some think it's cart and some card, and the other way around if it is "corrected" in the future.

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.

Can't add new adress with hummingbird theme
3 participants