Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Product Options other than dropdown box

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-30-2003, 09:26 PM
 
zotechpc zotechpc is offline
 

Newbie
  
Join Date: Sep 2003
Posts: 4
 

Default Product Options other than dropdown box

Is there a way to have a better way of using the product option feature such as having the format change to radio, listbox, checkbox, or textbox with adding options of color with prices and such. it currently can do listbox dropdown and textbox with options or text. anybody let me know. I would be extremly happy.

Thanks guys!
Reply With Quote
  #2  
Old 01-03-2004, 11:57 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Yeah - this is possible.

The template to change is skin1/modules/product_options/customer_options.tpl

There is html in there for the drop down box...this can be changed to a radio group html if you prefer.

Code:
{* $Id: customer_options.tpl,v 1.9 2003/11/14 11:06:33 svowl Exp $ *} {section name=product_option loop=$product_options} <tr> <td valign=middle height=25> {if $usertype eq "A"} { $product_options[product_option].optclass }: {else} { $product_options[product_option].opttext } {/if} </td> <td valign=middle> {if $product_options[product_option].options ne ""} {assign var="options" value=$product_options[product_option].options} {* <select name="{if $cname ne ""}{$cname}[{$product_options[product_option].optclass}]{else}product_options[{$product_options[product_option].optclass}]{/if}"{if $disable} disabled{/if}> {section name=option loop=$options} <option value={$smarty.section.option.index}{if $options[option].selected ne ""} selected{/if}>{$options[option].option}{if $options[option].surcharge ne 0} ({$options[option].surcharge|value_sign:"1"}{if $options[option].type eq "absolute"}{$config.General.currency_symbol}{$options[option].surcharge|abs_value}{else}{$options[option].surcharge|abs_value}%{/if}){/if}</option> {/section} </select> *} {section name=option loop=$options} <label><input type="radio" name="{if $cname ne ""}{$cname}[{$product_options[product_option].optclass}]{else}product_options[{$product_options[product_option].optclass}]{/if}" value="{$smarty.section.option.index}"{if $options[option].selected ne ""} checked{/if}"> {$options[option].option}{if $options[option].surcharge ne 0} ({$options[option].surcharge|value_sign:"1"}{if $options[option].type eq "absolute"}{$config.General.currency_symbol}{$options[option].surcharge|abs_value}{else}{$options[option].surcharge|abs_value}%{/if}){/if} </label> {/section} {else} <input type=text name="product_options[{$product_options[product_option].optclass}]" size=32> {/if} </td> </tr> {/section} {if $err eq "options" and $options_ex ne ""} <TR> <TD colspan=2><FONT class=CustomerMessage>Note: this product cannot be added to the cart with the following options combinations:</FONT></TD> </TR> <TR valign=top> <TD colspan=2> {section name=oi loop=$options_ex} * {$options_ex[oi].exception} {/section} </TD> </TR> {/if}
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:48 AM.

   

 
X-Cart forums © 2001-2020