Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Interfaces

  • ProductCategoryLinkerInterface
  • ProductFactoryInterface
  • ProductImageContainerInterface
  • ProductImageContainerRepositoryInterface
  • ProductImageInterface
  • ProductImagePathsSettingsInterface
  • ProductImageProcessingInterface
  • ProductInterface
  • ProductListProviderFactoryInterface
  • ProductListProviderInterface
  • ProductObjectServiceInterface
  • ProductPermissionSetterInterface
  • ProductReadServiceInterface
  • ProductRepositoryDeleterInterface
  • ProductRepositoryInterface
  • ProductRepositoryReaderInterface
  • ProductRepositoryWriterInterface
  • ProductSettingsInterface
  • ProductSettingsRepositoryInterface
  • ProductSettingsRepositoryReaderInterface
  • ProductSettingsRepositoryWriterInterface
  • ProductWriteServiceInterface
  • StoredProductInterface

Interface ProductWriteServiceInterface

Interface ProductWriteServiceInterface

Direct known implementers

ProductWriteService

Package: Product\Interfaces
Category: System
Located at CoreServices/Product/Interfaces/ProductWriteServiceInterface.inc.php

Methods summary

public integer
# createProduct( ProductInterface $product )

Create Product

Create Product

Creates a new product and returns the ID of it.

Parameters

$product
The product to create.

Returns

integer
The ID of the created product.
public ProductWriteServiceInterface
# updateProduct( StoredProductInterface $product )

Update Product

Update Product

Updates a stored product.

Parameters

$product
The product to update.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public ProductWriteServiceInterface
# deleteProductById( IdType $productId )

Delete Product

Delete Product

Deletes a specific product, depending on the provided product ID.

Parameters

$productId
The product ID of the product to delete.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public integer
# duplicateProduct( IdType $productId, IdType $targetCategoryId, BoolType $duplicateAttributes, BoolType $duplicateSpecials, BoolType $duplicateCrossSelling )

Duplicate Product

Duplicate Product

Duplicates a product to a category.

Parameters

$productId
The product ID of the product to duplicate.
$targetCategoryId
The target category ID of the product to be duplicated to.s
$duplicateAttributes
Should the attributes be duplicated also?
$duplicateSpecials
Should the specials be duplicated also?
$duplicateCrossSelling
Should cross selling be duplicated also?

Returns

integer
Returns the ID of the new product.
public ProductWriteServiceInterface
# linkProduct( IdType $productId, IdType $targetCategoryId )

Link Product

Link Product

Links a product to a category.

Parameters

$productId
The product ID of the product to link.
$targetCategoryId
The target category ID, of the category to be linked to.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public ProductWriteServiceInterface
# changeProductLink( IdType $productId, IdType $currentCategoryId, IdType $newCategoryId )

Changes the category link of a product.

Changes the category link of a product.

Parameters

$productId
The product ID of the product to move.
$currentCategoryId
Old category ID of the product.
$newCategoryId
New category ID of the product.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public ProductWriteServiceInterface
# deleteProductLink( IdType $productId, IdType $categoryId )

Removes a category link from a product by the given product id.

Removes a category link from a product by the given product id.

Parameters

$productId
Id of the product.
$categoryId
Id of category from where the product is link is to delete.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public ProductWriteServiceInterface
# deleteProductLinks( IdType $productId )

Removes all category links from a product by given product ID.

Removes all category links from a product by given product ID.

Parameters

$productId
ID of product.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public string
# importProductImageFile( ExistingFile $sourceFile, FilenameStringType $preferredFilename )

Import Product Image File

Import Product Image File

Imports an image for the product.

Parameters

$sourceFile
The existing file to import.
$preferredFilename
The preferred filename.

Returns

string
The new filename.
public ProductWriteServiceInterface
# renameProductImage( FilenameStringType $oldName, FilenameStringType $newName )

Rename Product Image File

Rename Product Image File

Renames a product image file.

Parameters

$oldName
The old name of the product image file.
$newName
The new name of the product image file.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
public ProductWriteServiceInterface
# deleteProductImage( FilenameStringType $filename )

Delete Product Image

Delete Product Image

Deletes a product image.

Parameters

$filename
The filename of the product image to delete.

Returns

ProductWriteServiceInterface
Same instance for chained method calls.
API documentation generated by ApiGen