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

Fix issue with scripts appearing next to single product buttons #2919

Closed
wants to merge 10 commits into from

Conversation

cristian-ungureanu
Copy link
Contributor

@cristian-ungureanu cristian-ungureanu commented Jun 17, 2021

Summary

  • The issue here was that we targeted all elements in that div with > *. If a plugin come and add a script there, the script tag would have display: flex;
  • Fixed an issue for grouped products. The padding of the primary button was applying on inputs for grouped products.

NOTE: @preda-bogdan also tried a fix here which was just fixing the issue for noscript and script tags. What I did is to directly target the elements that we have there.

Will affect visual aspect of the product

NO

Screenshots

https://prnt.sc/15otb1h

Test instructions

Closes #2903, Closes #2901, Closes #2915, Closes codeinwp/neve-pro-addon#1414

@github-actions
Copy link

github-actions bot commented Jun 17, 2021

Plugin build for 929e87c is ready 🛎️!

@gutoslv
Copy link
Contributor

gutoslv commented Jun 22, 2021

It looks weird within the gift card page, like here: https://vertis.d.pr/13qPRi

https://symbolic-crow.jurassic.ninja/wp-admin/
user: demo
pwd: letdDBQkPVRJ

@irinelenache
Copy link
Contributor

I saw that the issue that @gutoslv mentioned happens when the Sticky add to cart is enabled. It happens both on Gift card page and Product that has WooCommerce Product Add-Ons Ultimate https://vertis.d.pr/f3W7Hw

@cristian-ungureanu
Copy link
Contributor Author

Thanks, @gutoslv for letting me know. I made a fix in https://github.com/Codeinwp/neve-pro-addon/pull/1427. When you test this, you should have both PR's.

What I ended up doing is to disable the sticky add to cart if the product type is other than simple', 'grouped', 'external', 'variable' ( WooCommerce default types ).
The issue wasn't just the button alignment there. When you select an amount and the form appears, if the sticky bar is enabled, when you scroll down and the sticky bar appears, it looks like this https://prnt.sc/16aykdf.

This should fix what @irinelenache mentioned too.

@cristian-ungureanu
Copy link
Contributor Author

I will close this PR because the solution I provided will produce more issues in the long term. I'll make another PR with a solution that should be more suitable.

@selul selul deleted the fix/scripts-appearing branch January 30, 2023 14:45
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.

3 participants