Jump to content
Sign in to follow this  
mima9506

Dodawaniem produktu z atrybutem do koszyka

Recommended Posts

Mam problem na liście produktów z danej kategorii. Potrzebuję mieć możliwość wyboru atrybutu i dodania go do koszyka. Wyświetlanie atrybutów jest bez problemowe, tylko podczas dodawania do koszyka nie jest brany pod uwagę atrybut. Przesyłam kod który używam. W załączniku przesyłam o co mi chodzi.

										<div class="col-md-8 col-sm-8 col-xs-8">
											<div class="choose-size text-left">
												{foreach from=$combinations key=k item=comb}

												    {* because the array key are id_product, we can separate the product combinations in here 
												       with if/else statement compared with the id_product from the foreach loop of products-list *}
												  
												    {if $k == $product.id_product}
														<span class="size-text" {if empty($comb)} style="display: none;"{/if}>rozmiar:</span>
														<span class="styled-select" {if empty($comb)} style="display: none;"{/if}>
															<select>
															{foreach from=$comb item=attr}
															    <option value="{$attr.id_attribute}">{$attr.attribute_name}</option>
															{/foreach}
															</select>
														</span>
												    {/if}

												{/foreach}
											</div>
										</div>

 

Zrzut ekranu z 2018-01-21 20-05-38.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More