Install
Works with Drupal: ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
51.46 KB
MD5: ebaba9da83026a6fc08991e0b9bd70d8
SHA-1: dcd61b8218e61aa21318b4f90cd5cf019277aee9
SHA-256: 591a94fe20aa6ad6e6fc22d95051765ce52b6421e3b57f86d3d697290e5adb72
Download zip
86.19 KB
MD5: 8e303a6e6e8afbde9caa3e3f1be90704
SHA-1: f2c117b4ca3208034e8cb03581157d2354713599
SHA-256: 3251ee8bee03f0ef76e705dfc5e988b19ed330af464e8eff07da39661d3d6235
Release notes
This release prepares Basic Cart for Drupal 12, adds new order tokens and fixes several smaller issues. It contains two database updates, so run drush updatedb (or /update.php) after updating. Existing sites keep their current behaviour.
Behaviour changes
- "Add to cart" button can stay visible (opt-in). A new setting, Keep the "Add to cart" button visible, is under Configuration » Basic Cart » Settings. When it's on, the "Added to cart" message appears next to the button (in a new
.basic-cart-success-messageelement), instead of replacing the button until the page is reloaded.- Existing sites: the update turns this setting off, so nothing changes until you enable it.
- New installs: the setting is on by default.
- With the setting on, an empty "Added to cart" message shows no message at all.
- Add to cart button background. basic_cart.css no longer sets
background: noneon the add to cart link. Background colours from your theme, or from classes set in the formatter's "Add to cart button class (css)" setting, now show up.
New features
- New order tokens:
[basic_cart_order:basic_cart_address],[basic_cart_order:basic_cart_city]and[basic_cart_order:basic_cart_zipcode]for the order notification emails. - The "Name" label on the checkout form is now translated with the context "Personal name". The update copies your existing translations of "Name" to the new context, so the label stays translated.
Fixes
- Empty lines and surrounding whitespace in the administrator email list are ignored.
Drupal 12 readiness
- Hook implementations moved to an OOP hook class (
src/Hook/BasicCartHooks.php).#[LegacyHook]wrappers keep Drupal 10 support.
Database updates
basic_cart_update_10008: keeps the previous "Added to cart" behaviour on existing sites.basic_cart_update_10009: copies existing "Name" translations to the "Personal name" context. It only runs if the Interface Translation module is enabled.
Issues
- #3595776 Automated Drupal 12 compatibility fixes
- #3182501 Trim empty lines in Administrator emails
- #3557070 Keep the "Add to cart" button and show the message separately
- #3188741 Add context "Personal name" for label "Name" on checkout form
- #3195224 Add Basic Cart order Address, City and ZipCode token replacements
- #3066819 basic_cart.css overrides the background of the add to cart button
Contributors
aayush7, harjyottkaurr, superman369, Project Update Bot, normanlol