All Products - Tüm Ürünler

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
1d5vt.jpg


Sitenizdeki tüm ürünleri tek seferde göstermenizi sağlar.

Dosyaları sitenize yükleyin

catalog\view\theme\default\template\common\header.tpl dosyasında

Bul
Kod:
<div class="div3">

Sonrasına ekle
Kod:
<a href="<?php @$this->language->load('product/all'); echo $this->url->http('product/all'); ?>" style="background-image: url('catalog/view/theme/default/image/brands.png');"><?php echo $this->language->get('text_all_products'); //Q: AllProducts ?></a>

OC 1.4.8/b - 1.4.9/1 İNDİR
OC 1.4.0 İNDİR

Bu sayfaya Sepete Ekle Butonu Ekleme
debreli' Alıntı:
catalog/controller/product/all.php dosyasını aşağıdaki kod ile değiştirin.
Kod:
<?php 
class ControllerProductAll extends Controller { 	
	public function index() { 
    	$this->language->load('product/all');
	  	  
    	$this->document->title = $this->language->get('heading_title');

		$this->document->breadcrumbs = array();

   		$this->document->breadcrumbs[] = array(
       		'href'      => (HTTP_SERVER . 'index.php?route=common/home'),
       		'text'      => $this->language->get('text_home'),
      		'separator' => FALSE
   		);

		$url = '';
		
		if (isset($this->request->get['sort'])) {
			$url .= '&sort=' . $this->request->get['sort'];
		}	

		if (isset($this->request->get['order'])) {
			$url .= '&order=' . $this->request->get['order'];
		}
				
		if (isset($this->request->get['page'])) {
			$url .= '&page=' . $this->request->get['page'];
		}	
			
   		$this->document->breadcrumbs[] = array(
       		'href'      => (HTTP_SERVER . 'index.php?route=product/all' . $url),
       		'text'      => $this->language->get('heading_title'),
      		'separator' => $this->language->get('text_separator')
   		);
		
    	$this->data['heading_title'] = $this->language->get('heading_title');
   
		$this->data['text_sort'] = $this->language->get('text_sort');
		$this->data['text_limit'] = $this->language->get('text_limit');
			 
  		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
		}

		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'pd.name';
		}

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		}
		
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = '100';
		}
	
		$this->load->model('catalog/product');
			
		$product_total = $this->getTotalProducts();
						
		if ($product_total) {
			$url = '';
				
			$this->load->model('catalog/review');
			$this->load->model('tool/seo_url');
			
			if (file_exists(DIR_APPLICATION . 'model/tool/image.php')) {
				$this->load->model('tool/image'); // v1.4.4
			} else {
				$this->load->helper('image'); // pre-v1.4.4
			}
				$this->data['button_add_to_cart'] = $this->language->get('button_add_to_cart');
       		$this->data['products'] = array();
				
			$results = $this->getAllProducts($sort, $order, ($page - 1) * $limit, $limit);
        		
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $result['image'];
				} else {
					$image = 'no_image.jpg';
				}						
					
				$rating = $this->model_catalog_review->getAverageRating($result['product_id']);	
				
				$special = $this->model_catalog_product->getProductSpecial($result['product_id']);
			
				if ($special) {
					$special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = FALSE;
				}
				$options = $this->model_catalog_product->getProductOptions($result['product_id']);
					
				if ($options) {
					$add = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']);
				} else {
					$add = HTTPS_SERVER . 'index.php?route=checkout/cart&product_id=' . $result['product_id'];
				}		
				$this->data['products'][] = array(
           			'name'    => $result['name'],
					'model'   => $result['model'],
					'rating'  => $rating,
					'stars'   => sprintf($this->language->get('text_stars'), $rating),
           			//'thumb'   => (class_exists('HelperImage')) ? HelperImage::resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
					'thumb'   => (class_exists('HelperImage')) ? HelperImage::resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : (class_exists('ModelToolImage')) ? $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
           			'price'   => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))),
					'special' => $special,
					'add'	  => $add,
					'href'    => $this->model_tool_seo_url->rewrite((HTTP_SERVER . 'index.php?route=product/product' . $url . '&product_id=' . $result['product_id']))
					
       			);
        	}
				
			$url = '';
				
			$this->data['sorts'] = array();
				
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=pd.name')
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=pd.name&order=DESC')
			);  

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=p.price&order=ASC')
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=p.price&order=DESC')
			); 
				
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_desc'),
				'value' => 'rating-DESC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=rating&order=DESC')
			); 
				
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_asc'),
				'value' => 'rating-ASC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=rating&order=ASC')
			);
			
			$this->data['limits'] = array();
				
			$this->data['limits'][] = array(
				'text'  => '10',
				'value' => '10',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=10')
			);
			
			$this->data['limits'][] = array(
				'text'  => '25',
				'value' => '25',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=25')
			);
			
			$this->data['limits'][] = array(
				'text'  => '50',
				'value' => '50',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=50')
			);
			
			$this->data['limits'][] = array(
				'text'  => '100',
				'value' => '100',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=100')
			);
				
			$url = '';

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
			
			if (isset($this->request->get['page']) && $product_total < $limit) {
				$url .= '&page=' . $this->request->get['page'];
			}
			
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = ($product_total < (isset($this->request->get['limit'])) ? '1' : $page);
			$pagination->limit = (isset($this->request->get['limit'])) ? $this->request->get['limit'] : 100; 
			$pagination->text = $this->language->get('text_pagination');
			if (class_exists('ModelToolImage')) {
				$pagination->url = (HTTP_SERVER . 'index.php?route=product/all' . $url . '&page={page}');
			} else {
				$pagination->url = (HTTP_SERVER . 'index.php?route=product/all' . $url . '&page=%s');
			}
				
			$this->data['pagination'] = $pagination->render();
				
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
			
			$this->id       = 'content';

			//Q: pre-1.3.3 Backwards compatibility check
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/all.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/all.tpl';
			} elseif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'product/all.tpl')) { //v1.3.2
				$this->template = $this->config->get('config_template') . 'product/all.tpl';
			} else {
				$this->template = 'default/template/product/all.tpl';
			}

			if ($this->config->get('config_guest_checkout') != null) {
				$this->children = array(
					'common/header',
					'common/column_left',
					'common/column_right',
					'common/footer'
				);
				$this->response->setOutput($this->render(TRUE));
			} else {
				$this->layout   = 'common/layout';
				$this->render();
			}
		} else {
      		$this->data['text_error'] = $this->language->get('text_empty');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = (HTTP_SERVER . 'index.php?route=common/home');
	  			
			$this->id       = 'content';
			//$this->template = $this->config->get('config_template') . 'error/not_found.tpl';
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} elseif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'error/not_found.tpl')) { //v1.3.2
				$this->template = $this->config->get('config_template') . 'error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			if ($this->config->get('config_guest_checkout') != null) {
				$this->children = array(
					'common/header',
					'common/column_left',
					'common/column_right',
					'common/footer'
				);
				$this->response->setOutput($this->render(TRUE));
			} else {
				$this->layout   = 'common/layout';
				$this->render();
			}
		}
  	}
  	
  	public function getTotalProducts() {
		$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "product WHERE status = '1' AND date_available <= NOW()");
		
		return $query->row['total'];
	}
  	
  	private function getAllProducts($sort = 'pd.name', $order = 'ASC', $start = 0, $limit = 20) {
		$sql = "SELECT *, pd.name AS name, p.image, m.name AS manufacturer, ss.name AS stock, (SELECT AVG(r.rating) FROM " . DB_PREFIX . "review r WHERE p.product_id = r.product_id GROUP BY r.product_id) AS rating FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "manufacturer m ON (p.manufacturer_id = m.manufacturer_id) LEFT JOIN " . DB_PREFIX . "stock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.status = '1' AND p.date_available <= NOW() AND pd.language_id = '" . (int)((method_exists($this->language, 'getId')) ? (int)$this->language->getId() : (int)$this->config->get('config_language_id')) . "' AND ss.language_id = '" . (int)((method_exists($this->language, 'getId')) ? (int)$this->language->getId() : (int)$this->config->get('config_language_id')) . "'";

		$sort_data = array(
			'pd.name',
			'p.price',
			'rating'
		);	
			
		if (in_array($sort, $sort_data)) {
			$sql .= " ORDER BY " . $sort;
		} else {
			$sql .= " ORDER BY pd.name";	
		}
			
		if ($order == 'DESC') {
			$sql .= " DESC";
		} else {
			$sql .= " ASC";
		}
			
		$sql .= " LIMIT " . (int)$start . "," . (int)$limit;
		
		$query = $this->db->query($sql);
		
		//Q: Restricted Categories support
		if (method_exists($this->model_catalog_product, 'removeRestricted')) {
			$query = $this->model_catalog_product->removeRestricted($query);
			if (empty($query->rows)) { $query->row = array(); }
		}
		//
		
		return $query->rows;
	} 
}
?>

cataog/view/theme/default/templete/product/all.tpl dosyasınıda aşağıdaki ile değiştirin

Kod:
<?php echo (isset($header)) ? $header : '' ?>
<?php echo (isset($column_left)) ? $column_left : '' ?>
<?php echo (isset($column_right)) ? $column_right : '' ?>
<style type="text/css">
/* page limit */
.limit {
    float: left;
    margin-bottom: 10px;
    background: #F8F8F8;
    height: 30px;
    width: 50%;
}
.limit .div1 {
    float: left;
    margin-left: 5px;
    padding-top: 7px;
    padding-left: 3px;
}
.limit .div2 {
    float: left;
    text-align: left;
    padding-top: 7px;
    padding-left: 7px;
}
.limit select {
    font-size: 11px;
    margin: 0;
    padding: 0;
}
.sort {
    float:right;
    width: 50%;
}
.sort .div1 {
    padding-top: 7px;
}
.sort .div2 {
    padding-top: 7px;
}
.list{
    border-bottom:1px solid #000000;
}
</style>
<?php echo (isset($header)) ? '<div id="content">' : '' ?>
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
<div class="middle">
  <div class="limit">
    <div class="div2"><?php echo $text_limit; ?></div>
    <div class="div1">
      <select name="limit" onchange="location=this.value">
        <?php foreach ($limits as $l) { ?>
        <?php if (($limit) == $l['value']) { ?>
        <option value="<?php echo $l['href']; ?>" selected="selected"><?php echo $l['text']; ?></option>
        <?php } else { ?>
        <option value="<?php echo $l['href']; ?>"><?php echo $l['text']; ?></option>
        <?php } ?>
        <?php } ?>
      </select>
    </div>
  </div>
  <div class="sort">
    <div class="div1">
      <select name="sort" onchange="location=this.value">
        <?php foreach ($sorts as $sorts) { ?>
        <?php if (($sort . '-' . $order) == $sorts['value']) { ?>
        <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
        <?php } else { ?>
        <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
        <?php } ?>
        <?php } ?>
      </select>
    </div>
    <div class="div2"><?php echo $text_sort; ?></div>
  </div>
  <div>&nbsp;</div>
  <table class="list">
    <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
    <tr>
      <?php for ($j = $i; $j < ($i + 3); $j++) { ?>
      <td width="25%"class="thumb" onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'"><?php if (isset($products[$j])) { ?>
        <a href="<?php echo $products[$j]['href']; ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><br />
        <a href="<?php echo $products[$j]['href']; ?>"><?php echo $products[$j]['name']; ?></a><br />
        <span style="color: #999; font-size: 11px;"><?php echo $products[$j]['model']; ?></span><br />
        <?php if (!$products[$j]['special']) { ?>
        <span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span><br />
        <?php } else { ?>
        <span style="color: #900; font-weight: bold; text-decoration: line-through;"><?php echo $products[$j]['price']; ?></span> <span style="color: #F00;"><?php echo $products[$j]['special']; ?></span>
        <?php } ?>
        <?php if ($products[$j]['rating']) { ?>
        <img src="catalog/view/theme/default/image/stars_<?php echo $products[$j]['rating'] . '.png'; ?>" alt="<?php echo $products[$j]['stars']; ?>" />
        <?php } ?><br><a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><image src="catalog/view/theme/default/image/urun_incele.gif"></a>   <a href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" ><image src="catalog/view/theme/default/image/urun_hizli.gif"></a>
        <?php } ?></td>
      <?php } ?>
    </tr>
    <?php } ?>
  </table>
  <div class="pagination"><?php echo $pagination; ?></div>
</div>
<div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
<?php echo (isset($header)) ? '</div>' : '' ?>
<?php echo (isset($footer)) ? $footer : '' ?>

gifleri kendiniz ayarlarsınız. tpl dosyasında aratın "urun_incele.gif""urun_hizli.gif"
kendi giflerinizle değiştirin
 

Ekli dosyalar

  • AllProducts_OCv140.1.zip
    6.9 KB · Görüntüleme: 324
  • AllProducts_OCv148.1.zip
    6.5 KB · Görüntüleme: 322

identity

OpenCart-TR
Katılım
8 Ağu 2010
Mesajlar
27
Tepkime puanı
0
Puanları
0
tüm ürünler modülünü opencart ın son sürümüne kurdum ama çalışmadı link uyumsuzlugu var heralde , direk linkten sayfaya ulaşmak istedigimde ?route=product/all şeklinde sayfa bembeyaz oluyor ayarlardan hataları göster açık ama bir hata göremedim bunu nasıl düzeltebiliriz son sürümde kullanan var mı?
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
1.4.0 için hazırlana bir modülü yüklediğiniz o şekilde bir hata almanız normaldir.
İlk mesaj yeni sürüm ile uyumlu olanı ekledim. Tekrar indiriniz.
 

debreli

OpenCart-TR
Katılım
31 Ağu 2010
Mesajlar
196
Tepkime puanı
0
Puanları
0
Web sitesi
vakifshop.com
All Products - Tüm Ürünler İncele ve sepete ekle butonu

catalog/controller/product/all.php dosyasını aşağıdaki kod ile değiştirin.
Kod:
<?php 
class ControllerProductAll extends Controller { 	
	public function index() { 
    	$this->language->load('product/all');
	  	  
    	$this->document->title = $this->language->get('heading_title');

		$this->document->breadcrumbs = array();

   		$this->document->breadcrumbs[] = array(
       		'href'      => (HTTP_SERVER . 'index.php?route=common/home'),
       		'text'      => $this->language->get('text_home'),
      		'separator' => FALSE
   		);

		$url = '';
		
		if (isset($this->request->get['sort'])) {
			$url .= '&sort=' . $this->request->get['sort'];
		}	

		if (isset($this->request->get['order'])) {
			$url .= '&order=' . $this->request->get['order'];
		}
				
		if (isset($this->request->get['page'])) {
			$url .= '&page=' . $this->request->get['page'];
		}	
			
   		$this->document->breadcrumbs[] = array(
       		'href'      => (HTTP_SERVER . 'index.php?route=product/all' . $url),
       		'text'      => $this->language->get('heading_title'),
      		'separator' => $this->language->get('text_separator')
   		);
		
    	$this->data['heading_title'] = $this->language->get('heading_title');
   
		$this->data['text_sort'] = $this->language->get('text_sort');
		$this->data['text_limit'] = $this->language->get('text_limit');
			 
  		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
		}

		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'pd.name';
		}

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		}
		
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = '100';
		}
	
		$this->load->model('catalog/product');
			
		$product_total = $this->getTotalProducts();
						
		if ($product_total) {
			$url = '';
				
			$this->load->model('catalog/review');
			$this->load->model('tool/seo_url');
			
			if (file_exists(DIR_APPLICATION . 'model/tool/image.php')) {
				$this->load->model('tool/image'); // v1.4.4
			} else {
				$this->load->helper('image'); // pre-v1.4.4
			}
				$this->data['button_add_to_cart'] = $this->language->get('button_add_to_cart');
       		$this->data['products'] = array();
				
			$results = $this->getAllProducts($sort, $order, ($page - 1) * $limit, $limit);
        		
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $result['image'];
				} else {
					$image = 'no_image.jpg';
				}						
					
				$rating = $this->model_catalog_review->getAverageRating($result['product_id']);	
				
				$special = $this->model_catalog_product->getProductSpecial($result['product_id']);
			
				if ($special) {
					$special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = FALSE;
				}
				$options = $this->model_catalog_product->getProductOptions($result['product_id']);
					
				if ($options) {
					$add = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']);
				} else {
					$add = HTTPS_SERVER . 'index.php?route=checkout/cart&product_id=' . $result['product_id'];
				}		
				$this->data['products'][] = array(
           			'name'    => $result['name'],
					'model'   => $result['model'],
					'rating'  => $rating,
					'stars'   => sprintf($this->language->get('text_stars'), $rating),
           			//'thumb'   => (class_exists('HelperImage')) ? HelperImage::resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
					'thumb'   => (class_exists('HelperImage')) ? HelperImage::resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : (class_exists('ModelToolImage')) ? $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : image_resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
           			'price'   => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))),
					'special' => $special,
					'add'	  => $add,
					'href'    => $this->model_tool_seo_url->rewrite((HTTP_SERVER . 'index.php?route=product/product' . $url . '&product_id=' . $result['product_id']))
					
       			);
        	}
				
			$url = '';
				
			$this->data['sorts'] = array();
				
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=pd.name')
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=pd.name&order=DESC')
			);  

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=p.price&order=ASC')
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=p.price&order=DESC')
			); 
				
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_desc'),
				'value' => 'rating-DESC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=rating&order=DESC')
			); 
				
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_asc'),
				'value' => 'rating-ASC',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&sort=rating&order=ASC')
			);
			
			$this->data['limits'] = array();
				
			$this->data['limits'][] = array(
				'text'  => '10',
				'value' => '10',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=10')
			);
			
			$this->data['limits'][] = array(
				'text'  => '25',
				'value' => '25',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=25')
			);
			
			$this->data['limits'][] = array(
				'text'  => '50',
				'value' => '50',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=50')
			);
			
			$this->data['limits'][] = array(
				'text'  => '100',
				'value' => '100',
				'href'  => (HTTP_SERVER . 'index.php?route=product/all' . $url . '&limit=100')
			);
				
			$url = '';

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
			
			if (isset($this->request->get['page']) && $product_total < $limit) {
				$url .= '&page=' . $this->request->get['page'];
			}
			
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = ($product_total < (isset($this->request->get['limit'])) ? '1' : $page);
			$pagination->limit = (isset($this->request->get['limit'])) ? $this->request->get['limit'] : 100; 
			$pagination->text = $this->language->get('text_pagination');
			if (class_exists('ModelToolImage')) {
				$pagination->url = (HTTP_SERVER . 'index.php?route=product/all' . $url . '&page={page}');
			} else {
				$pagination->url = (HTTP_SERVER . 'index.php?route=product/all' . $url . '&page=%s');
			}
				
			$this->data['pagination'] = $pagination->render();
				
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
			
			$this->id       = 'content';

			//Q: pre-1.3.3 Backwards compatibility check
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/all.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/all.tpl';
			} elseif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'product/all.tpl')) { //v1.3.2
				$this->template = $this->config->get('config_template') . 'product/all.tpl';
			} else {
				$this->template = 'default/template/product/all.tpl';
			}

			if ($this->config->get('config_guest_checkout') != null) {
				$this->children = array(
					'common/header',
					'common/column_left',
					'common/column_right',
					'common/footer'
				);
				$this->response->setOutput($this->render(TRUE));
			} else {
				$this->layout   = 'common/layout';
				$this->render();
			}
		} else {
      		$this->data['text_error'] = $this->language->get('text_empty');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = (HTTP_SERVER . 'index.php?route=common/home');
	  			
			$this->id       = 'content';
			//$this->template = $this->config->get('config_template') . 'error/not_found.tpl';
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} elseif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . 'error/not_found.tpl')) { //v1.3.2
				$this->template = $this->config->get('config_template') . 'error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			if ($this->config->get('config_guest_checkout') != null) {
				$this->children = array(
					'common/header',
					'common/column_left',
					'common/column_right',
					'common/footer'
				);
				$this->response->setOutput($this->render(TRUE));
			} else {
				$this->layout   = 'common/layout';
				$this->render();
			}
		}
  	}
  	
  	public function getTotalProducts() {
		$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "product WHERE status = '1' AND date_available <= NOW()");
		
		return $query->row['total'];
	}
  	
  	private function getAllProducts($sort = 'pd.name', $order = 'ASC', $start = 0, $limit = 20) {
		$sql = "SELECT *, pd.name AS name, p.image, m.name AS manufacturer, ss.name AS stock, (SELECT AVG(r.rating) FROM " . DB_PREFIX . "review r WHERE p.product_id = r.product_id GROUP BY r.product_id) AS rating FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "manufacturer m ON (p.manufacturer_id = m.manufacturer_id) LEFT JOIN " . DB_PREFIX . "stock_status ss ON (p.stock_status_id = ss.stock_status_id) WHERE p.status = '1' AND p.date_available <= NOW() AND pd.language_id = '" . (int)((method_exists($this->language, 'getId')) ? (int)$this->language->getId() : (int)$this->config->get('config_language_id')) . "' AND ss.language_id = '" . (int)((method_exists($this->language, 'getId')) ? (int)$this->language->getId() : (int)$this->config->get('config_language_id')) . "'";

		$sort_data = array(
			'pd.name',
			'p.price',
			'rating'
		);	
			
		if (in_array($sort, $sort_data)) {
			$sql .= " ORDER BY " . $sort;
		} else {
			$sql .= " ORDER BY pd.name";	
		}
			
		if ($order == 'DESC') {
			$sql .= " DESC";
		} else {
			$sql .= " ASC";
		}
			
		$sql .= " LIMIT " . (int)$start . "," . (int)$limit;
		
		$query = $this->db->query($sql);
		
		//Q: Restricted Categories support
		if (method_exists($this->model_catalog_product, 'removeRestricted')) {
			$query = $this->model_catalog_product->removeRestricted($query);
			if (empty($query->rows)) { $query->row = array(); }
		}
		//
		
		return $query->rows;
	} 
}
?>

cataog/view/theme/default/templete/product/all.tpl dosyasınıda aşağıdaki ile değiştirin

Kod:
<?php echo (isset($header)) ? $header : '' ?>
<?php echo (isset($column_left)) ? $column_left : '' ?>
<?php echo (isset($column_right)) ? $column_right : '' ?>
<style type="text/css">
/* page limit */
.limit {
    float: left;
    margin-bottom: 10px;
    background: #F8F8F8;
    height: 30px;
    width: 50%;
}
.limit .div1 {
    float: left;
    margin-left: 5px;
    padding-top: 7px;
    padding-left: 3px;
}
.limit .div2 {
    float: left;
    text-align: left;
    padding-top: 7px;
    padding-left: 7px;
}
.limit select {
    font-size: 11px;
    margin: 0;
    padding: 0;
}
.sort {
    float:right;
    width: 50%;
}
.sort .div1 {
    padding-top: 7px;
}
.sort .div2 {
    padding-top: 7px;
}
.list{
    border-bottom:1px solid #000000;
}
</style>
<?php echo (isset($header)) ? '<div id="content">' : '' ?>
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
<div class="middle">
  <div class="limit">
    <div class="div2"><?php echo $text_limit; ?></div>
    <div class="div1">
      <select name="limit" onchange="location=this.value">
        <?php foreach ($limits as $l) { ?>
        <?php if (($limit) == $l['value']) { ?>
        <option value="<?php echo $l['href']; ?>" selected="selected"><?php echo $l['text']; ?></option>
        <?php } else { ?>
        <option value="<?php echo $l['href']; ?>"><?php echo $l['text']; ?></option>
        <?php } ?>
        <?php } ?>
      </select>
    </div>
  </div>
  <div class="sort">
    <div class="div1">
      <select name="sort" onchange="location=this.value">
        <?php foreach ($sorts as $sorts) { ?>
        <?php if (($sort . '-' . $order) == $sorts['value']) { ?>
        <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
        <?php } else { ?>
        <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
        <?php } ?>
        <?php } ?>
      </select>
    </div>
    <div class="div2"><?php echo $text_sort; ?></div>
  </div>
  <div>&nbsp;</div>
  <table class="list">
    <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
    <tr>
      <?php for ($j = $i; $j < ($i + 3); $j++) { ?>
      <td width="25%"class="thumb" onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'"><?php if (isset($products[$j])) { ?>
        <a href="<?php echo $products[$j]['href']; ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><br />
        <a href="<?php echo $products[$j]['href']; ?>"><?php echo $products[$j]['name']; ?></a><br />
        <span style="color: #999; font-size: 11px;"><?php echo $products[$j]['model']; ?></span><br />
        <?php if (!$products[$j]['special']) { ?>
        <span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span><br />
        <?php } else { ?>
        <span style="color: #900; font-weight: bold; text-decoration: line-through;"><?php echo $products[$j]['price']; ?></span> <span style="color: #F00;"><?php echo $products[$j]['special']; ?></span>
        <?php } ?>
        <?php if ($products[$j]['rating']) { ?>
        <img src="catalog/view/theme/default/image/stars_<?php echo $products[$j]['rating'] . '.png'; ?>" alt="<?php echo $products[$j]['stars']; ?>" />
        <?php } ?><br><a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><image src="catalog/view/theme/default/image/urun_incele.gif"></a>   <a href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" ><image src="catalog/view/theme/default/image/urun_hizli.gif"></a>
        <?php } ?></td>
      <?php } ?>
    </tr>
    <?php } ?>
  </table>
  <div class="pagination"><?php echo $pagination; ?></div>
</div>
<div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
<?php echo (isset($header)) ? '</div>' : '' ?>
<?php echo (isset($footer)) ? $footer : '' ?>

gifleri kendiniz ayarlarsınız. tpl dosyasında aratın "urun_incele.gif""urun_hizli.gif"
kendi giflerinizle değiştirin
 

debreli

OpenCart-TR
Katılım
31 Ağu 2010
Mesajlar
196
Tepkime puanı
0
Puanları
0
Web sitesi
vakifshop.com
1.4.9/1 all products kurulumu
ilk öce yukardaki dosyalardan 1.4.9/1 için olanı sitenize yükleyin.

catalog/controller/common/header.php
bul
Kod:
$this->data['text_advanced'] = $this->language->get('text_advanced');

sonrasına ekle
Kod:
$this->data['text_all'] = $this->language->get('text_all');

aynı dosyada bul
Kod:
$this->data['special'] = HTTP_SERVER . 'index.php?route=product/special';

sonrasına ekle
Kod:
$this->data['all'] = HTTP_SERVER . 'index.php?route=product/all';

catalog/langues/turkis/common/header.php

bul
Kod:
$_['text_checkout'] = 'Kasaya Git';

sonrasına ekleyin
Kod:
$_['text_all']  = 'Tüm Ürünler';

view/theme/default/template/common/header.tpl

bul
Kod:
<div class="div3">

sonrasına ekle
Kod:
<a href="<?php echo str_replace('&', '&', $all); ?>" style="background-image: url('catalog/view/theme/default/image/special.png');"><?php echo $text_all; ?></a>
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
Bu konuyu tersten uygulayın
http://forum.opencart-tr.com/thread-1234.html
 

haylazzzz

OpenCart-TR
Katılım
30 Ocak 2011
Mesajlar
2
Tepkime puanı
0
Puanları
0
tüm ürünlerde bayi fiyatı

sayın yetkili

tüm ürünlerde bayi fiyatını göstermek istiyorum.
yani kullanıc bilgilerini girdikten sonra değişen ürün fiyatlarını aynı zamanda da ürünlerin tamamını görmek istediğinde de fiyatlar inmiş bir şekilde görsün.

ben bu şekilde olacağını düşünerek sayfama ekledim lakin şifre girmeden evvel fiyatları yapılan indimlerle birlikte gösteriyor

mesela ben bir ürün için 20$ değilde 15 diye göster diyorum indirimli gösteriyor ama şifreli giriş yapıldığında dahada düşmesi gereken fiya yani bayi olan bir kullanıcı bu 15i 10 diye görmesi lazım ken hala 15 olarak görüyor.

bu sistemi fiyat listesi olarak kullanmak istiyorum yardımcı olursanız sevinirim

örnek çalışma : http://www.basturkelektronik.com/index.php?route=product/all
 

Borderline

OpenCart-TR
Katılım
14 Nis 2011
Mesajlar
9
Tepkime puanı
0
Puanları
0
Merhaba bende calıstı fakat şöyle sorun var,
tüm ürünlere bastıgında sayfada ;

heading_title , text_limit , text_sort

vs yazıyor. yani düzgün cıkmıyor cozum nedir ?

yokmu yardımcı olacak ?
 

lordbloodrose

OpenCart-TR
Katılım
15 Ara 2011
Mesajlar
6
Tepkime puanı
0
Puanları
0
Yaş
34
Konum
İstanbul
Web sitesi
www.eniacajans.com
Merhaba,

Konuyu hortlatıyor gibiyim fakat ;

<div class="div3">

divi 1.5.1.3. sürümünde hangi div classına denk geliyor acaba ? :) Opencarta yeni başladım direk son sürümden o yüzden eski sürümleri pek bilmiyorum. Son sürüme entegre etmek istiyorum bu modülü.

Teşekkürler şimdiden.
 

hubbez

OpenCart-TR
Katılım
14 Şub 2012
Mesajlar
2
Tepkime puanı
0
Puanları
0
beyler bu modülü kurdum, ürünleri gösteriyor ancak resimler çok minik geliyor. sanırım en ufak thumdan çekiyor. bu resimleri daha büyük hale getirmenin bir yolu var mıdır?
yardımlarınız için teşekkürler.
 
Üst