magenerds/baseprice 问题修复 & 功能扩展

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

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

magenerds/baseprice

Composer 安装命令:

composer require magenerds/baseprice

包简介

This module displays base prices

README 文档

README

With this extension you can show the base price of volume products to your customers.
If you have products which you sell in amounts and units this extension can calculate the base price.
The extension installs the following basic units and its conversions:

  • kg
  • g
  • mg
  • l
  • ml
  • m
  • cm
  • mm

You can also extend the units and edit all conversions. Furthermore the display of the base price is editable. This extension also works for configurable products if you provide the necessary information for the configurable’s simple products.

Extension installation

The easiest way to install the Magenerds module is via composer

# add to composer require
composer require magenerds/baseprice

# run magento setup to activate the module
bin/magento set:up

Extension activation

At any time you can enable and disable this extension in the system configuration.
You can do this by opening the backend menu Stores > Configuration.
There you will find the entry Magenerds > Base Price.
After clicking on it you see a dropdown box where you can enable/disable the module. Save the configuration and delete the cache.

BasePrice-Activation

Extension configuration

The extension can be configured if you go to Stores > Configuration and afterwards to Magenerds > Base Price.
After enabling the extension you can edit the base price template in order to influence the base price rendering in the frontend. You can type in whatever you want.
There are three variables available to render the base price information:

  • {BASE_PRICE}: Renders the calculated base price
  • {REF_AMOUNT}: Renders the reference amount
  • {REF_UNIT}: Renders the reference unit

Example: {BASE__PRICE} / {REF__AMOUNT} {REF__UNIT} will render to 2.90€ / 10 kg in the frontend.

BasePrice-Template

The extension install basic units and its conversions. But you can edit these conversions, delete the units or extend it with further units and its conversions.
Just click on Add below all those conversions in order to add another unit row. You define the product unit on the left side and the reference unit (the unit which the price will be calculated to) on the right side.

BasePrice-Mapping

How to use

Every product needs detailed information about the base price calculation. There are four attributes which every product has:

  • Product amount: Select the amount the product gets selled with quantity 1
  • Product unit: Select the unit the product gets selled with
  • Reference amount: Select the reference amount the product price has to be calculated with
  • Reference unit: Select the reference unit the product price has to be calculated with

Example: You have a product which is a bottle of milk which is 100 ml of size. It costs 2 €.
You want to display the price of milk for 1 l which is 20 €.
Therefore you have to configure your product like the following:

  • Product amount: 100
  • Product unit: ml
  • Reference amount: 1
  • Reference unit: l

You can configure the attributes in a product edit mask under the tab Base Price on the left side.

BasePrice-Usage

magenerds/baseprice 适用场景与选型建议

magenerds/baseprice 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 112.79k 次下载、GitHub Stars 达 40, 最近一次更新时间为 2017 年 02 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 magenerds/baseprice 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 112.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 40
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 40
  • Watchers: 14
  • Forks: 39
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2017-02-14