Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Hoping someone can point me in the right direction for adding a dropdown menu to select product variations on a product page.
Using the "ecommerce module v0.8.1", as well as the "E-commerce Product Variations Colour Extension" from the SSU Demo Site, So far i've created size and color variations for an example product (screenshot below).
However, I now want to change this to a dropdown menu as in the SSU Demo Site example found here:
ie: selecting color and size rather than a cluttered list of every product variation.
Can anyone help that has already implemented this or something similar?
The VariationForm you're after was added in after 0.8.1.
Assuming you want to go with my version of the code, you could try the zip/tar downloads on this page: http://ss-shop.org/, which will become version 0.8.3 at some point.
Then all you need to do is find your Product.ss template, and remove everything between <% if Variations %> ... <% else %> (the table) , and replace with $VariationForm.
As suggested, adding $VariationForm to the Product.ss template worked straight away with v0.8.1 – gotta love it when things go that simply!
However, I had also installed the E-commerce Product Variations Colour Extension module by Nicolaas - from the demo site downloads resource at http://www.silverstripe-ecommerce.com/.
Please note: When adding $VariationForm to the Product.ss template in an ecommerce v0.8.1 setup without this module I experienced an error – adding the module then fixed this.