定制 gardenlawn/core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gardenlawn/core

Composer 安装命令:

composer require gardenlawn/core

包简介

Core

README 文档

README

This document provides an overview of the GardenLawn Core module.

Directory Structure

  • Api: Interfaces for the module.
  • Block: Block classes.
  • Configs: Configuration related files.
  • Console: Console commands.
  • Controller: Controller actions.
  • Cron: Cron jobs.
  • Helper: Helper classes.
  • Model: Models and resource models.
  • Observer: Event observers.
  • Plugin: Plugins (Interceptors).
  • Scripts: Utility scripts.
  • Setup: Database setup scripts.
  • Utils: Utility classes.
  • ViewModel: View models.
  • etc: Configuration files.
  • files: Miscellaneous files.
  • view: Layouts and templates.

Overview

This module serves as the core foundation for the GardenLawn project, providing shared functionality, utilities, and base configurations.

GardenLawn Core Module (Console Commands)

This module provides core functionalities for the GardenLawn Magento 2 project.

Console Commands

This document lists all custom console commands available in the GardenLawn modules.

Core Module (GardenLawn/Core)

Sync Static Assets to S3

Synchronizes static assets for specific themes with the configured S3 bucket.

Usage:

bin/magento gardenlawn:s3:sync-static <theme>...

Arguments:

  • theme: (Required, array) The theme(s) to synchronize (e.g., Magento/luma GardenLawn/theme).

Sync Dealer Prices

Synchronizes the dealer_price (EUR) attribute with native Tier Prices for B2B customer groups, converting the price to the store's base currency (PLN). After running, reindex the price indexer.

Usage:

bin/magento gardenlawn:dealer:sync-prices
bin/magento indexer:reindex catalog_product_price

This command has no arguments or options.

Company Module (GardenLawn/Company)

Import Dealers

Imports dealer data from JSON files (stihl.json, husqvarna.json) located in GardenLawn/Core/Configs/. It updates existing records based on name and customer group or creates new ones.

Usage:

bin/magento gardenlawn:import:dealers

This command has no arguments or options.

MediaGallery Module (GardenLawn/MediaGallery)

Sync S3 Assets

Synchronizes AWS S3 assets with the media_gallery_asset table.

Usage:

bin/magento gardenlawn:mediagallery:sync-s3 [options]

Options:

  • --dry-run: Do not modify the database, only show what would be done.
  • --with-delete: Enable deletion of database assets that are no longer in S3.
  • --force-update: Force update of existing assets if hash/width/height is missing or hash has changed.

Populate Asset Links

Creates galleries from folder paths, links assets, and optionally prunes old galleries.

Usage:

bin/magento gardenlawn:mediagallery:populate-all [options]

Options:

  • --dry-run: Do not modify the database, only show what would be done.
  • --with-prune: Enable pruning of galleries that no longer have corresponding asset paths.

Convert Images to WebP

Converts images in the media gallery to the WebP format, creates thumbnails, and cleans up legacy files.

Usage:

bin/magento gardenlawn:gallery:convert-to-webp [options]

Options:

  • -f, --force: Force regeneration of existing WebP files and thumbnails, and refreshes metadata for original WebP files.

Deduplicate Assets

Finds and removes duplicate assets (files with the same path) from the media_gallery_asset table.

Usage:

bin/magento gardenlawn:mediagallery:deduplicate-assets [options]

Options:

  • --dry-run: Do not modify the database, only show what would be done.

统计信息

  • 总下载量: 146
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-11-12