Classes in the content reach the storefront and the assistant learns to read
Tailwind classes typed in the content now show on the storefront, the admin assistant reads the store guide before it answers and cart rules look at the right address: the roundup from 21 to 28 October.
A big week. The largest piece of work is an editor that stops letting people write blind: Tailwind classes typed in the content reach the storefront, and the code is checked while it is written. Around it, the admin assistant learns to read the store guide, cart rules look at the shipping address again and the terminal commands grow.
Highlights
- Tailwind classes in the content now reach the storefront
- The assistant reads the store guide
- Cart rules look at the right address again
- Customers and addresses from the command line
- Variant prices in the feeds
- URLs with spaces and a passkey that no longer locks the door
- Also this week
- Changelog
Tailwind classes in the content now reach the storefront
The biggest pull request of the week is #1611 by fballiano, merged on 26 October. Tailwind and DaisyUI classes typed in a CMS page, a block, a blog post, a widget, a variable, a checkout agreement, the footer fields of the theme or a product and category description enter the stylesheet of the theme, so they show on the storefront. Before, the CSS held only the classes of the templates and the short list declared by hand in the source.
The mechanism, in one sentence: the classes are collected from the content stored in the database and the theme stylesheet is compiled into a copy that the storefront loads in place of the original. The editor also gets a Source button, which shows the HTML in a code editor, completes the available classes and flags the ones that the storefront does not use.
Two things to know before upgrading, from the description of the pull request: on a server where the
Tailwind CLI exists the cron prepares the copy within 15 minutes of the upgrade, and the Show or Hide
Editor button under content fields is gone. Maho now requires mahocommerce/maho-composer-plugin 5.2.
The full story, with the figures and the declared limits, is in Tailwind classes typed in the content now reach the storefront.
The assistant reads the store guide
The admin assistant answered questions about how a feature works by inventing the answer. In #1630 the same answer, about showing a photo as the swatch of a colour, was invented five times in a row. With #1639 by fballiano the assistant reads the user guide before it answers. The guide, the developer docs, the API docs and the hosting docs now live in the repository, next to the code: each module ships its own pages, a disabled module hides them, and each store reads the pages of its own release.
In the same line of work, #1648 moves next to each module the pages that describe it, with a new category for the API, so the documentation no longer piles up in the shared folder.
The next step measures the answers. #1661 by fballiano brings a benchmark of 49 questions on the areas that the pull request fixes, that is swatches, catalog rules, settings and content, orders: on the same questions Haiku 5.5 goes from 49% to 78% correct or honest answers, and Sonnet 5.5 from 76% to 94%. The model now knows the offset of the store timezone and each offset change of the last year, so a time written by the administrator becomes UTC as it should, and it knows the locale of each store view. An action that clicks a button, such as Save or Submit, waits for the confirmation of the administrator as a write does.
Cart rules look at the right address again
#1669 by hirale fixes three calculation problems that held each other up. A cart rule with free shipping for “shipment with matching items” no longer gave free shipping at checkout, and a condition such as “Subtotal equals or greater than” was checked against the billing address, which has no items. The cause is in #1620, which removed the nominal totals and left the validator on the wrong address while the shipping address is collected. With the right address, the third defect showed: free shipping runs before the shipping total collects the weight, so a total weight condition was checked against the cart of a previous pass, and a quantity change gave a wrong discount or free shipping.
Customers and addresses from the command line
The ./maho commands for admin users and customers now take their values as arguments, so a script can
run each one in a single line; a missing value opens the question in the terminal as before, and with
-n the command asks nothing. That is
#1651 by
fballiano, which also adds
the customer group to customer:create and the commands to create, list and delete customer groups.
# a new customer group, then a customer of the base website that uses it
./maho customer:group:create wholesale 3
./maho customer:create [email protected] "$PASSWORD" Mario Rossi base wholesale
Again by fballiano,
#1664
brings the address commands: customer:address:create, customer:address:list and
customer:address:delete. The first address of a customer becomes the default billing and shipping
address, and --default-billing and --default-shipping move the choice to a later address. The data
goes through the same checks of the admin form, so a required customer attribute is asked for or
refused by the terminal too.
Variant prices in the feeds
A feed that exports the children of a configurable product sent the price of the child for each variant, and checkout never charges that price: the customer pays the price of the parent plus the option prices of the chosen values. With #1643 by fballiano the feed writes price, final price, regular price and special price as checkout computes them, with the catalog price rules and the special price dates of the parent. The reason is practical: Google Merchant Center and the other platforms can disapprove an item whose price does not match the product page. The default mappings need no change, and the fix is backported to the 26.9 line with #1646.
URLs with spaces and a passkey that no longer locks the door
#1673 by fballiano makes Maho read a URL the way a browser does. Before, the image of a product through the REST API and the link of a downloadable product left with the raw bytes, so a space broke the request line and a control character became an underscore. Now a space and a character that is not ASCII are encoded, a Unicode host becomes punycode, and a URL with a control character is refused. When a product is saved, the admin, the REST API and SOAP refuse a link or a sample that is not a valid http or https URL.
Admin sign-in with a passkey had broken in an annoying way: the authenticator confirmed the user in the browser and the login page came back with an error, and since registering a passkey turns off password sign-in the account stayed locked out. #1640 by empiricompany, the organisation MageMEGA publishes its open source projects under, now opens the dashboard as soon as the authenticator confirms the user, asks for the 2FA code when it is needed and keeps the normal error message when a passkey is used without a login started. This one is backported to the 26.9 line too, with #1645.
Also this week
In the admin, the closed submenus of the main navigation are no longer reachable with the Tab key and are no longer read out by screen readers (#1666), the boxes under a heading of the attribute, custom option and bundle tabs are one card again (#1647), and the line under an attribute name on the product page ends at the right height when the value has many lines (#1657). On the category page the two “View as” buttons show their icons only, at the same size (#1660).
On the data and API side, the import of attribute options saves the options also with the Configurable Swatches module disabled (#1672), the layered navigation filters of the API answer instead of failing with a 500 error with the same module disabled (#1670), and the CMS page chosen as the 404 page no longer opens with a 200 status at its own URL (#1653), with the endless forward loop closed right after (#1654).
Changelog
- #1673 REST API image URLs and downloadable links with a space or a character that is not ASCII, by fballiano.
- #1672 import of attribute options with the Configurable Swatches module disabled, by hirale.
- #1671 backport to 26.9 of the layered navigation filters, by github-actions[bot].
- #1670 API layered navigation filters with the Configurable Swatches module disabled, by hirale.
- #1669 free shipping and cart rule conditions on the shipping address, by hirale.
- #1666 closed submenus of the admin navigation out of the Tab order, by empiricompany.
- #1664 commands to create, list and delete the addresses of a customer, by fballiano.
- #1662 backport to 26.9 of the “View as” buttons of the category page, by github-actions[bot].
- #1661 admin assistant answers with a benchmark that measures them, by fballiano.
- #1660 “View as” buttons of the category page with their icons only, by fballiano.
- #1658 backport to 26.9 of the line under an attribute name, by github-actions[bot].
- #1657 line under an attribute name on the product page when the value has many lines, by fballiano.
- #1654 404 page failing with a forward loop at its own URL, by fballiano.
- #1653 CMS 404 page opening with a 200 status at its own URL, by fballiano.
- #1651 command-line arguments for the admin user and customer commands, the customer group in
customer:createand commands for customer groups, by fballiano. - #1648 docs next to the modules that they describe, with the new category for the API, by fballiano.
- #1647 boxes under a heading that looked like two cards on the attribute, option and bundle tabs, by fballiano.
- #1646 backport to 26.9 of the variant prices in the feeds, by github-actions[bot].
- #1645 backport to 26.9 of the passkey sign-in, by github-actions[bot].
- #1644 browser tests in CI running out of time with a slow Ubuntu package mirror, by fballiano.
- #1643 variant prices in the feeds as checkout charges them, by fballiano.
- #1640 admin sign-in with a passkey failing after the authenticator confirms the user, by empiricompany.
- #1639 user guide read by the assistant and the docs of mahocommerce.com in the repository, by fballiano.
- #1611 Tailwind and DaisyUI classes in CMS and catalog content, with the code editor that completes the classes, by fballiano.
Editor's note.Text prepared with the help of AI and checked against the source before publication. It can still contain mistakes: if you find one, report it.Read the manifesto
Does your store still sell?
Tell us where you are starting from: we reply with a first assessment, no strings attached.
Ask for the store assessment