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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

[Solved] Drop Down Menu for Product Variations


Go to End


4 Posts   1951 Views

Avatar
SnowBoarder82

Community Member, 57 Posts

5 January 2012 at 11:49am

Hi there,

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:
http://www.silverstripe-ecommerce.com/shop/product-group-Carrot/product-group-Vanilla/product-group-Pineapple/product-group-Mango/product-Mango-13/
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?

Thank you,

Attached Files
Avatar
SnowBoarder82

Community Member, 57 Posts

7 February 2012 at 11:01am

Still waiting on a response to this - can anyone provide some insight please?

Please note: The product variation example url is no longer valid: Here is another example from the SSU Demo for what i'm wanting to do.

http://www.silverstripe-ecommerce.com/shop/product-group-Carrot/product-group-Tangerine/product-group-Jujube/product-group-Watermelon/product-Watermelon-443/

Thanks,

Avatar
Jedateach

Forum Moderator, 238 Posts

23 February 2012 at 4:01pm

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.

Avatar
SnowBoarder82

Community Member, 57 Posts

24 February 2012 at 7:49am

Thanks Jedateach,

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.

Thanks again,