mediarox/module-checkout-placeholder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mediarox/module-checkout-placeholder

Composer 安装命令:

composer require mediarox/module-checkout-placeholder

包简介

Show placeholders instead of labels at common checkout field's (incl. required entry mark).

README 文档

README

Description

This module is designed to visually change all field pairs (label + field) so that the label is placed inside the field (As HTML Placeholder incl. "required-entry" mark "*"). Additionally, you can decide if you want to hide labels, define a custom required mark, hide required marks, customize placeholder text and mark fields as optional.

Good to know

Most of the fields in the checkout are collected via PHP and rendered dynamically via templates. For example, all input fields via the template vendor/magento/module-ui/view/frontend/web/templates/form/element/input.html. For all these dynamic fields we have created a LayoutProcessor that provides the features described below.

However, there are also fields that cannot be influenced via a LayoutProcessor. In a standard checkout these would be the fields:

  • email
  • password
  • password confirmation (if available)

These fields are created together in the knockout template Magento_Checkout/template/form/element/email and are also not prepared for HTML placeholders by default. For these fields we provide at the moment only knockout templates overrides, which ensure that always (after installation) the label is used as a placeholder. Including the static required mark "*".

As soon as time or a customer order allows, we would provide these fields with full features as well.

Features

  • display field label as placeholder
  • customize placeholder text
  • hide labels
  • define a custom required mark
  • hide required mark
  • mark fields as optional

Installation

composer require mediarox/module-checkout-placeholder
bin/magento setup:upgrade

Configuration

STORES > Configuration > MEDIAROX > Checkout Placeholder

General

Enable

Enables the module. After activation, the field placeholders are filled with the label by default.

  • path: checkout_placeholder/general/enable
  • default: 0

Hide Labels

Enable this setting to hide labels.

  • path: checkout_placeholder/general/hide_labels
  • default: 0

Show Required Mark

Enable to display required marks.

  • path: checkout_placeholder/general/enable_required_mark
  • default: 1

Custom Required Mark

If you want to display a custom required mark enter it here.

  • path: checkout_placeholder/general/custom_required_mark
  • default: '*'
  • depends on: checkout_placeholder/general/enable_required_mark = 1

Specific Fields

To override placeholder content (label text) for specific fields enter the field_id and placeholder you want to display. If you need to customize a field that is used in multiple fieldsets (e.g. firstname is available in billing & shipping address) enter an additional, unique fieldset id (e.g. billing-address: 'form-fields', shipping-address: 'shipping-address-fieldset'). For street fields use the field_ids street_0, street_1 and street_2.

  • path: checkout_placeholder/general/specific_fields
  • default: ''

Optional Fields

Enable:

If enabled a custom optional mark will be applied to fields configured in Optional Fields.

  • path: checkout_placeholder/optional_marks/enable
  • default: 0

Optional Mark:

Enter your optional text/mark that you want to display here.

  • path: checkout_placeholder/optional_marks/custom_optional_mark
  • default: ''

Mark Fields As Optional:

Specify the fields you want to display an optional mark for here. If you need to customize a field that is used in multiple fieldsets (e.g. firstname is available in billing & shipping address) enter an additional, unique fieldset id (e.g. billing-address: 'form-fields', shipping-address: 'shipping-address-fieldset'). For street fields use the field_ids street_0, street_1 and street_2.

  • path: checkout_placeholder/optional_marks/optional_fields
  • default: ''

Compatible with

Wiki

Before

without_extension

After

with_extension

mediarox/module-checkout-placeholder 适用场景与选型建议

mediarox/module-checkout-placeholder 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 1.51k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2021 年 11 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mediarox/module-checkout-placeholder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mediarox/module-checkout-placeholder 我们能提供哪些服务?
定制开发 / 二次开发

基于 mediarox/module-checkout-placeholder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.51k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 1
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-22