QuickEditProductSpecialPricesWriter

Implements \QuickEditProductSpecialPricesWriterInterface

Class QuickEditProductSpecialPricesWriter

category

System

package

QuickEdit

subpackage

Repositories

Methods

QuickEditProductsSpecialPriceWriter constructor.

__construct(\CI_DB_query_builder $db, \QuickEditSpecialPricesOverviewColumns $quickEditSpecialPricesOverviewColumns) 

Arguments

$db

\CI_DB_query_builder

Database query builder instance.

$quickEditSpecialPricesOverviewColumns

\QuickEditSpecialPricesOverviewColumns

QuickEdit properties overview columns.

Calculate the price of the value.

_calculatePrice(string $value, string $column) : float|integer

Arguments

$value

string

Value.

$column

string

Column of the table.

Response

float|integer

Returns the calculated unit of the price.

Calculates the unit of the value.

_calculateUnit(string $value, string $column) : mixed

Arguments

$value

string

Value.

$column

string

Column of the table.

Response

mixed

Returns the calculated unit of the value.

Returns the updated data of a product.

_collectUpdateData(array $items) : array

Arguments

$items

array

Items.

Response

array

Returns the updated data of a product is an array.

Returns the required columns for the overview of the properties.

_delegateFilterToColumn() : array

Response

array

Returns an array of the required columns for the overview of the properties.

Returns the editable columns for the product.

_editableColumns() : array

Response

array

Returns the editable columns for the product is an array.

Sets the special price expires date.

_setSpecialPriceExpirationDate(string $expirationDate) : string

Arguments

$expirationDate

string

Expiration date string.

Response

string

Returns the special price expires date in the specified format.

Sets the tax rate of a product.

_setTaxRate() 

Saves the changed data regarding the special price.

setSpecialPriceById(array $specialPrice) : boolean

Arguments

$specialPrice

array

Contains the special prices data.

Response

boolean

Returns the operation result.

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

productIds

productIds : array
var

Type(s)

array

taxRate

taxRate : float
var

Type(s)

float

quickEditSpecialPricesOverviewColumns

quickEditSpecialPricesOverviewColumns : \QuickEditSpecialPricesOverviewColumns