Yii Framework Forum: Modules Yii-Shop - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Modules Yii-Shop Search Yii - shop g kerja di product/admin, category/admin,order/admin Rate Topic: ****- 1 Votes

#1 User is offline   ubuntu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 11-June 12

Posted 11 September 2012 - 06:41 PM

Dear All

gan mw tnyak ni

saya baru yii , trus nemuin modules yii-shop & wah hasilnya setalah di install

tetapi

aq coba fitur search pada admin product , category, ama order kok g jalan>?
g memcari carater yg aq minta , gmn cara agar bisa search kembali untuk masalah di atas terimakasih

Di tunggu pencerahaanya :D
0

#2 User is offline   mbahsomo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 29-March 10

Posted 12 September 2012 - 11:31 PM

Wah Belum pernah coba nih mas , saya coba dulu deh
Sugik Puja Kusuma [mbahsomo]
http://sugik.do-event.com
0

#3 User is offline   ubuntu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 11-June 12

Posted 13 September 2012 - 09:37 PM

View Postmbahsomo, on 12 September 2012 - 11:31 PM, said:

Wah Belum pernah coba nih mas , saya coba dulu deh


sep gan aq tunggu ya informasinya ehehehe :D
0

#4 User is offline   ubuntu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 11-June 12

Posted 16 September 2012 - 10:52 PM

View Postubuntu, on 11 September 2012 - 06:41 PM, said:

Dear All

gan mw tnyak ni

saya baru yii , trus nemuin modules yii-shop & wah hasilnya setalah di install

tetapi

aq coba fitur search pada admin product , category, ama order kok g jalan>?
g memcari carater yg aq minta , gmn cara agar bisa search kembali untuk masalah di atas terimakasih

Di tunggu pencerahaanya :D


gan uda nemuin caranya tp ini aq lum tau apakah sesuai dengan standarisasi krn aq baru ...... heheheh

pertama dari hasil rembuk bersama tm2 n tanyak2 pengaruh nya krn ada new model pada view admin yang membuat nilai attribut menjadi kosong ..... dmn new model sudah di initialkan pada fungsi admin category controller
shngga saya sedikit memodif comment aja new model category untuk contoh

.../shop/protected/modules/shop/views/category/admin.php

//$model = new Category();

$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'category-grid',
	....
)); 



trus menginisialkan variabel model untuk ketegory, difungsi admin dengn category_model, agar lebih muda membedakan model maka

.../shop/protected/modules/shop/controllers/CategoryController.php

...
public function actionAdmin()
	{
		$model=new Category('search');
		if(isset($_GET['Category']))
			$model->attributes=$_GET['Category'];

		$this->render('admin',array(
			'category_model'=>$model,
		));
	}
...


selanjutnya memodif kembali pada conttroleer shop admin

.../shop/protected/modules/shop/controllers/ShopController.php


public function actionAdmin()
	{
		$category_model=new Category('search');
		if(isset($_GET['Category']))
			$category_model->attributes=$_GET['Category'];		
			
		$this->render('admin', 
                        array('category_model'=>$category_model'));
	}



terakhir inisialkan pada view admin categori untuk data provider & filter ke Category_model , maka

..../shop/protected/modules/shop/views/category/admin.php


<?php 

//$model = new Category();

$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'category-grid',	
	'dataProvider'=>$category_model->search(),
	'filter'=>$category_model,
	
         .....
));
echo CHtml::link(Yii::t('ShopModule.shop', 'Create a new Category'), array('category/create'));

?>



trus di bagian ..../shop/protected/modules/shop/views/shop/admin.php juga di initisalkan category_model sebagai berikut


<div id="shopcontent">

<H1> Webshop Administration </H1>

<div class="span-8"> 
<?php $this->beginWidget('zii.widgets.CPortlet',
		array('title' => Yii::t('ShopModule.shop', 'Administrate Categories'))); ?>
<?php $this->renderPartial('/category/admin', array('category_model'=>$category_model)); ?>
<?php $this->endWidget(); ?>
</div>

......

<div class="clear">

</div>
<?php
$this->breadcrumbs=array(
	Yii::t('ShopModule.shop', 'Shop')=>array('shop/index'),
	Yii::t('ShopModule.shop', 'Administration'),
);

?>



nanti tes memlalui http://127.0.0.1/sho.../category/admin atau http://127.0.0.1/sho...shop/shop/admin seacrh insyallah jalan

untuk 2 tabel lainnya juga di lakukan dengan hal yg sama , semoga bermanfaat .....

ditunggu saran2 nya ya ! :D
0

#5 User is offline   xicond 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 06-October 12

Posted 18 October 2012 - 06:51 AM

ninggalin jejak
0

#6 User is offline   Larry Jr. 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 13-March 13
  • Location:Tomohon

Posted 25 August 2014 - 12:40 AM

@ubuntu mau nanya,

pas mau run install <webapp>/shop/install muncul pesan begini:

Alias "shop.ShopModule" is invalid. Make sure it points to an existing PHP file and the file is readable.


saya coba kasih permissionnya: sudo chmod -R 777 /var/www

Tapi hasilnya masih sama.
kira2 gimana yah?



Terima kasih sebelumnya
JoenMarz
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users