Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-sales-rule
Model
Rule
Action
Product.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\SalesRule\Model\Rule\Action
;
7
8
class
Product
extends
\Magento\Rule\Model\Action\AbstractAction
9
{
15
public
function
loadAttributeOptions
()
16
{
17
$this->setAttributeOption([
'rule_price'
=>
__
(
'Special Price'
)]);
18
return
$this;
19
}
20
26
public
function
loadOperatorOptions
()
27
{
28
$this->setOperatorOption(
29
[
30
'to_fixed'
=>
__
(
'To Fixed Value'
),
31
'to_percent'
=>
__
(
'To Percentage'
),
32
'by_fixed'
=>
__
(
'By Fixed value'
),
33
'by_percent'
=>
__
(
'By Percentage'
),
34
]
35
);
36
return
$this;
37
}
38
44
public
function
asHtml
()
45
{
46
$html = $this->
getTypeElement
()->getHtml() .
__
(
47
"Update product's %1 %2: %3"
,
48
$this->
getAttributeElement
()->getHtml(),
49
$this->
getOperatorElement
()->getHtml(),
50
$this->
getValueElement
()->getHtml()
51
);
52
$html .= $this->
getRemoveLinkHtml
();
53
return
$html;
54
}
55
}
Magento\Rule\Model\Action\AbstractAction\getValueElement
getValueElement()
Definition:
AbstractAction.php:307
Magento\Rule\Model\Action\AbstractAction\getOperatorElement
getOperatorElement()
Definition:
AbstractAction.php:288
Magento\SalesRule\Model\Rule\Action\Product
Definition:
Product.php:8
Magento\SalesRule\Model\Rule\Action\Product\asHtml
asHtml()
Definition:
Product.php:44
Magento\SalesRule\Model\Rule\Action\Product\loadAttributeOptions
loadAttributeOptions()
Definition:
Product.php:15
__
__()
Definition:
__.php:13
Magento\Rule\Model\Action\AbstractAction\getTypeElement
getTypeElement()
Definition:
AbstractAction.php:253
Magento\SalesRule\Model\Rule\Action
Magento\SalesRule\Model\Rule\Action\Product\loadOperatorOptions
loadOperatorOptions()
Definition:
Product.php:26
Magento\Rule\Model\Action\AbstractAction
Definition:
AbstractAction.php:17
Magento\Rule\Model\Action\AbstractAction\getRemoveLinkHtml
getRemoveLinkHtml()
Definition:
AbstractAction.php:335
Magento\Rule\Model\Action\AbstractAction\getAttributeElement
getAttributeElement()
Definition:
AbstractAction.php:269