Langsung ke konten utama

FINAL PROJECT PBKK

TUGAS 8 PBKK : Membuat Toko Elektronik dengan CodeIgniter Skip to main content

Anggota:


05111840000057 - Maisie Chiara Salsabila
05111840000120 - Aflakah Nur Farhana
05111840000130 - I Gusti Agung Chintya Prema Dewi

Pada tugas 8 ini, kami kan membentuk toko elektronik menggunakan CodeIgniter3. Web yang akan dibangun ini memiliki dua role, yaitu pembeli dan admin. 

Berikut merupakan pembagian fitur kedua role tersebut. 

Admin: 

  1. Login 
  2. Mengelola kategori barang (CRUD) 
  3. Mengelola data brand (CRUD) 
  4. Mengelola produk (CRUD)
  5.  Mengelola orderan (CRUD) 
  6. Logout

 Pembeli: 

  1. Registrasi 
  2. Login 
  3. Melihat produk 
  4. Mencari produk 
  5. Membeli Produk 
  6. Melihat daftar belanja 
  7. Membeli produk 
  8. Logout 

 

 Pengaturan MVC Controller

Controller

Untuk pengaturan file 'config.php' pengaturan utama yang diubah adalah ['base_url'] dan ['index_page']

Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. $config['base_url'] = (isset($_SERVER['HTTPS']) ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . preg_replace('@/+$@', '', dirname($_SERVER['SCRIPT_NAME'])) . '/';

Untuk pengaturan file 'autoload.php'

Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. $autoload['libraries'] = array('database', 'session', 'form_validation', 'upload', 'cart');
  2. $autoload['helper'] = array('form', 'url', 'file', 'option', 'text');

Untuk pengaturan file 'routes.php'

Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. //Front End Route
  2. $route['default_controller']   = 'web';
  3. $route['404_override']         = 'web/error';
  4. $route['translate_uri_dashes'] = false;
  5.  
  6. //Web Route
  7.  
  8. $route['product']             = 'web/product';
  9. $route['single/(:num)']       = 'web/single/$1';
  10. $route['contact']             = 'web/contact';
  11. $route['cart']                = 'web/cart';
  12. $route['save/cart']           = 'web/save_cart';
  13. $route['update/cart']         = 'web/update_cart';
  14. $route['remove/cart']         = 'web/remove_cart';
  15. $route['user_form']           = 'web/user_form';
  16. $route['get/category/(:num)'] = 'web/category_post/$1';
  17.  
  18. $route['search']              = 'web/search';
  19. $route['customer/register']   = 'web/customer_register';
  20. $route['customer/login']      = 'web/customer_login';
  21. $route['customer/logout']     = 'web/logout';
  22. $route['customer/logincheck'] = 'web/customer_logincheck';
  23. $route['customer/save']       = 'web/customer_save';
  24. $route['register/success']    = 'web/register_success';
  25.  
  26. $route['customer/shipping/login']    = 'web/customer_shipping_login';
  27. $route['customer/shipping/register'] = 'web/customer_shipping_register';
  28.  
  29. $route['customer/shipping']              = 'web/customer_shipping';
  30. $route['customer/save/shipping/address'] = 'web/save_shipping_address';
  31. $route['checkout']                       = 'web/checkout';
  32. $route['payment']                        = 'web/payment';
  33. $route['save/order']                     = 'web/save_order';
  34. $route['check_email']                    = 'web/check_email';
  35.  
  36. //Admin Panel Route
  37. $route['dashboard']            = 'admin/index';
  38. $route['manage/order']         = 'manageorder/manage_order';
  39. $route['order/details/(:num)'] = 'manageorder/order_details/$1';
  40.  
  41. //Category  Route List
  42. $route['add/category']                = 'category/add_category';
  43. $route['manage/category']             = 'category/manage_category';
  44. $route['save/category']               = 'category/save_category';
  45. $route['delete/category/(:num)']      = 'category/delete_category/$1';
  46. $route['edit/category/(:num)']        = 'category/edit_category/$1';
  47. $route['update/category/(:num)']      = 'category/update_category/$1';
  48. $route['published/category/(:num)']   = 'category/published_category/$1';
  49. $route['unpublished/category/(:num)'] = 'category/unpublished_category/$1';
  50.  
  51. //Brand  Route List
  52. $route['add/brand']                = 'brand/add_brand';
  53. $route['manage/brand']             = 'brand/manage_brand';
  54. $route['save/brand']               = 'brand/save_brand';
  55. $route['delete/brand/(:num)']      = 'brand/delete_brand/$1';
  56. $route['edit/brand/(:num)']        = 'brand/edit_brand/$1';
  57. $route['update/brand/(:num)']      = 'brand/update_brand/$1';
  58. $route['published/brand/(:num)']   = 'brand/published_brand/$1';
  59. $route['unpublished/brand/(:num)'] = 'brand/unpublished_brand/$1';
  60.  
  61. //Post Route List
  62. $route['add/product']                = 'product/add_product';
  63. $route['manage/product']             = 'product/manage_product';
  64. $route['save/product']               = 'product/save_product';
  65. $route['delete/product/(:num)']      = 'product/delete_product/$1';
  66. $route['edit/product/(:num)']        = 'product/edit_product/$1';
  67. $route['update/product/(:num)']      = 'product/update_product/$1';
  68. $route['published/product/(:num)']   = 'product/published_product/$1';
  69. $route['unpublished/product/(:num)'] = 'product/unpublished_product/$1';
  70.  
  71. //Admin login
  72. $route['admin']             = 'adminlogin';
  73. $route['admin_login_check'] = 'adminlogin/admin_login_check';
  74. $route['logout']            = 'admin/logout';
  75.  
  76. //Slider  Route List
  77. $route['add/slider']                = 'slider/add_slider';
  78. $route['manage/slider']             = 'slider/manage_slider';
  79. $route['save/slider']               = 'slider/save_slider';
  80. $route['delete/slider/(:num)']      = 'slider/delete_slider/$1';
  81. $route['edit/slider/(:num)']        = 'slider/edit_slider/$1';
  82. $route['update/slider/(:num)']      = 'slider/update_slider/$1';
  83. $route['published/slider/(:num)']   = 'slider/published_slider/$1';
  84. $route['unpublished/slider/(:num)'] = 'slider/unpublished_slider/$1';
  85.  
  86. //Theme Option  Route List
  87. $route['theme/option'] = 'themeoption';
  88. $route['save/option']  = 'themeoption/save_option';
  89.  

Untuk pengaturan file 'database.php'

Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. $db['default'] = array(
  2.     'dsn'   => '',
  3.     'hostname' => 'localhost',
  4.     'username' => 'root',
  5.     'password' => '',
  6.     'database' => 'ecommerce',
  7.     'dbdriver' => 'mysqli',
  8.     'dbprefix' => '',
  9.     'pconnect' => FALSE,
  10.     'db_debug' => (ENVIRONMENT !== 'production'),
  11.     'cache_on' => FALSE,
  12.     'cachedir' => '',
  13.     'char_set' => 'utf8',
  14.     'dbcollat' => 'utf8_general_ci',
  15.     'swap_pre' => '',
  16.     'encrypt' => FALSE,
  17.     'compress' => FALSE,
  18.     'stricton' => FALSE,
  19.     'failover' => array(),
  20.     'save_queries' => TRUE

Model 

Untuk pengaturan database, toko kami memiliki 12 tabel yaitu

  1. tbl_brand
  2. tbl_category
  3. tbl_customer
  4. tbl_option
  5. tbl_order
  6. tbl_order_details
  7. tbl_payment
  8. tbl_product
  9. tbl_shipping
  10. tbl_slider
  11. tbl_user
  12. user_role

(source code lengkap tersedia di repositori github)

View

Tampilan beranda pembeli


Tampilan Registrasi


 Tampilan login


Tampilan detail produk

Tampilan keranjang pembeli



Tampilan Beranda Admin


Tampilan Menambah kategori barang


Tampilan pengelolaan kategori


Tampilan pengelolaan brand produk

Tampilan pengelolaan orderan customer


 

 

Source code lengkap :

Github Toko Elektronik

Video demo

Komentar

Postingan populer dari blog ini

Fit for the Future: A Sharing of Experience

Perbedaan Pemrograman Terstruktur dan Pemrograman Berbasis Objek

TUGAS 4 : Membuat Aplikasi MVVM dengan WPF menggunakan .NET