Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/order/add_cart.php |
<script>
$(window).ready( function() {
$('.plus').click( function() {
var id = $(this).attr('rel');
var amount = parseInt($('.amount_'+id).text())+10;
$('.amount_'+id).text(amount);
$.ajax({
type: "get",
url: "http://creatorlabel.it-netstudio.pl/Order/update_amount?pid="+id+"&amount="+amount
})
.done(function( data ) {
});
return false;
});
$('.minus').click( function() {
var id = $(this).attr('rel');
if( parseInt($('.amount_'+id).text()) >=20 ) {
var amount = parseInt($('.amount_'+id).text())-10;
$('.amount_'+id).text(amount);
$.ajax({
type: "get",
url: "http://creatorlabel.it-netstudio.pl/Order/update_amount?pid="+id+"&amount="+amount
})
.done(function( data ) {
});
}
return false;
});
});
</script>
<div id="page">
<div id="container">
<div id="content">
<div class="wrapper_border">
<h1><span class="nice_text pink"><span class="cart"></span> Twój koszyk </span>
<br style="clear: both;"/>
<?php if( $cart_session ) { foreach( $cart_session as $pid => $data ) {
if( !empty( $pid ) ) { $params = explode("!", $data['id'] ); ?>
<div class="item_cart">
<h3>Etykieta na butelkę <?php echo cms::bottleName($params[0]); ?></h3>
<div class="th_area">
<img class="thumb" src="uploads/items/etykiety_podglad/<?php echo str_replace("!", "/", $data['id']); ?>" alt=""/>
</div>
<span class="amount">SZTUK <b class="amount_<?php echo $pid; ?>"><?php echo $data['amount']; ?></b></span>
<span class="change_amount"> ZMIEŃ ILOŚĆ <a class="minus" rel="<?php echo $pid; ?>" href="#"></a><a class="plus" rel="<?php echo $pid; ?>" href="#"></a></span>
<a href="Order/delete_cart/<?php echo $pid; ?>" class="delete_item">USUŃ</a>
</div>
<?php }
} } ?>
<br style="clear: both;"/>
</div>
</div>
<div id="sider">
<div class="beam">Podsumowanie</div>
<p>
<?php if( $cart_session ) { $it=0; foreach( $cart_session as $pid => $data ) { $it++;
if( !empty( $pid ) ) { $params = explode("!", $data['id'] ); ?>
<?php echo $it; ?>. Etykieta na butelkę <?php echo cms::bottleName($params[0]); ?> <em>x<?php echo $data['amount']; ?></em><br/>
<?php } } } ?>
</p><br style="clear: both;"/><br style="clear: both;"/>
<a href="Order/index?action=finalize" class="big_button">Finalizuj zamówienie</a>
<a href="/" class="big_button blue">Dodaj nowy wzór</a>
</div>
<br style="clear: both;"/><br style="clear: both;"/>
</div>
</div>