Post by miko12 » Tue Mar 20, 2012 1:32 am

gan mau tanya dong cara merubah tampilan home agar bisa masuk ke halaman menu sih gmn gan...???

Attachments

menu.gif

menu.gif (84.35 KiB) Viewed 6830 times


Newbie

Posts

Joined
Tue Mar 20, 2012 1:23 am

Post by qahar » Tue Mar 20, 2012 2:18 am

Asumsinya menggunakan default opencart theme.
Sesuaikan header.tpl seperti code ini bro:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by miko12 » Tue Mar 20, 2012 11:13 pm

makasih gan..

dah berhasil ane..

Newbie

Posts

Joined
Tue Mar 20, 2012 1:23 am

Post by cintabatik » Tue Mar 20, 2012 11:51 pm

qahar wrote:Asumsinya menggunakan default opencart theme.
Sesuaikan header.tpl seperti code ini bro:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
Klo misal Main Menunya yg mau di tambahin "Cara Belanja" yg berasal dari Dasboard >> Catalog >> Information >> Cara Belanja.
Nambahinnya gimana mas ? sya pengguna OP 1.5.1.3

??? ???

Batik Asli Jawa Tengah || Tempatnya Belajar Online ||
Tempat Belajar Webdesain


New member

Posts

Joined
Thu Jan 12, 2012 12:54 pm

Post by gangsar.swapurba » Wed Mar 21, 2012 2:18 pm

coba pakai ini:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $informations[x]['href']; ?>"><?php echo $text_informations[x]['title']; ?></a></li>  <--- x adalah no urut informasi yg bersangkutan.
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>

tapi sebelumnya tambahkan kode di bawah ini dulu di /catalog/controller/common/header.php:

Code: Select all

		$this->load->model('catalog/information');
		
		$this->data['informations'] = array();

		foreach ($this->model_catalog_information->getInformations() as $result) {
      		$this->data['informations'][] = array(
        		'title' => $result['title'],
	    		'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
      		);
    	}


Blog Manager 2 - The Only Advanced Blog Extension for OpenCart 2.0 has coming!!!
Image


Blog Manager - The Only Advanced Blog Extension for OpenCart
Image


OpenCart Tips and Tutorials
Image


User avatar
Active Member

Posts

Joined
Tue Mar 20, 2012 8:39 am
Location - Indonesia

Post by novaip » Tue Dec 11, 2012 4:26 pm

qahar wrote:Asumsinya menggunakan default opencart theme.
Sesuaikan header.tpl seperti code ini bro:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
Permisi gan, saya udah ubah codenya seperti diatas tapi kenapa ya gak ada perubahan di theme saya..
mohon bantuannya.. thanks.... ;D

Newbie

Posts

Joined
Tue Dec 11, 2012 4:21 pm

Post by sa1638 » Wed Dec 12, 2012 1:11 pm

novaip wrote:
qahar wrote:Asumsinya menggunakan default opencart theme.
Sesuaikan header.tpl seperti code ini bro:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
Permisi gan, saya udah ubah codenya seperti diatas tapi kenapa ya gak ada perubahan di theme saya..
mohon bantuannya.. thanks.... ;D
Klo bertanya seharusnya, menyertakan OC versi berapa yang dipakai? Theme apa yang digunakan?
Itu agan menambahkan code seperti itu di file apa? jangan2 menambahkannya di file header.tpl dari theme default, sedangkan theme yang agan gunakan bukan theme default.

New member

Posts

Joined
Sun Jun 24, 2012 11:41 am

Post by novaip » Thu Dec 13, 2012 11:12 am

sa1638 wrote:
novaip wrote:
qahar wrote:Asumsinya menggunakan default opencart theme.
Sesuaikan header.tpl seperti code ini bro:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
Permisi gan, saya udah ubah codenya seperti diatas tapi kenapa ya gak ada perubahan di theme saya..
mohon bantuannya.. thanks.... ;D
Klo bertanya seharusnya, menyertakan OC versi berapa yang dipakai? Theme apa yang digunakan?
Itu agan menambahkan code seperti itu di file apa? jangan2 menambahkannya di file header.tpl dari theme default, sedangkan theme yang agan gunakan bukan theme default.
maaf gan, saya lupa menyertakan versi oc nya...
saya menggunakan OC versi 1.5.4 dan theme ustore..
file yang saya edit berada di direktori C:\xampp\htdocs\opix\catalog\view\theme\ustore-color6\template\common\header.tpl.

saya sudah menambahkan code seperti diatas tapi tetap tidak bisa.. salah nya di bagian mana ya gan...??? ???

thanks atas perhatiannya....

Newbie

Posts

Joined
Tue Dec 11, 2012 4:21 pm

Post by aaep90 » Wed Oct 09, 2013 11:09 pm

gangsar.swapurba wrote:coba pakai ini:

Code: Select all

<div id="menu">
  <ul>
    <li><a href="<?php echo $informations[x]['href']; ?>"><?php echo $text_informations[x]['title']; ?></a></li>  <--- x adalah no urut informasi yg bersangkutan.
    <li><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>  <--- tambahan
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>

tapi sebelumnya tambahkan kode di bawah ini dulu di /catalog/controller/common/header.php:

Code: Select all

		$this->load->model('catalog/information');
		
		$this->data['informations'] = array();

		foreach ($this->model_catalog_information->getInformations() as $result) {
      		$this->data['informations'][] = array(
        		'title' => $result['title'],
	    		'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
      		);
    	}

saya udah nerapinnya & work 100% O0

Newbie

Posts

Joined
Thu Oct 03, 2013 3:02 pm

Post by ardyanb » Mon Dec 02, 2013 12:10 am

Selamat malam juragan saya sudah mencoba nya untuk menambahkan di menu nya seperti "Cara Pembayaran" yang dari information, tapi gabisa. malah error on php 86 line juragan
tolong bantuannya.
saya pakai opencart v1.5.6

Newbie

Posts

Joined
Mon Dec 02, 2013 12:07 am
Who is online

Users browsing this forum: No registered users and 14 guests