Choosing the Right Wishlist Architecture for 1С-Битрикс
Imagine: a product with a 4.8 rating and 200 reviews is out of stock. The buyer is ready to purchase but cannot. They leave to competitors, and you lose not only that sale but future orders as well. With a properly configured wishlist, this customer leaves a request and receives a notification when the product is back in stock. We have implemented such a mechanism for over 50 Bitrix stores — and the average conversion from notification to purchase was 15–20%. According to our data, 70% of users who add to wishlist return within 30 days, and the average order value from wishlist purchases is $85. In this article, we will analyze how to design a wishlist that actually works.
Wishlist vs Notifications: Different Functions
Wishlist and notifications are different functions, although they are often confused. Custom table and user fields are two main approaches. The back-in-stock notification is a subscription to a specific product with zero stock. In practice, a wishlist often combines both scenarios: the buyer adds a product to the list and automatically subscribes to a notification when stock becomes positive.
User Fields vs Custom Table: A Practical Comparison
The choice depends on the required functionality. Let's compare the two approaches:
| Criteria | User Field | Custom Table |
|---|---|---|
| Implementation speed | 10 minutes | 1–2 hours |
| Addition date | No | Yes (DATE_ADD) |
| Sorting | No | Any |
| Notes for products | No | Yes (NOTE field) |
| Public link | No | Yes (HASH field) |
| Performance with 1000+ records | Average | High (indexes) — 5x faster |
Custom implementation offers 10 times more flexibility than user fields. It is the standard for serious projects — especially if public links, notes, or integration with the cart are needed.
Custom Table with Public Links and Architecture
A public link is one of the most sought-after features. It allows the buyer to share the list with friends or use it as a gift list. In the custom table, add a HASH field with a unique value (e.g., MD5 of the ID). The link has the form /wishlist/?hash=abc123. Viewing the list is available without authorization. Important: the hash is randomly generated so no one can guess someone else's list. For a full-featured wishlist, create a separate table:
Show SQL
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), UNIQUE(USER_ID, PRODUCT_ID) ); Indexes on USER_ID and PRODUCT_ID speed up queries. The NOTE field allows the buyer to leave a note (e.g., "birthday gift"). The HASH field is for the public link. You can also add a field to store the selected price, if prices change. In our tests, this table handles 10,000 records in 0.5 seconds with proper indexing.
AJAX API for Managing the Wishlist
Operations with the wishlist are implemented as AJAX endpoints. We use Bitrix\Main\Engine\Controller for REST-like methods:
// 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, ]); } // ... remove, list, toggle } The add, remove, list, toggle methods cover typical scenarios. Important: add tagged caching to reduce database load on frequent requests. The API can handle 1000 requests per minute without caching.
Integration with Cart and Order
The "Add entire list to cart" button iterates over wishlist items and adds them via \Bitrix\Sale\Basket. It is necessary to consider: some products may be unavailable, others may have insufficient stock. We handle these cases with clear messages — for example: "Product 'Headphones' is unavailable, remove it from the list." Also implement bulk addition with rights and stock checks.
Implementation Plan and Pricing
- Analysis — study the current architecture, load, and publicity requirements.
- Choice of approach — user fields or custom table.
- Design — database schema, API, indexes.
- Development — component 2.0, AJAX controller, templates.
- Testing — load testing with 1000+ records, caching verification.
- Documentation and deployment — API description, operating instructions, warranty support for one month.
Basic wishlist without public links — $500 (1 business day). Full-featured wishlist with public links, notes, and cart integration — $1500 (2–3 business days). The exact cost is calculated individually based on the complexity of the current architecture and the scope of customization. Contact us for a project assessment — we will prepare a commercial proposal within 1 day. Custom development is cost-effective compared to off-the-shelf modules.
Turnkey Development: What's Included
Each project includes: complete documentation, API description, admin panel access, 1 hour of training for your team, and one month of post-launch support (30 days). We also provide a warranty period of 30 days for bug fixes.







