Token导航 LogoToken导航

Agent Skill · 前端设计

magento-multi-store(magento 多商店)

magento-multi-store 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

magento-multi-store 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 6,596。

总安装 485周安装 20GitHub Stars 19下载 158核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:magento-multi-store(magento 多商店)
来源仓库:https://github.com/finsilabs/awesome-ecommerce-skills
仓库路径:skills/magento-multi-store
安装命令:
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill magento-multi-store
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill magento-multi-store

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

magento-multi-store 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理时使用。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。该技能适用于 Magento 2 多商店配置与管理相关的开发协作场景。

来源仓库内路径:skills/magento-multi-store

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill mag…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

magento-multi-store 怎么安装?

在终端执行 npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill magento-multi…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

magento-multi-store 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

magento-multi-store 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

magento-multi-store 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

magento-multi-store 用的人多吗?

公开数据是累计安装 485 次,近一周安装 20 次,下载 158 次,GitHub 19 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

magento-multi-store 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
magento-multi-store

magento 多商店 · 本页

48519需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Magento Multi-Store Setup

Overview

Magento's multi-store architecture has three levels: Website → Store → Store View. A Website groups stores with a shared customer base and order flow. A Store (under a Website) has its own root category and URL structure. Store Views (under a Store) typically represent languages or locales. Configuration values can be set at Global, Website, or Store View scope — lower scopes override higher ones. Adobe Commerce (B2B) adds Shared Catalogs for per-company product/price visibility control.

When to Use This Skill

  • When running multiple brands or country-specific storefronts from a single Magento installation
  • When setting different base currencies, tax configurations, or payment methods per website
  • When creating a B2B portal alongside a B2C store with different product visibility
  • When implementing localized store views for multiple languages under the same product catalog
  • When configuring separate checkout flows, shipping methods, or payment gateways per website
  • When managing shared product catalog with website-specific pricing and visibility overrides

Core Instructions

  1. Create the Website → Store → Store View hierarchy Note: Core Magento does not ship bin/magento store:website:create, store:group:create, or store:store:create CLI commands. Create websites, stores, and store views either through Admin → Stores → All Stores or programmatically in PHP (shown below). Some third-party modules add CLI equivalents, but they are not part of the core. Via PHP programmatically (primary method): <?php // Create website via DataObject use Magento\Store\Model\Website; use Magento\Store\Model\Group; use Magento\Store\Model\Store; $website = $objectManager->create(Website::class); $website->setCode('uk_site') ->setName('UK Website') ->setDefaultGroupId(0) // Set after creating group ->save(); $storeGroup = $objectManager->create(Group::class); $storeGroup->setWebsiteId($website->getId()) ->setName('UK Store') ->setRootCategoryId(3) // Your UK root category ID ->save(); $storeView = $objectManager->create(Store::class); $storeView->setWebsiteId($website->getId()) ->setGroupId($storeGroup->getId()) ->setCode('uk_en') ->setName('UK English') ->setIsActive(1) ->save();
  2. Configure nginx for multi-website routing # /etc/nginx/sites-available/magento-multi-store.conf # Map host to Magento store code (MAGE_RUN_CODE + MAGE_RUN_TYPE) map $http_host $MAGE_RUN_CODE {hostnames; default ""; www.mystore.com ""; # Default (global config) uk.mystore.com uk_en; # UK store view de.mystore.com de_de; # German store view b2b.mystore.com b2b_en; # B2B website} map $http_host $MAGE_RUN_TYPE {hostnames; default ""; www.mystore.com ""; uk.mystore.com "store"; # Route to store view de.mystore.com "store"; b2b.mystore.com "website"; # Route to website (different customer base)} server {listen 443 ssl http2; server_name ~^(.+\.)?mystore\.com$; root /var/www/magento/pub; index index.php; location ~ \.php$ {fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE; fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE; include fastcgi_params;}}
  3. Set scoped configuration values Configuration can be set at global, website, or store view scope: # Set base URL per website bin/magento config:set --scope=websites --scope-code=uk_site web/secure/base_url "https://uk.mystore.com/" bin/magento config:set --scope=websites --scope-code=uk_site web/unsecure/base_url "https://uk.mystore.com/" # Set currency per website bin/magento config:set --scope=websites --scope-code=uk_site currency/options/base GBP bin/magento config:set --scope=websites --scope-code=uk_site currency/options/default GBP bin/magento config:set --scope=websites --scope-code=uk_site currency/options/allow "GBP,EUR" # Set locale per store view bin/magento config:set --scope=stores --scope-code=de_de general/locale/code de_DE bin/magento config:set --scope=stores --scope-code=de_de general/locale/timezone "Europe/Berlin" # Disable a payment method for specific website bin/magento config:set --scope=websites --scope-code=uk_site payment/checkmo/active 0 Programmatically in PHP: <?php use Magento\Framework\App\Config\Storage\WriterInterface; use Magento\Store\Model\ScopeInterface; class ScopeConfigManager {public function __construct(private readonly WriterInterface $configWriter, private readonly \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList) {} public function setScopedValue(string $path, mixed $value, string $scope, int $scopeId): void {$this->configWriter->save($path, $value, $scope, $scopeId); // Flush config cache after write $this->cacheTypeList->cleanType('config');} public function setWebsiteShippingOrigin(string $websiteCode, array $originData): void {$website = \Magento\Framework\App\ObjectManager::getInstance() ->create(\Magento\Store\Model\Website::class) ->load($websiteCode, 'code'); $this->setScopedValue('shipping/origin/country_id', $originData['country'], ScopeInterface::SCOPE_WEBSITES, (int)$website->getId());}}
  4. Manage website-specific product assignment and pricing Products can be assigned to specific websites while sharing the global catalog: <?php // Assign a product to specific websites use Magento\Catalog\Model\ResourceModel\Product as ProductResource; class ProductWebsiteAssignment {public function __construct(private readonly ProductResource $productResource, private readonly \Magento\Store\Model\StoreManagerInterface $storeManager) {} public function assignProductToWebsite(int $productId, string $websiteCode): void {$website = $this->storeManager->getWebsite($websiteCode); $this->productResource->websiteToProducts([['product_id' => $productId, 'website_id' => $website->getId()],]);} public function setWebsitePrice(int $productId, string $websiteCode, float $price): void {// Use tier prices with website scope for website-specific pricing $tierPriceResource = \Magento\Framework\App\ObjectManager::getInstance() ->create(\Magento\Catalog\Model\ResourceModel\Product\Attribute\Backend\Tierprice::class); // Or use price scope: Admin → Config → Catalog → Price → Catalog Price Scope = Website}} Enable website-scoped pricing: bin/magento config:set catalog/price/scope 1 # 0 = Global, 1 = Website bin/magento indexer:reindex catalog_product_price
  5. Configure Adobe Commerce B2B Shared Catalogs Shared Catalogs (B2B feature) allow per-company product and pricing visibility: <?php // Assign a company to a custom shared catalog use Magento\SharedCatalog\Api\SharedCatalogManagementInterface; use Magento\SharedCatalog\Api\Data\SharedCatalogInterface; class SharedCatalogManager {public function __construct(private readonly SharedCatalogManagementInterface $sharedCatalogManagement, private readonly \Magento\SharedCatalog\Api\SharedCatalogRepositoryInterface $catalogRepository, private readonly \Magento\Company\Api\CompanyRepositoryInterface $companyRepository) {} public function assignCompanyToCatalog(int $companyId, int $sharedCatalogId): void {$sharedCatalog = $this->catalogRepository->get($sharedCatalogId); $company = $this->companyRepository->get($companyId); $company->getExtensionAttributes()->getQuoteConfig()?->setCustomerGroupId($sharedCatalog->getCustomerGroupId()); $this->companyRepository->save($company);}} # CLI: Assign products to a shared catalog (by SKU list from CSV) bin/magento company:catalog:assign --catalog-id=2 --products-file=products.csv # Set catalog-specific pricing via import bin/magento import:start --entity=shared_catalog_product_price --behavior=add_update --import-file=prices.csv

Examples

Automated multi-website deployment configuration

<?php
// Console command to provision a new website from config array
namespace MyVendor\MultiStore\Console\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ProvisionWebsiteCommand extends Command
{
    protected function configure(): void
    {
        $this->setName('mystore:website:provision')
             ->setDescription('Provision a new website from config');
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $websites = [
            [
                'code' => 'au_site',
                'name' => 'Australia',
                'domain' => 'au.mystore.com',
                'currency' => 'AUD',
                'locale' => 'en_AU',
                'timezone' => 'Australia/Sydney',
                'root_category_id' => 5,
            ],
        ];

        foreach ($websites as $config) {
            $output->writeln("Creating website: {$config['code']}");
            // Execute creation commands...
            $this->createWebsite($config, $output);
        }

        return Command::SUCCESS;
    }

    private function createWebsite(array $config, OutputInterface $output): void
    {
        // Implementation: create Website → Group → StoreView → set config
    }
}

Read scoped configuration in a custom module

<?php
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;

class StoreAwareConfig
{
    public function __construct(
        private readonly ScopeConfigInterface $scopeConfig
    ) {}

    public function getWebsiteConfig(string $path, ?string $websiteCode = null): mixed
    {
        return $this->scopeConfig->getValue(
            $path,
            ScopeInterface::SCOPE_WEBSITE,
            $websiteCode // null = current website
        );
    }

    public function getStoreConfig(string $path, ?string $storeCode = null): mixed
    {
        return $this->scopeConfig->getValue(
            $path,
            ScopeInterface::SCOPE_STORE,
            $storeCode // null = current store view
        );
    }

    // Usage
    public function getShippingOriginCountry(): string
    {
        return (string)$this->getStoreConfig('shipping/origin/country_id');
    }
}

Best Practices

  • Use store code routing (MAGE_RUN_TYPE=store) for language variants and website routing (MAGE_RUN_TYPE=website) only when you need separate customer bases, orders, and payment methods
  • Enable website-scoped pricing before going live — switching from global to website scope later requires a full price index rebuild and may break existing catalog rules
  • Set MAGE_RUN_CODE and MAGE_RUN_TYPE at the nginx/Apache level, not in index.php — this keeps routing config in the infrastructure layer and enables easier replication
  • Test each website's checkout independently — payment gateways, tax classes, and shipping methods are all configurable per website; a working checkout on one website does not guarantee others work
  • Flush configuration cache after every config:set — scoped config changes are cached; run bin/magento cache:clean config after automated provisioning scripts
  • Use separate Redis databases per website in high-traffic setups — a slow reindex on one website can saturate shared cache storage and affect all websites
  • Document the website/store/store-view ID mapping — IDs change between environments; use codes (uk_en) not numeric IDs in all configuration scripts

Common Pitfalls

ProblemSolution
New website shows global prices ignoring website configEnable website-scoped pricing: bin/magento config:set catalog/price/scope 1 then reindex catalog_product_price
nginx MAGE_RUN_CODE not passed to PHPVerify fastcgi_param MAGE_RUN_CODE is inside the location ~ \.php$ block and not outside it — a common placement mistake
Customer from one website can log in to anotherWebsites with MAGE_RUN_TYPE=website share customer pools by default unless you enable customer account sharing scoped per website: Admin → Config → Customer → Account Sharing
Product visible on wrong websiteCheck product's "Product in Websites" attribute in Admin → Catalog; products must be explicitly assigned to each website they should appear on
Scoped config not taking effectConfig values are cached — always run bin/magento cache:clean config after changes; also verify the scope code spelling matches exactly
B2B shared catalog not filtering productsThe customer must be assigned to a company with the correct catalog; guest and non-company customers see only the public shared catalog

Related Skills

  • @magento-module-development
  • @magento-graphql
  • @magento-indexing-caching
  • @international-ecommerce
  • @b2b-commerce

平台分布

Codex

39.5%
按下载量换算62

Claude

27.43%
按下载量换算43

Cursor

17.95%
按下载量换算28

Gemini CLI

10.43%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills