Appearance
<div style="display: none;" hidden="true" aria-hidden="true">Are you an LLM? You can read better optimized documentation at /changelog/Changelog.4.131.md for this page in Markdown format</div>
Version 4
version 4.131
- [4.131.0] fix(checkout): cash on delivery is refused when the customer picks a BOX NOW locker with Courier Center, also when the shop offers both home delivery and lockers ("All"). Courier Center confirmed BOX NOW takes prepaid parcels only; home delivery with Courier Center keeps cash on delivery
- [4.131.0] feat(services-bar): show a "Maintenance Support Ώρες : 8/10" pill in the admin services bar with the share of the month's maintenance allowance already spent on the client's bugs & maintenance project, linking to that report on services and turning red once the allowance is passed
- [4.131.0] fix(settings): restrict secret-holding and Advisable-only admin settings to Advisable sessions (#1054)
settings/only_advisable,settings/xml_feeds_settings,settings/ai_content_generation_promptsandsettings/ai_content_generation_settingsnow return 401 for any non-Advisable session (GET and POST). They hold secrets (services API key, Matomo token, feed tokens, and the OpenAI API key, which the last page printed in a plain-text input), and the menu already showed them to Advisable only. Every other settings page keeps the Advisable + Admin gate.- Fields now written only by Advisable sessions, on top of the page refusals above:
settings(general):PRICE_TRACK.ENABLED_GRAPH(postenablePriceTrackGraph).settings/ai_content_generation_settings: the 17AI_CONTENT_GENERATION_PROVIDER_OPEN_AIkeysIS_ENABLED,API_KEY,COMPLETIONS_API_URL,TIMEOUT,MODEL,SUFFIX,MAX_TOKENS,TEMPERATURE,TOP_P,N,STREAM,LOGPROBS,ECHO,STOP,PRESENCE_PENALTY,FREQUENCY_PENALTY,BEST_OF.settings/plus_settings(Plus general settings; Admin keeps access to the page): 19 post fields, aspost field= registry key:smart_recommendations_customer_tag=SMART_RECOMMENDATIONS.IS_ENABLED_CUSTOMER_TAGadvisableAIShowAdminDashboard=ADVISABLE_AI.SHOW_ADMIN_DASHBOARDrelatedEnabled=RELATED_RECOMMENDATIONS.ENABLEDhomeRecommendationsEnabled,afterAddToCartRecommendationsEnabled,productPageComboEnabled,cartRecommendationsEnabled=ECOMMERCEN_PLUS.HOME_RECOMMENDATIONS_ENABLED,AFTER_ADD_TO_CART_RECOMMENDATIONS_ENABLED,PRODUCT_PAGE_COMBO_ENABLED,CART_RECOMMENDATIONS_ENABLEDadvisableAiEnabled=ADVISABLE_AI.ENABLED;advisableAiFeedEnabled=XML_FEEDS.IS_ENABLED_ADVISABLE_AIadvisableAiUri=ADVISABLE_AI.BASE_URI;advisableAiVersion=VERSION;advisableAiFbtDates=FBT_DAYS;advisableAiCustomerMaxProducts=CUSTOMER_MAX_PRODUCTS;advisableAiTimeout=TIMEOUT;advisableAiConnectTimeout=CONNECT_TIMEOUT;advisableAiAppId=APP_ID;advisableAiAppSecret=APP_SECRET(allADVISABLE_AI)advisableAiAdmin=ADVISABLE_AI.USERNAMEandadvisableAiAdminSecret=ADVISABLE_AI.PASSWORD(development environment only)
- Admin still writes
smart_recommendations_based_on_cartandsmart_recommendations_last_seenon the Plus page.
- On the Plus page the two secrets (
advisableAiAppSecret,advisableAiAdminSecret) are no longer sent to non-Advisable sessions:getAiValues()returns an empty string for them and does not read them from the registry, so an Admin no longer gets the decrypted values in the form HTML. - Before, an Admin's Save wiped these fields (browsers do not post disabled fields) and an Admin could hand-post values.
- Any non-public method of the settings controller now answers 404 when requested by URL (
/settings/<name>). Before,Adv_admin_controller::_remap()ran protected helpers by URL (CodeIgniter skips its public-only check when a controller has_remap(), and CSRF is off), e.g.GET /settings/saveCustomerNotificationSettingswiped the customer notification settings, and the newsaveAiContentGenerationOpenAiSettings()/savePriceTrackGraphSetting()helpers would have let a link wipe the OpenAI keys or switch the price-track graph off. The routesettings/saveMailchimpConfiguration/...(application/config/routes.php:216) now 404s; it pointed at a protected method that needs an argument, so it never worked.
Notes
- [4.131.0] Why: "Allow cash on delivery for lockers" (
DELIVERY_OPTION) only took effect in "Pick up" mode, so under "All" a customer could choose a locker and pay cash on delivery, and the shipment would be created for a locker with a COD amount BOX NOW does not accept.CashOnDeliveryPolicynow treats a selected smart point of aCENTERtransporter as cash-on-delivery-free unlessDELIVERY_OPTIONis ticked. Other carriers (BoxNow, ACS, Skroutz) are unchanged. - [4.131.0] Where it is enforced: the storefront (
getIsCodRefusedForLockergetter; the payment option is disabled and a selected "cash on delivery" switches to the first other payment method when a locker is picked), the legacy checkout validationAdv_order::paywayTransporterCheckValidation()(postedsmartPointJsonData) and the REST place-order (transporterExternalData.shopId).POST /rest/checkout/shippingstill publishescodAllowedper transporter, which cannot know about a locker pick yet. - [4.131.0] Ops: nothing to change in the shop settings; leave "Allow cash on delivery for lockers" unticked. Ticking it lifts the refusal.
- [4.131.0] Check for overrides: a fork that overrides
Adv_order::paywayTransporterCheckValidation()or copiesassets/vue/mixins/checkoutPage.js/assets/vue/store/getters.jskeeps the old behaviour. Signatures that changed:Advisable\Domains\Checkout\CashOnDeliveryPolicy::__construct()now requires a secondTransporterRepositoryargument (a fork that builds the policy by hand breaks; the DI container autowires it);CashOnDeliveryPolicy::permits(),allowsPayway()andallowsCashOnDelivery()gained a trailing optional locker parameter;AdvTransporters::isCashOnDeliveryAllowed($transporterId, bool $lockerSelected = false)gained a trailing optional parameter, so a fork override with the old one-argument signature fails with a PHP signature-compatibility error. The storefront change takes effect afternpm run production. - [4.131.0] UI Update: the admin services bar gains a pill left of the extra support button. It is drawn only for customers whose monthly Maintenance Support allowance is filled in on services; everyone else sees the bar unchanged.
- [4.131.0] REQUIRES
npm run all-production: the services-bar pill ships in the admin bundles, and the Courier Center locker rule (cash on delivery switched off when a locker is picked) ships in the storefront bundle. - [4.131.0] Check for overrides:
AdvisableServicesJsonState::__construct()— gained a twelfth parameter,array $maintenanceHours = []. Every setter on the class threads it through, and the property defaults to[]because instances are cached serialized and payloads cached before this change arrive without it. - [4.131.0] The figures come from a new member of the services customer aggregate,
/api/services/customer/maintenance_hours/consumed, served by the services application.Adv_advisable_servicestreats that member as optional, so a services installation that does not serve it yet, or fails on it, leaves the pill out instead of taking the whole bar down the way an error in any other member still does. - [4.131.0] Check for overrides:
Adv_settings::_remap()now enforces the newprotected function advisableOnlyActions(): array; new protected methodssavePriceTrackGraphSetting()andsaveAiContentGenerationOpenAiSettings()onAdv_settings, andisAdvisableSession()onAdvGeneralSettings.- Forks overriding
index()(Discount, Gea, Services) need no change — they callparent::index(); only a fork whoseindex()writesPRICE_TRACK.ENABLED_GRAPHitself must callsavePriceTrackGraphSetting()instead (none does today). - Forks overriding
only_advisable()(Flioukas) orxml_feeds_settings()(Discount, Gea, Heals, Pharm16, Pharmacythess, Smile) need no port:_remap()covers them, and their Admin users now get 401 on those pages. No fork overridesai_content_generation_settings(),ai_content_generation_prompts()or anyAdvGeneralSettingsmethod (every fork'sGeneral_settingsis an empty subclass). A fork that does overrideAdvGeneralSettings::getAiValues()or anupdate*Values()method must keep theisAdvisableSession()checks. - A fork that overrides
advisableOnlyActions()must merge witharray_merge(parent::advisableOnlyActions(), [...]), or it loses the refusals. A fork that defines its own_remap()inSettingsmust callparent::_remap(). isNonPublicAction()is new onAdv_settings. A forkSettingsclass that needs a method reachable by URL must make it public (no fork links to a protected settings method today, checked on every fork's HEAD). The same dispatch problem inAdv_admin_controllerfor other admin controllers is a separate follow-up and not fixed here.- Forks that override the views (
application/views/admin/settings/*.php,application/views/admin/plus/general_settings.php) need no change: the fix is in the save code. On the Plus page the two secret inputs now render empty for Admin.
- Forks overriding