code4business/freeproduct2 问题修复 & 功能扩展

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

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

code4business/freeproduct2

Composer 安装命令:

composer require code4business/freeproduct2

包简介

Adds a sales rule action to add a product to cart. Can be used to create sales rules to add gifts to cart.

README 文档

README

An extension that allows configuring sales rules to add free products to cart. This is the Magento 2 version of the same extension that can be found here. The development and the function of the original Magento1 extension is described in the following two websites:

Contributors

This repository is not run by code4business anymore, but Simon Sprankel and Ole Schäfer of CustomGento stepped up to keep freeproduct alive.

Requirements

  • PHP 7.4, PHP >= 8.1
  • Magento >= 2.4.3-p1

Generally the last full release -1 version is tested and made to work. Older versions are not actively supported.

Supported Product Types

The extension only supports simple and virtual product types, other types or custom options are not supported. The reason is that other product types need additional information that can only be added with IDs. This leads to a way more complicated module; we want to keep this module clean and easy.

Instalation

Go to the Magento 2 root directory and run the following commands in the shell:

composer require code4business/freeproduct2
bin/magento module:enable C4B_FreeProduct
bin/magento setup:upgrade

Configuration

Sales rules for carts are configured in Marketing->Cart Price Rules:

  • In the Actions tab, the Apply field should be set to Add a Gift
  • Gift SKU: Product that will be added. Only simple and virtual products without (required) custom options are supported. Multiple comma-separated SKUs can be specified
  • Discount Amount: The qty of added gifts
  • The gift item is added once for the whole cart

Action Add a Gift (for each cart item) works similarly but will add the gift item for each product in cart. The qty of said product is also taken into consideration.

This action usually needs conditions to match only specific items (Apply the rule only to cart items matching the following conditions).

Limitations:

  • Gift products are added during discount total processing, after subtotal and shipping totals. Because of that gift products will not be included in any shipping calculations.
  • Only simple and virtual products without required custom options are supported.

Current localizations:

  • de_DE
  • es_ES
  • fr_FR
  • nl_NL
  • pt_PT
  • sl_SI

License

Open Software Licence 3.0 (OSL-3.0)

code4business/freeproduct2 适用场景与选型建议

code4business/freeproduct2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 174.55k 次下载、GitHub Stars 达 66, 最近一次更新时间为 2018 年 01 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「magento2」 「gift sales rule」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 174.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 66
  • 点击次数: 29
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 66
  • Watchers: 9
  • Forks: 31
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2018-01-08