Jump to content

nkarjun123

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    Nagarjuna
  • Last Name
    Guduru

Recent Profile Visitors

96 profile views

nkarjun123's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Prestashop Product List -Product Attributes : i am putting this code but not working, SIze Prices exactly not showing, just see the picture, when i am select (ex: 2kg) product price split to all products, plz help me anyone {if $product.combinations} <div class="att_list" style="display:block;"> {$elemento_da_sottrarre=$product.combinations.values|@reset} {*ottengo il primo elemento dell'array che andrò a sottrarre *} {*mi ricavo il prezzo base sottraendo dal prezzo escluse le tasse del primo prodotto meno la variazione di prezzo da combinazione*} {$prezzo_base = $product.price_tax_exc - $elemento_da_sottrarre.price} {*mi ricavo il prezzo base*} <fieldset> <label class="attribute_label">Select {$product.combinations.attribute_groups|escape:'html':'UTF-8'} </label> <select name="attribute_combination_{$product.id_product}" id="attribute_combination_{$product.id_product}" class="form-control attribute_select" ref="{$product.id_product}"> <option value="" selected="selected" title="--choose--">{l s='-- Please Select --'}</option> {foreach from=$product.combinations.values key=id_product_attribute item=combination} {* somma dei prezzi arrotondati quello base di partenza "vedi sopra" e quello della combinazione aggiunto delle tasse applicate {*convertPrice price = $combination.price + $product.price_tax_exc*} {*convertPrice price = $combination.price + $prezzo_base * (100 + $product.rate) / 100*} *} <option value="{$id_product_attribute|intval}" title="{$combination.attributes_names|escape:'html':'UTF-8'}" data-prezzoCompleto="{convertPrice price = ($combination.price + $prezzo_base) * (100 + $product.rate) / 100}"> <span id="" class="price prezzo_completo" itemprop="price" content="">{convertPrice price = ($combination.price + $prezzo_base) * (100 + $product.rate) / 100} </span> {$combination.attributes_names|escape:'html':'UTF-8'}</option> {/foreach} </select> </fieldset> </div> {/if} {* Added for attributes *} <script> $(document).ready(function(){ $('.att_list').each(function(index){ $att_list = $(this); var idCombination = $att_list.find('select.attribute_select').val(); if(idCombination != 'undefined') $att_list.next().find('a.ajax_add_to_cart_button').attr("data-id-combination", idCombination); }); $('.att_list select.attribute_select').live('change', function(){ var idCombination = $(this).val(); var text = $(this).find('option:selected').attr('title'); var prezzo = $(this).find('option:selected').attr('data-prezzoCompleto'); $('.price.product-price').html(prezzo); $(this).prev().html(text); var ref = $(this).attr('ref'); if(idCombination != 'undefined') $('.add_cart_'+ref).find('a.ajax_add_to_cart_button').attr("data-id-combination", idCombination); }); }); </script>
×
×
  • Create New...