Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
SpecialPriceInterface Interface Reference
Inheritance diagram for SpecialPriceInterface:
SpecialPrice

Public Member Functions

 get (array $skus)
 
 update (array $prices)
 
 delete (array $prices)
 

Detailed Description

Special prices resource model. @api

Since
102.0.0

Definition at line 14 of file SpecialPriceInterface.php.

Member Function Documentation

◆ delete()

delete ( array  $prices)

Delete product special prices.

Parameters
array$prices$prices = [ 'entity_id' => (int) Entity identified or entity link field. Required. 'attribute_id' => (int) Special price attribute Id. Required. 'store_id' => (int) Store Id. Required. 'value' => (float) Special price value. Required. 'price_from' => (string) Special price from date value in Y-m-d H:i:s format in UTC. Optional. 'price_to' => (string) Special price to date value in Y-m-d H:i:s format in UTC. Optional. ];
Returns
bool
Exceptions

Implemented in SpecialPrice.

◆ get()

get ( array  $skus)

Get product special prices by SKUs.

Parameters
string[]$skus Array containing SKUs $skus = [ 'sku value 1', 'sku value 2' ];
Returns
[ 'entity_id' => (int) Entity identified or entity link field. 'value' => (float) Special price value. 'store_id' => (int) Store Id. 'sku' => (string) Product SKU. 'price_from' => (string) Special price from date value in UTC. 'price_to' => (string) Special price to date value in UTC. ]
Since
101.1.0
102.0.0

Implemented in SpecialPrice.

◆ update()

update ( array  $prices)

Update product special prices.

Parameters
array$prices$prices = [ 'entity_id' => (int) Entity identified or entity link field. Required. 'attribute_id' => (int) Special price attribute Id. Required. 'store_id' => (int) Store Id. Required. 'value' => (float) Special price value. Required. 'price_from' => (string) Special price from date value in Y-m-d H:i:s format in UTC. Optional. 'price_to' => (string) Special price to date value in Y-m-d H:i:s format in UTC. Optional. ];
Returns
bool
Exceptions

The documentation for this interface was generated from the following file: