Download the PHP package wildanfuady/wfcart without Composer
On this page you can find all versions of the php package wildanfuady/wfcart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download wildanfuady/wfcart
More information about wildanfuady/wfcart
Files in wildanfuady/wfcart
Download wildanfuady/wfcart
More information about wildanfuady/wfcart
Files in wildanfuady/wfcart
Vendor wildanfuady
Package wfcart
Short Description Free open source library / package for shopping cart in Codeigniter 4
License
Package wfcart
Short Description Free open source library / package for shopping cart in Codeigniter 4
License
Please rate this library. Is it a good library?
Informations about the package wfcart
WFcart
Free Open Source Library / Package Shopping Cart For Codeigniter 4
Cara Install
- Masuk ke dalam direktory project/app/ThirdParty
cd app/ThirdParty
- Clone Repository
git clone https://github.com/wildanfuady/WFcart.git
- Aktifkan autoload. Silahkan buka file app/Config/Autoload.php dan cari kode berikut ini:
$psr4 = [
'App' => APPPATH, // To ensure filters, etc still found,
APP_NAMESPACE => APPPATH, // For custom namespace
'Config' => APPPATH . 'Config'
];
Tambahkan 1 baris kode di bawah ini:
$psr4 = [
'App' => APPPATH, // To ensure filters, etc still found,
APP_NAMESPACE => APPPATH, // For custom namespace
'Config' => APPPATH . 'Config',
'Wildanfuady' => APPPATH . 'ThirdParty/WFcart/Wildanfuady'
];
## Cara Penggunaan
1. Tambahkan kode berikut sebelum nama class di Controller
use Wildanfuady\WFcart\WFcart;
class Cart extends BaseController
{
// code
}
2. Pada function construct, tambahkan baris kode di bawah ini:
public function __construct() {
$this->cart = new WFcart();
}
3. Untuk mendapatkan data total keranjang belanja, gunakan perintah di bawah ini:
$this->cart->totals();
4. Untuk mendapatkan data total belanja ( quantity * sub total), gunakan perintah di bawah ini:
$this->cart->count_totals();
5. Untuk memasukan suatu product ke dalam keranjang belanja, gunakan perintah di bawah ini:
$id = 1; // ambil dari kode product
$item = [
'id' => $id,
'name' => 'Product 1,
'price' => 1000,
'photo' => 'product1.jpg',
'quantity' => 1
];
$this->cart->add_cart($id, $item);
6. Untuk menghapus suatu product berdasarkan id di dalam keranjang belanja, gunakan perintah di bawah ini:
$this->cart->remove($id);
7. Untuk mengupdate keranjang belanja, silahkan gunakan perintah di bawah ini:
$this->cart->update();
## Tutorial Pendukung
1. https://ilmucoding.com/shopping-cart-codeigniter-4/ (Part 1)
2. https://ilmucoding.com/cart-codeigniter-4/ (Part 2)All versions of wfcart with dependencies
PHP Build Version
Package Version
The package wildanfuady/wfcart contains the following files
Loading the files please wait ....