dnafactory/module-fake-configurable

此模块创建假的可配置产品(可以关联到任何类型的产品)。这样可以为产品创建不同的URL,并在视觉上受益于配置。

1.3.3 2023-08-17 07:26 UTC

README

#假可配置

composer require dnafactory/fake-configurable

此模块创建假的可配置产品(可以关联到任何类型的产品)。这样可以为产品创建不同的URL,并在视觉上受益于配置。

外观 & 使用

所有相关产品都称为 "兄弟"

<?php

namespace DNAFactory\FakeConfigurable\Api;

use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Model\ResourceModel\Product\Link\Collection as LinkCollection;
use Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection as ProductCollection;

interface BrotherManagementInterface
{
    public function getBrotherProducts(ProductInterface $product): array;
    public function getBrotherProductIds(ProductInterface $product): array;
    public function getBrotherProductCollection(ProductInterface $product): ProductCollection;
    public function getBrotherLinkCollection(ProductInterface $product): LinkCollection;
}