Wishlist Configuration in 1C-Bitrix
Wishlist and favorites list are different functions, though often confused. Favorites — customer wants to return to product later. Wishlist — customer wants to purchase specific product that's currently unavailable and get notification when it appears. Both require custom implementation or modules in Bitrix.
Difference Between Wishlist and Stock Notifications
- Wishlist — list of customer's desired products, public or private, not necessarily linked to availability
- Stock notification — specific subscription for specific product, when quantity = 0
In practice wishlist is often implemented as extended favorites with ability to share list and add it to order in one click.
Implementation via Custom Fields
To store wishlist you can use user custom field type "Infoblock Element":
Settings → Users → User Settings → Add Field → List of Infoblock Elements (multiple)
This solution without additional tables, but limited in functionality: no add date, sorting, notes on products.
Custom Implementation
For full-featured wishlist — separate table and component:
CREATE TABLE user_wishlist (
ID SERIAL PRIMARY KEY,
USER_ID INT NOT NULL,
PRODUCT_ID INT NOT NULL,
NOTE TEXT,
DATE_ADD TIMESTAMP DEFAULT NOW(),
IS_PUBLIC BOOLEAN DEFAULT FALSE,
HASH VARCHAR(32), -- for public wishlist link
UNIQUE(USER_ID, PRODUCT_ID)
);
Public link to wishlist (/wishlist/?hash=abc123) allows customer to share list with others — popular feature for gift lists.
AJAX API for List Management
Wishlist operations implemented as AJAX endpoints:
// Controller: /local/components/my/wishlist/ajax.php
if (check_bitrix_sessid()) {
$action = $_POST['action'];
$productId = (int)$_POST['product_id'];
if ($action === 'add') {
WishlistTable::add([
'USER_ID' => $GLOBALS['USER']->GetID(),
'PRODUCT_ID' => $productId,
]);
}
}
Connection with Order
"Add entire list to cart" button — iterates through wishlist products and adds via \Bitrix\Sale\Basket. Need to consider: some products may be unavailable, others may have insufficient stock.
Timeframe
Basic wishlist without public links — 1 business day. Full-featured list with public links, product notes and cart addition — 2–3 business days.







