2012-11-09 47 views
3

當我選擇不同的修飾符選項時,我似乎無法讓商店動態更新產品的價格。更改修飾符似乎沒有更新價格

我已經將商店放入沙箱環境中,只有一個產品具有1個修飾符:大小。有2種大小。大的價格相差10美元。

當我將產品添加到購物車時,價格差異會受到尊重,但是我需要在實際選項被添加到購物車之前選擇實際選項時動態更改價格差異。

我沒有我自己的自定義模板只使用提供的示例之一,問題仍在發生。

代碼:

<div class="control-group"> 
<label class="control-label">Price</label> 
<div class="controls"> 
    {if on_sale} 
    <del>{regular_price}</del><br /> 
    {price} 
    <span class="label label-success">Save {you_save} ({you_save_percent}%)</span> 
    {if:else} 
    {regular_price} 
    {/if} 
</div> 
</div> 

{modifiers} 

<div class="control-group"> 
    <label class="control-label" for="{modifier_input_name}">{modifier_name}</label> 
    <div class="controls"> 
    {if modifier_type == 'var' OR modifier_type == 'var_single_sku'} 
     <select id="{modifier_input_name}" name="{modifier_input_name}"> 
     {modifier_options} 
      <option value="{option_id}"> 
      {option_name} {if price_mod_val} ({price_mod}) {/if} 
      </option> 
     {/modifier_options} 
     </select> 
    {if:else} 
     <input type="text" id="{modifier_input_name}" name="{modifier_input_name}" value="" /> 
    {/if} 
    <p class="help-block">{modifier_instructions}</p> 
    </div> 
</div> 

{/modifiers} 

EECMS版本:1.5.2 商店:1.6.1 PHP:5.3.6 Environement:在OSX

任何幫助甲基苯丙胺會衷心感謝,因爲這是十分緊急。

乾杯 丹

+0

只是一個說明我在瀏覽器檢查器中使用Chrome和Safari都沒有發現錯誤。網站正在加載JQuery 1.7.2就好了。 – since1976

回答

3

動態產品變量是基於CSS類,它告訴內置的JavaScript在那裏及時更新價格。

https://exp-resso.com/docs/store/tags/product.html#dynamic-product-variables

得到它的工作,只是換你的價格在<span>元素,像這樣:

<span class="store_product_price">{price}</span> 

還要注意有在1.6.0導致了這一現象在某些突破的錯誤情況(雖然你提到你正在運行1.6.1,所以這不應該是一個問題)。