Post by athailah » Fri May 07, 2010 4:02 pm

Seperti kita ketahui OpenCart hanya menampilkan 8 item produk terbaru saja di halaman depannya. Hal ini mungkin sangat tidak memadai bagi sebagaian orang (termasuk saya :D ).

Untuk itu kita harus merubah sebuah angka dalam sebuah file *.php untuk merubah tampilan produk kita tersebut. Langkah-langkahnya adalah sebagi berikut:
  • Edit file /catalog/controller/common/home.php
    Loncat ke baris 29 dan ganti angka (8) menjadi (20) misalnya, sehingga baris tersebut menjadi seperti ini:

    Code: Select all

    foreach ($this->model_catalog_product->getLatestProducts(20) as $result)
    Save perubahan tersebut, dan upload kembali file tersebut ke hosting anda. Dan nikmati hasilnya :D
Semoga bermanfaat

Athailah
http://www.juallinux.com" onclick="window.open(this.href);return false;

Salam,

Athailah @ Batam
www.juallinux.com


User avatar
Newbie

Posts

Joined
Sun Dec 27, 2009 12:29 am
Location - Batam

Post by valen1701 » Sat May 08, 2010 11:35 pm

wah mantap bro,thx tipsnya y

Newbie

Posts

Joined
Sat May 08, 2010 6:28 pm

Post by mulunix » Tue Jun 22, 2010 9:14 pm

untuk ver 1.4.8 kekmana bro ????

Image


User avatar
Active Member

Posts

Joined
Mon Jun 21, 2010 4:56 am

Post by cevarief » Tue Jun 22, 2010 9:50 pm

mulunix wrote:untuk ver 1.4.8 kekmana bro ????
Versi 1.4.8 udah tidak dihardcode limit latestny.
Solusinya coba buka database table setting, cari column group latest dengan column keynya latest_limit. Set aja ke angka 20.

Kayaknya feature ini secara database udah siap, tapi interface dibackendnya belum dibikin sama developernya ya ;) . Soalnya gak ada di tab setting backedn. CMIIW.

Active Member

Posts

Joined
Wed Jun 02, 2010 10:52 pm

Post by saccarrep » Wed Jun 23, 2010 5:10 pm

Untuk 1.4.8 udah dibuat jadi modul bos,

Buka aja modul Latest trus ubah limitnya dari 8 ke terserah bos ;)

Before you judge a book by its cover, you've got to flip through the pages

Image


User avatar
New member

Posts

Joined
Thu Jan 28, 2010 5:59 pm

Post by mulunix » Wed Jun 23, 2010 7:24 pm

saccarrep wrote:Untuk 1.4.8 udah dibuat jadi modul bos,

Buka aja modul Latest trus ubah limitnya dari 8 ke terserah bos ;)
oke bro thanks :0

Image


User avatar
Active Member

Posts

Joined
Mon Jun 21, 2010 4:56 am

Post by cevarief » Wed Jun 23, 2010 8:47 pm

saccarrep wrote:Untuk 1.4.8 udah dibuat jadi modul bos,

Buka aja modul Latest trus ubah limitnya dari 8 ke terserah bos ;)
Good catch. Pantesan nyari-nyari di setting backend gak ada :P. Ternyata dah jadi module ya. Thanks.

Active Member

Posts

Joined
Wed Jun 02, 2010 10:52 pm

Post by mulunix » Wed Jun 30, 2010 6:40 pm

untuk menampilkan berat barang gimana?

misanya

Code: Select all

SONY7009
Rp 15,350,000.00
Barat 20 KG
di home bisa atau di halaman konfermasi pembayaran
kurir mengunakan TIKI JNE

Image


User avatar
Active Member

Posts

Joined
Mon Jun 21, 2010 4:56 am

Post by bravo » Sun Aug 08, 2010 1:36 pm

Bisa dibantu langkah2nya nda bro? mklm nih saya masih newbie nih...... ( sudah terjawab masalah ini, saya mengunakan OC 1.4.8b dan jwbnya --> ada di dalam modules - extention - Latest )

thx a lot for master2 smua disini :)

Regrads,
bravo
" Make your bisnis online simple with opencart "


User avatar
New member

Posts

Joined
Thu Jun 24, 2010 1:43 pm

Post by athailah » Wed Aug 11, 2010 11:33 am

Untuk versi 1.3.x sampai versi 1.4.7 caranya masih sama dengan yang saya tulis disini. Kalo untuk versi 1.4.8 sudah bisa di rubah langsung dari page administrator.

Silahkan cari sendiri, sampai saat ini belum pake versi yang terbaru. Masih mempertahankan yang versi 1.3.2 dan dalam waktu dekat rencana mo upgrade ke versi 1.4.7.

Salam,

Athailah @ Batam
www.juallinux.com

Salam,

Athailah @ Batam
www.juallinux.com


User avatar
Newbie

Posts

Joined
Sun Dec 27, 2009 12:29 am
Location - Batam

Post by welehweleh » Wed Aug 25, 2010 11:59 am

kalo pke oc147 ada di baris 34 tuh..

:joker:

User avatar
Newbie

Posts

Joined
Wed Aug 25, 2010 10:57 am

Post by greenfrog » Fri Feb 04, 2011 3:12 pm

thanks baangets nich ..

Newbie

Posts

Joined
Wed Feb 02, 2011 8:30 pm

Post by sammy » Mon Feb 14, 2011 7:33 pm

Gimana pula gan cara menampilkan produk lebih dari 8 untuk OC versi 1.4.9.2...
Udah nyari2 gak ketemu...tolongin ya gan...

Newbie

Posts

Joined
Tue Jan 11, 2011 11:43 am

Post by openmycart.com » Tue Feb 15, 2011 12:13 am

sammy wrote:Gimana pula gan cara menampilkan produk lebih dari 8 untuk OC versi 1.4.9.2...
Udah nyari2 gak ketemu...tolongin ya gan...
nyarinya dimana nih? kalau nyari di module pasti ada

Find and get many various of opencart modules, themes, mods, etc for your opencart store at http://www.openmycart.com/oc/, OPENCART SITE customization and Maintenance supports at here


User avatar
Active Member

Posts

Joined
Tue Oct 12, 2010 4:47 am


Post by tokorakyat » Mon Jun 20, 2011 4:12 am

openmycart.com wrote:
sammy wrote:Gimana pula gan cara menampilkan produk lebih dari 8 untuk OC versi 1.4.9.2...
Udah nyari2 gak ketemu...tolongin ya gan...
nyarinya dimana nih? kalau nyari di module pasti ada
bisa diperjelas gak om posisinya dimana...? soalnya saya nyari di module di file sini:

catalog>controller>module>latest.php

mohon pencerahan nya... saya pake OC 1.4.9

thanks

Image


Newbie

Posts

Joined
Mon May 02, 2011 3:16 am

Post by screenager8 » Mon Jun 20, 2011 10:47 am

Di file itu cari2 teks yg isinya angka....

Image

Bukatoko.com | Cara mudah & cepat punya toko online!


User avatar
Active Member

Posts

Joined
Sat Nov 28, 2009 5:45 pm
Location - Jakarta, Indonesia

Post by tokorakyat » Tue Jun 21, 2011 1:52 am

screenager8 wrote:Di file itu cari2 teks yg isinya angka....
GAk ada bang, di check dah. ada juga angka yang buat resize image... ???
Nih bang scriptnya dah file latest.php yang ada di Catalog>controller>module>latest.php

Code: Select all

<?php
class ControllerModuleLatest extends Controller {
	protected function index() {
		$this->language->load('module/latest');

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

		$this->load->model('catalog/product');
		$this->load->model('catalog/review');
		$this->load->model('tool/seo_url');
		$this->load->model('tool/image');

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

		$this->data['products'] = array();

		$results = $this->model_catalog_product->getLatestProducts($this->config->get('latest_limit'));

		foreach ($results as $result) {
			if ($result['image']) {
				$image = $result['image'];
			} else {
				$image = 'no_image.jpg';
			}

			if ($this->config->get('config_review')) {
				$rating = $this->model_catalog_review->getAverageRating($result['product_id']);
			} else {
				$rating = false;
			}

			$special = FALSE;

			$discount = $this->model_catalog_product->getProductDiscount($result['product_id']);

			if ($discount) {
				$price = $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
			} else {
				$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));

				$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')));
				}
			}

			$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(
				'product_id'    => $result['product_id'],
				'name'    		=> $result['name'],
				'model'   		=> $result['model'],
				'rating'  		=> $rating,
				'stars'   		=> sprintf($this->language->get('text_stars'), $rating),
				'price'   		=> $price,
				'options'   	=> $options,
				'special' 		=> $special,
				'image'   		=> $this->model_tool_image->resize($image, 38, 38),
				'thumb'   		=> $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
				'href'    		=> $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']),
				'add'    		=> $add
			);
		}

		if (!$this->config->get('config_customer_price')) {
			$this->data['display_price'] = TRUE;
		} elseif ($this->customer->isLogged()) {
			$this->data['display_price'] = TRUE;
		} else {
			$this->data['display_price'] = FALSE;
		}

		$this->id = 'latest';

		if ($this->config->get('latest_position') == 'home') {
			$this->data['heading_title'];
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/latest_home.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/module/latest_home.tpl';
			} else {
				$this->template = 'village-basic/template/module/latest_home.tpl';
			}
		} else {
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/latest.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/module/latest.tpl';
			} else {
				$this->template = 'village-basic/template/module/latest.tpl';
			}
		}

		$this->render();
	}
}
?>

Image


Newbie

Posts

Joined
Mon May 02, 2011 3:16 am

Post by AgenJaket » Tue Jun 21, 2011 2:15 am

tokorakyat wrote:
screenager8 wrote:Di file itu cari2 teks yg isinya angka....
GAk ada bang, di check dah. ada juga angka yang buat resize image... ???
Nih bang scriptnya dah file latest.php yang ada di Catalog>controller>module>latest.php
Untuk versi 1.4.9 seting limit produk terbaru sudah ada di dalam 'Module'
Module yang dimaksud disini bukan folder module, tapi module yg ada di dalam halaman administrasi. :D

1. Login ke Administration Page
2. Pilih Extensions -> Modules
3. Edit module 'Latest'
4. Set limit sesuai kebutuhan misal 12 dst

Nilai konfigurasi di atas akan dipakai latest.php seperti pada kode di bawah ini

Code: Select all

$results = $this->model_catalog_product->getLatestProducts($this->config->get('latest_limit'));
Warm Regards,
O0

http://www.AgenJaket.com
Toko Jaket Motor Online Terlengkap di Indonesia


User avatar
New member

Posts

Joined
Mon May 02, 2011 1:35 pm
Location - Denpasar

Post by tokorakyat » Tue Jun 21, 2011 4:27 am

AgenJaket wrote:
tokorakyat wrote:
screenager8 wrote:Di file itu cari2 teks yg isinya angka....
GAk ada bang, di check dah. ada juga angka yang buat resize image... ???
Nih bang scriptnya dah file latest.php yang ada di Catalog>controller>module>latest.php
Untuk versi 1.4.9 seting limit produk terbaru sudah ada di dalam 'Module'
Module yang dimaksud disini bukan folder module, tapi module yg ada di dalam halaman administrasi. :D

1. Login ke Administration Page
2. Pilih Extensions -> Modules
3. Edit module 'Latest'
4. Set limit sesuai kebutuhan misal 12 dst

Nilai konfigurasi di atas akan dipakai latest.php seperti pada kode di bawah ini

Code: Select all

$results = $this->model_catalog_product->getLatestProducts($this->config->get('latest_limit'));
Warm Regards,
O0
:laugh: jadi malu saya bang... :crazy:

thanks bang, problem solved... :)

Image


Newbie

Posts

Joined
Mon May 02, 2011 3:16 am

Post by tyas » Mon Jul 25, 2011 3:26 pm

Agan-agan semua kok punya ane gg bisa muncuL ya... ;D

ane pake' OC v1.5.1..

gmn ya gan ?? :)

trmksh ..

Newbie

Posts

Joined
Fri Jul 15, 2011 9:18 am
Who is online

Users browsing this forum: No registered users and 10 guests