Page 1 of 1

Ecommerce base with radiobuttons

Posted: Sun Jun 15, 2014 11:20 am
by cmsmstest
Hi! How I can make attributes view as table with radiobuttons? Not as dropdownlist.

Re: Ecommerce base with radiobuttons

Posted: Sun Jun 15, 2014 9:02 pm
by velden
That is a short description of your problem.
Could you be somewhat more specific?

- Frontpage/backend
- attributes? do you mean 'options'
- do you mean options when adding to cart?
- what relevant modules + versions do you have installed?

Maybe a screenshot or link to page where you want to use it.

Thanks.

Re: Ecommerce base with radiobuttons

Posted: Mon Jun 16, 2014 2:52 pm
by cmsmstest
I have some attributes for one product with different price for different volume, now user select volume and price from dropdown list (see the screen), but I want make table with lines and radiobutton as
volume1 price1 code1 (*)
volume2 price2 code2 ()
volume3 price3 code3 ()
... etc

Re: Ecommerce base with radiobuttons

Posted: Mon Jun 16, 2014 3:18 pm
by velden
I guess it comes from AddToCart template of Cart2 module.

Code: Select all

  {* we have multiple options *}
  <select name="{$actionid}cart_options">
    {html_options options=$options}
  </select>
Have a look at the contents of the $options variable. E.g.:

Code: Select all

  {* we have multiple options *}

<!-- {$options|print_r} -->

  <select name="{$actionid}cart_options">
    {html_options options=$options}
  </select>
Have a look at the source code of the webpage and look for the options. Then you can see whether you can build your own form element. Note that the name of that element should be {$actionid}cart_options

Re: Ecommerce base with radiobuttons

Posted: Mon Jun 16, 2014 3:54 pm
by Jo Morg
This should do the trick:

Code: Select all

{html_radios name="{$actionid}cart_options" options=$options separator='<br />'}
I'm not sure if there is a selected value that you could use to have a preset, but if there is one all the better.
References: