![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-sales-rule/Model/Rule/Action/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\SalesRule\Model\Rule\Action; class Product extends \Magento\Rule\Model\Action\AbstractAction { /** * Load attribute options * * @return $this */ public function loadAttributeOptions() { $this->setAttributeOption(['rule_price' => __('Special Price')]); return $this; } /** * Load operator options * * @return $this */ public function loadOperatorOptions() { $this->setOperatorOption( [ 'to_fixed' => __('To Fixed Value'), 'to_percent' => __('To Percentage'), 'by_fixed' => __('By Fixed value'), 'by_percent' => __('By Percentage'), ] ); return $this; } /** * Return html * * @return string */ public function asHtml() { $html = $this->getTypeElement()->getHtml() . __( "Update product's %1 %2: %3", $this->getAttributeElement()->getHtml(), $this->getOperatorElement()->getHtml(), $this->getValueElement()->getHtml() ); $html .= $this->getRemoveLinkHtml(); return $html; } }