phpDocumentor

ProductVariantsInserter Uses WeightAndPriceTypeValidator

Class ProductVariantsInserter

Table of Contents

$connection  : Connection
__construct()  : mixed
ProductVariantsInserter constructor.
createMultipleProductVariants()  : array<string|int, int>
createProductVariant()  : int
connectVariantAndImageList()  : void
connectVariantAndOptionValueIds()  : void
getDatabaseTypeFieldValue()  : string
indexCombiAndOptions()  : void
insertProductVariant()  : int

Properties

Methods

__construct()

ProductVariantsInserter constructor.

public __construct(Connection $connection) : mixed
Parameters
$connection : Connection
Return values
mixed

createMultipleProductVariants()

public createMultipleProductVariants(array<string|int, mixed> ...$creationArgs) : array<string|int, int>
Parameters
$creationArgs : array<string|int, mixed>
Tags
throws
InsertionOfProductVariantsFailed
Return values
array<string|int, int>

createProductVariant()

public createProductVariant(ProductId $productId, OptionAndOptionValueIds $combination, ImageListId $imageListId, ProductCustomization $productCustomization, ProductIdentificationNumbers $productIdentificationNumbers, ProductVariantStock $stock, int $sortOrder) : int
Parameters
$productId : ProductId
$combination : OptionAndOptionValueIds
$imageListId : ImageListId
$productCustomization : ProductCustomization
$productIdentificationNumbers : ProductIdentificationNumbers
$stock : ProductVariantStock
$sortOrder : int
Tags
throws
InsertionOfProductVariantsFailed
Return values
int

connectVariantAndImageList()

protected connectVariantAndImageList(int $variantId, ImageListId $imageListId) : void
Parameters
$variantId : int
$imageListId : ImageListId
Tags
throws
Exception
Return values
void

getDatabaseTypeFieldValue()

private getDatabaseTypeFieldValue(string $type) : string
Parameters
$type : string
Return values
string

indexCombiAndOptions()

private indexCombiAndOptions(int $variantId) : void
Parameters
$variantId : int
Tags
description

all necessary information about each option and optionValue must be inserted into the table products_properties_index. The information is already available in different tables related to properties. It must be copied for the current version of GambioAdmin to be able to see & edit the combis

throws
Exception
throws
Exception
Return values
void

Search results