October 2017
Intermediate to advanced
370 pages
8h 57m
English
In this version (/ch8/product-config-basic.html), we're going to do away with the product carousel altogether, and we'll replace it with a single amp-img. We can do this because amp-bind allows us to bind to the src attribute of amp-img, and when we change the src, the new image will be fetched. Of course, a drawback is that the user won't be able to swipe through images.
When the user chooses a new option, a different color for example, then we'll change the image source to point to an image with the correct color, and the new image will be fetched and displayed. We'll do the same for the style of the t-shirt.
The trick here is to use amp-bind to build the URL of the image on the fly, based on the options. ...
Read now
Unlock full access