mirac
OpenCart-TR
- Katılım
- 7 Şub 2010
- Mesajlar
- 1,383
- Tepkime puanı
- 0
- Puanları
- 36
- Yaş
- 43
- Konum
- Beykoz____
- Web sitesi
- www.notebook-cantasi.com
catalog\view\theme\default\template\common\header.tpl Aç..
Alttaki kodu gözükmesini istediğin yere ekle..
catalog\controller\common\header.php Aç..
Bul..
Altına Ekle..
Bul..
Altına Ekle..
catalog\language\english\common\header.php
Ekle..
catalog\language\turkish\common\header.php
Ekle..
Örnek
(1) Adet Ürün: 165.20TL
Alttaki kodu gözükmesini istediğin yere ekle..
Kod:
<?php if ($products) { ?>
<a href="index.php?route=checkout/cart" alt="Item(s)">(<?php echo $this->cart->countProducts(); ?>) <?php echo $text_shoppingbag; ?></a>
<?php
$count=count($totals);
$cartinfo = $totals[$count-1]['text'];
echo $cartinfo;
?>
<?php } else { ?>
<a href="index.php?route=checkout/cart" alt="Item(s)">(<?php echo $this->cart->countProducts(); ?>) <?php echo $text_shoppingbag; ?></a>
<?php
foreach ($totals as $total) {
if ($total['title'] != 'Sub-Total:') {
echo $total['text'];
}
}
} ?>
catalog\controller\common\header.php Aç..
Bul..
Kod:
class ControllerCommonHeader extends Controller {
protected function index() {
Altına Ekle..
Kod:
$this->data['products'] = array();
foreach ($this->cart->getProducts() as $result) {
$option_data = array();
foreach ($result['option'] as $option) {
$option_data[] = array(
'name' => $option['name'],
'value' => $option['value']
);
}
$this->data['products'][] = array(
'key' => $result['key'],
'name' => $result['name'],
'option' => $option_data,
'quantity' => $result['quantity'],
'stock' => $result['stock'],
'price' => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))),
'href' => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']),
);
}
$total_data = array();
$total = 0;
$taxes = $this->cart->getTaxes();
$this->load->model('checkout/extension');
$sort_order = array();
$results = $this->model_checkout_extension->getExtensions('total');
foreach ($results as $key => $value) {
$sort_order[$key] = $this->config->get($value['key'] . '_sort_order');
}
array_multisort($sort_order, SORT_ASC, $results);
foreach ($results as $result) {
$this->load->model('total/' . $result['key']);
$this->{'model_total_' . $result['key']}->getTotal($total_data, $total, $taxes);
}
$sort_order = array();
foreach ($total_data as $key => $value) {
$sort_order[$key] = $value['sort_order'];
}
array_multisort($sort_order, SORT_ASC, $total_data);
$this->data['totals'] = $total_data;
if (isset($this->session->data['coupon'])) {
$this->load->model('checkout/coupon');
$coupon = $this->model_checkout_coupon->getCoupon($this->session->data['coupon']);
if ($coupon) {
$data['coupon_id'] = $coupon['coupon_id'];
} else {
$data['coupon_id'] = 0;
}
} else {
$data['coupon_id'] = 0;
}
$this->data['ajax'] = $this->config->get('cart_ajax');
$this->id = 'cart';
Bul..
Kod:
$this->data['text_advanced'] = $this->language->get('text_advanced');
Altına Ekle..
Kod:
$this->data['text_shoppingbag'] = $this->language->get('text_shoppingbag');
catalog\language\english\common\header.php
Ekle..
Kod:
$_['text_shoppingbag'] = 'Item(s):';
catalog\language\turkish\common\header.php
Ekle..
Kod:
$_['text_shoppingbag'] = 'Adet Ürün:';
Örnek
(1) Adet Ürün: 165.20TL