msain1536
şeklinde yapmak sence daha basit değilmi zaten css içerisinden bu şekilde çağırıyorsun
Ana Sayfa
şeklinde yapmak sence daha basit değilmi zaten css içerisinden bu şekilde çağırıyorsun
HTML içerisinde fonksiyon bunun gibi olduğundan nasıl yapacağımı bilemedim;
{{ getShoppingCartHtml() }}
<script>
jQuery(document).ready(function(){additionalCartUpdate();});
function additionalCartUpdate()
{
jQuery('#iCartListItemContainer').html('');ideacart1.products.each(function(item){var cartProducts = item;var cartObject = cartProducts[1];var cartPicture = cartId;/* Object Items */var cartAmount = parseFloat(cartProducts.value.amount);var cartBrandId = cartObject["brandId"];var cartBt = cartObject["bt"];var cartCategoryId = cartObject["categoryId"];var cartCurr = cartObject["curr"];var cartExt = cartObject["ext"];var cartId = cartObject["pid"];var cartPrice = cartObject["price"];var cartProductName = cartObject["product"];var cartProductNameFull = cartObject["product"];var cartRebate = cartObject["rebate"];var cartRebateType = cartObject["rebateType"];var cartRootProduct = cartObject["rootProduct"];var cartStockTypeLabel = cartObject["stockTypeLabel"];var cartTax = cartObject["tax"];/* General Price Control */var cartUpdatePrice = parseFloat(cartPrice);/* Rebate Control */if (cartRebate != 0) {if (cartRebateType == 0) { cartUpdatePrice = cartRebate;} else {cartUpdatePrice = cartPrice * (100 - cartRebate) / 100}}/* Tax Control */cartUpdatePrice = cartUpdatePrice * (100 + cartTax) / 100;/* Item Total Amount */cartUpdatePrice = cartUpdatePrice * cartAmount;/* Add 3 Dots */var cartTruncate = true; // Urun adi kisaltma (true / false)
var ideaCloneScript = jQuery("head script:contains('ideacurr1')").html();
if(cartObject['curr'] == 'GR'){var grConvertPrice = cartUpdatePrice * ideaCloneScript.split('GR_')[1].replace('");','');cartUpdatePrice = grConvertPrice;cartCurr = 'TL';}
if(cartObject['curr'] == 'USD'){var grConvertPrice = cartUpdatePrice * ideaCloneScript.split('USD_')[1].split('-EUR')[0];cartUpdatePrice = grConvertPrice;cartCurr = 'TL';}
if(cartObject['curr'] == 'EUR'){var grConvertPrice = cartUpdatePrice * ideaCloneScript.split('EUR_')[1].split('-GBP')[0];cartUpdatePrice = grConvertPrice;cartCurr = 'TL';}
/* Urun adi kisaltilacaksa kac karakter olacak ?*/
var cartTruncateLimit = 48;
if(cartTruncate == true) {function add3Dots(string, limit) {var dots = "...";if(string.length > limit) {cartProductName = string.substring(0,limit) + dots;}}add3Dots(cartProductName,cartTruncateLimit);}if(cartRootProduct != 0){cartPicture = cartRootProduct;}else{cartPicture = cartId;}
var _cartItemTemplatePicture = '';
var _cartItemTemplateRemoveLink = '';
var _cartItemTemplateTitle = ''+cartProductName+'';
var _cartItemTemplateUnit = ''+cartAmount+' Adet';
var _cartItemTemplatePriceInformation = ''+cartUpdatePrice.toFixed(2)+' '+cartCurr+'';
/* Creating a Cart Items */
jQuery('#iCartListItemContainer').append(' \
\
\
'+ _cartItemTemplateRemoveLink +' \
\
\
'+ _cartItemTemplateTitle +' \
\
\
\
Adet : '+_cartItemTemplateUnit +' \
\
\
Tutar : '+ _cartItemTemplatePriceInformation +' \
\
\
\
');
});
/* Empty Cart Control */
if(ideacart1.productCount == 0){jQuery('#iCartEmptyContainer').html('Alışveriş sepetinizde ürün bulunmamaktadır.');}else{jQuery('#iCartEmptyContainer').html('');}
/* Cart Total Amount */
jQuery('.iCartPriceTotalAmount').html('TOPLAM TUTAR : '+totalAmount.toFixed(2)+' '+ideacurr1.DefaultCurr+'');
jQuery('.iCartPriceTotal').html(''+totalAmount.toFixed(2)+' '+ideacurr1.DefaultCurr+'');
/* Image Control */
jQuery('.iCartListItem img').error(function(){jQuery(this).attr('src','/images/nopic_product.jpg');});
}
/* Cart Item Remove Function */ function IdeaCartNewDeleteProduct(itemId){ideacart1.CompleteRemoveFromCart(itemId);SaveCart(escape(ideacart1.products.inspect()),'type=r,method=post');ideacart1.ReloadCart();if(typeof additionalCartUpdate!="undefined"){additionalCartUpdate();}document.location.reload(true);}
</script>