-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cart id hanging around in the session when not cleared (#1854)
Currently if a cart has a completed order but wasn't cleared from the session it will seize up and cause problems when users try to interact with it. This also causes data issues as the cart no longer maps to the completed order correctly. --------- Co-authored-by: alecritson <[email protected]> Co-authored-by: Glenn Jacobs <[email protected]>
- Loading branch information
1 parent
5a9569d
commit fca6cca
Showing
8 changed files
with
160 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
return [ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Session Key | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Specify the session key used when fetching the cart. | ||
| | ||
*/ | ||
'session_key' => 'lunar_cart', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Auto create a cart when none exists for user. | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Determines whether you want to automatically create a cart for a user if | ||
| they do not currently have one in the session. By default, this is false | ||
| to minimise the amount of carts added to the database. | ||
| | ||
*/ | ||
'auto_create' => false, | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Allow Carts to have multiple orders associated. | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Determines whether the same cart instance will be returned if there is already | ||
| a completed order associated to the cart which is retrieved in the session. | ||
| When set to false, if a cart has a completed order, then a new instance | ||
| of a cart will be returned, even if auto_create is set to false | ||
| | ||
*/ | ||
'allow_multiple_orders_per_cart' => false, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.