2012-10-04 176 views
0

我有很多麻煩使這個擴展工作與我的店。我的問題是,購物車中的最後一個產品未被刪除。或者是,但刪除產品時不會更新。我認爲這應該是刪除產品的腳本的一部分,任何人都可以告訴我是否有一種方法在刪除最後一個產品時使其「更新」?它來自AheadWorks Ajax Cart Pro。Magento ajax購物車沒有刪除購物車中的最後一個產品?

function updateDeleteLinks(){ 
var tmpLinks = document.links; 
for (i=0; i<tmpLinks.length; i++){ 
    if (tmpLinks[i].href.search('checkout/cart/delete') != -1){ 
     url = tmpLinks[i].href.replace(/\/uenc\/.+,/g, ""); 
     var del = url.match(/delete\/id\/\d+\//g); 
     var id = del[0].match(/\d+/g); 
     if (window.location.protocol == 'https:'){ 
      aw_base_url = aw_base_url.replace("http:", "https:"); 
     }  
     if(!AW_ACP.isCartPage){ 
      tmpLinks[i].href = 'javascript:ajaxcartprodelete("' + aw_base_url + 'ajaxcartpro/cart/remove/id/' + id +'")'; 
     }else{ 
      tmpLinks[i].href = 'javascript:ajaxcartprodelete("' + aw_base_url + 'ajaxcartpro/cart/remove/id/' + id +'/is_checkout/1")'; 
     } 
    } 
} 

}

回答

0

談到了這場耗時照顧的問題。此外我無法弄清楚這段代碼的作用:

else{ 
     tmpLinks[i].href = 'javascript:ajaxcartprodelete("' + aw_base_url + 'ajaxcartpro/cart/remove/id/' + id +'/is_checkout/1")'; 
    } 
相關問題