mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 10:44:32 +00:00
Add savedcartinstance as a parameter to the merge documentation
This commit is contained in:
@@ -585,7 +585,7 @@ If you want to retrieve the cart from the database and restore it, all you have
|
||||
If you want to merge the cart with another one from the database, all you have to do is call the `merge($identifier)` where `$identifier` is the key you specified for the `store` method. You can also define if you want to keep the discount and tax rates of the items and if you want to dispatch "cart.added" events.
|
||||
|
||||
// Merge the contents of 'savedcart' into 'username'.
|
||||
Cart::instance('username')->merge('savedcart', $keepDiscount, $keepTaxrate, $dispatchAdd);
|
||||
Cart::instance('username')->merge('savedcart', $keepDiscount, $keepTaxrate, $dispatchAdd, 'savedcartinstance');
|
||||
|
||||
### Erasing the cart
|
||||
If you want to erase the cart from the database, all you have to do is call the `erase($identifier)` where `$identifier` is the key you specified for the `store` method.
|
||||
|
||||
@@ -544,7 +544,7 @@ Jika Anda ingin mengambil keranjang dari database dan mengembalikannya, yang har
|
||||
Jika Anda ingin menggabungkan keranjang dengan keranjang lain dari basis data, yang harus Anda lakukan adalah memanggil `gabungan ($ identifier)` di mana `$ identifier` adalah kunci yang Anda tentukan untuk metode` store`. Anda juga dapat menentukan apakah Anda ingin mempertahankan potongan harga dan tarif pajak item.
|
||||
|
||||
// Merge the contents of 'savedcart' into 'username'.
|
||||
Cart::instance('username')->merge('savedcart', $keepDiscount, $keepTaxrate);
|
||||
Cart::instance('username')->merge('savedcart', $keepDiscount, $keepTaxrate, 'savedcartinstance');
|
||||
|
||||
## Pengecualian
|
||||
|
||||
|
||||
@@ -542,7 +542,7 @@ foreach(Cart::content() as $row) {
|
||||
Якщо ви хочете злити кошик із іншим кошиком, збереженим у базі даних, вам знадобиться викликати метод `merge($identifier)`, де `$identifier` - це ключ, який ви зазначили у методі`store`. Ви також можете визначити чи хочете ви зберегти знижку і ставку оподаткування для товарів.
|
||||
|
||||
// Merge the contents of 'savedcart' into 'username'.
|
||||
Cart::instance('username')->merge('savedcart', $keepDiscount, $keepTaxrate);
|
||||
Cart::instance('username')->merge('savedcart', $keepDiscount, $keepTaxrate, 'savedcartinstance');
|
||||
|
||||
## Перехоплення
|
||||
|
||||
|
||||
Reference in New Issue
Block a user