Fixes #37
							parent
							
								
									0ce3a16817
								
							
						
					
					
						commit
						52828cbd40
					
				|  | @ -757,9 +757,16 @@ function updateCartDiv(){ | |||
| function getSelectedOptions(){ | ||||
|     var options = {}; | ||||
|     $('.product-opt').each(function(){ | ||||
|         options[$(this).attr('name')] = $(this).val(); | ||||
|         if($(this).attr('name') === 'opt-'){ | ||||
|             options[$(this).val().trim()] = $(this).prop('checked'); | ||||
|             return; | ||||
|         } | ||||
|         var optionValue = $(this).val().trim(); | ||||
|         if($(this).attr('type') === 'radio'){ | ||||
|             optionValue = $('input[name="' + $(this).attr('name') + '"]:checked').val(); | ||||
|         } | ||||
|         options[$(this).attr('name').substring(4, $(this).attr('name').length)] = optionValue; | ||||
|     }); | ||||
| 
 | ||||
|     return options; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -51,9 +51,9 @@ | |||
|                         ( | ||||
|                         {{#each this.options}} | ||||
|                             {{#if @last}} | ||||
|                                 {{this}} | ||||
|                                 {{@key}}: {{this}} | ||||
|                             {{else}} | ||||
|                                 {{this}} / | ||||
|                                 {{@key}}: {{this}} / | ||||
|                             {{/if}} | ||||
|                         {{/each}} | ||||
|                         ) | ||||
|  |  | |||
|  | @ -23,7 +23,14 @@ | |||
|                                 <a class="cart-link" href="/product/{{this.link}}">{{this.title}}</a> | ||||
|                             </p> | ||||
|                             <p> | ||||
|                                  {{#each this.options}} {{#if @last}} {{this}} {{else}} {{this}} / {{/if}} {{/each}} | ||||
|                                   | ||||
|                                 {{#each this.options}}  | ||||
|                                     {{#if @last}}  | ||||
|                                         {{@key}}: {{this}}  | ||||
|                                         {{else}}  | ||||
|                                         {{@key}}: {{this}} /  | ||||
|                                     {{/if}}  | ||||
|                                 {{/each}} | ||||
|                             </p> | ||||
|                             <p> | ||||
|                                 <div class="form-group"> | ||||
|  |  | |||
|  | @ -22,7 +22,14 @@ | |||
|                             <a class="cart-link" href="/product/{{this.link}}">{{this.title}}</a> | ||||
|                         </p> | ||||
|                         <p> | ||||
|                              {{#each this.options}} {{#if @last}} {{this}} {{else}} {{this}} / {{/if}} {{/each}} | ||||
|                               | ||||
|                             {{#each this.options}}  | ||||
|                                 {{#if @last}}  | ||||
|                                     {{@key}}: {{this}}  | ||||
|                                     {{else}}  | ||||
|                                     {{@key}}: {{this}} /  | ||||
|                                 {{/if}}  | ||||
|                             {{/each}} | ||||
|                         </p> | ||||
|                         <p> | ||||
|                             <div class="col s12 no-pad-left"> | ||||
|  |  | |||
|  | @ -22,7 +22,14 @@ | |||
|                             <a class="cart-link" href="/product/{{this.link}}">{{this.title}}</a> | ||||
|                         </p> | ||||
|                         <p> | ||||
|                              {{#each this.options}} {{#if @last}} {{this}} {{else}} {{this}} / {{/if}} {{/each}} | ||||
|                               | ||||
|                             {{#each this.options}}  | ||||
|                                 {{#if @last}}  | ||||
|                                     {{@key}}: {{this}}  | ||||
|                                     {{else}}  | ||||
|                                     {{@key}}: {{this}} /  | ||||
|                                 {{/if}}  | ||||
|                             {{/each}} | ||||
|                         </p> | ||||
|                         <p> | ||||
|                             <div class="col s12 no-pad-left"> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue