Skip to content

Conversation

@Ubersmake
Copy link
Contributor

@Ubersmake Ubersmake commented Apr 30, 2018

What?

On a Google AMP Product Page, Options would hide Add to Cart under a very specific set of conditions. This only affected products with options.

  • If a window is too short to display either options or the button, there is no issue.
  • If a window is only long enough to display product options, the Add to Cart button will not appear.
  • If a window is tall enough to display both options and the button, there is no issue.

It seems that some CSS is targeting what was originally <div data-product-option-change style="display:none;">. When this style was removed it would cause issues if Options would "push" Add to Cart below the viewable window.

Because this code is only called if there are product options to begin with (see templates/components/amp/products/product-view, there's no need to have a style that would hide it on-load.

Tested in macOS Sierra on Chrome, Firefox 55, and Safari, and on Android Chrome with a Nokia 6.

Tickets / Documentation

@bigbot
Copy link

bigbot commented Apr 30, 2018

Autotagging @bigcommerce/storefront-team @davidchin

@Ubersmake Ubersmake merged commit 83fcce6 into bigcommerce:master Apr 30, 2018
@Ubersmake Ubersmake deleted the STRF-4840 branch April 30, 2018 21:49
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