Configuration
You can customise Wishlist’s settings using a PHP configuration file. This is optional: each setting has a default, so you only need to include the values you want to change.
To override a setting, create wishlist.php in your Craft project’s /config directory and return an array of setting names and values. For example, the following will change the name displayed in the control panel:
<?php
return [
'pluginName' => 'Wishlist Tools',
];All other settings keep their defaults. Add any further settings you want to change to the same array. The options below explain the available settings and their defaults.
Configuration Options
Type: string · Default: 'Wishlist'
If you want to change the plugin name in the control panel.
Lists
allowDuplicates
Type: bool · Default: false
Whether to allow duplicates in lists.
allowGetListActions
Type: bool · Default: true
Whether front-end list and add-to-cart actions can accept GET requests. Disable this to require POST requests with CSRF protection for creating, updating, deleting and clearing lists, updating list items, and adding lists to a cart. GET requests are deprecated; the compatibility default remains enabled for Wishlist 3, and Wishlist 4 will require POST requests.
manageDisabledLists
Type: bool · Default: true
Whether to allow front-end users to manage disabled lists and their items.
mergeLastListOnLogin
Type: bool · Default: false
Whether to merge a user’s lists with all existing lists for the user, when they log in. This can be useful when lists are modified when logged out, but a user logs in. Any existing lists will be merged.
purgeInactiveLists
Type: bool · Default: true
Whether to purge inactive lists after a certain duration.
purgeInactiveListsDuration
Type: string · Default: 'P3M'
If purging inactive lists is enabled, after this duration they will be purged.
purgeInactiveGuestListsDuration
Type: string · Default: 'P1D'
If purging inactive lists is enabled, after this duration only guest lists will be purged.
purgeEmptyListsOnly
Type: bool · Default: true
Whether to purge user lists only if they have no items.
purgeEmptyGuestListsOnly
Type: bool · Default: true
Whether to purge guest lists only if they have no items.
cookieExpiry
Type: mixed · Default: 0
Set how long of an expiry guest users' lists should have, before being forgotten. Provide as 0 to be session-based, or a DateInterval (opens new window) string.
Item Eligibility
These settings control which linked elements can be added from front-end requests. They do not restrict control-panel item management, and existing items can still be removed if their linked element later becomes ineligible. Wishlist continues to support every registered element type permitted by its supported-element-types event.
allowDraftElements
Type: bool · Default: false
Whether draft elements can be added to lists from front-end requests. When the list target’s root owner is a draft, enabling this also permits its expected lack of a public URL.
allowRevisionElements
Type: bool · Default: false
Whether element revisions can be added to lists from front-end requests. When the list target’s root owner is a revision, enabling this also permits its expected lack of a public URL.
allowInactiveElements
Type: bool · Default: false
Whether disabled, archived, pending, expired, suspended or locked elements can be added to lists from front-end requests. When the list target’s root owner is inactive, enabling this also permits its expected lack of a public URL.
allowCrossSiteElements
Type: bool · Default: false
Whether localized elements from a site other than the current site can be added to lists from front-end requests. Other eligibility checks continue to apply.
allowNonPublicElements
Type: bool · Default: false
Whether active elements without a public site URL can be added to lists from front-end requests. Nested elements use their root owner’s public URL.
pdfPath
Type: string · Default: '_pdf/wishlist'
Set the path to your PDF.
pdfFilenameFormat
Type: string · Default: 'Wishlist-{id}'
Set the default PDF filename format.
pdfAllowRemoteImages
Type: bool · Default: true
Whether to allow remote images in the PDF.
pdfPaperSize
Type: string · Default: 'letter'
Sets the paper size for the PDF.
pdfPaperOrientation
Type: string · Default: 'portrait'
Sets the paper orientation for the PDF.
templateEmail
Type: string|null · Default: null
The template Wishlist will use for HTML emails.
attachPdfToEmail
Type: bool · Default: false
Whether to attach the PDF to the email. See PDF settings for generating the PDF.
Type: bool · Default: true
Whether the list editing screen displays its information tab.
Control Panel
You can also manage configuration settings through the Control Panel by visiting Settings → Wishlist.