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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

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