Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Custbalance Class Reference
Inheritance diagram for Custbalance:
Frontend AbstractFrontend FrontendInterface

Public Member Functions

 fetchTotals (\Magento\Quote\Model\Quote\Address $address)
 
- Public Member Functions inherited from Frontend
 fetchTotals (\Magento\Quote\Model\Quote\Address $address)
 
- Public Member Functions inherited from AbstractFrontend
 __construct (BooleanFactory $attrBooleanFactory, CacheInterface $cache=null, $storeResolver=null, array $cacheTags=null, StoreManagerInterface $storeManager=null, Serializer $serializer=null)
 
 setAttribute ($attribute)
 
 getAttribute ()
 
 getInputType ()
 
 getLabel ()
 
 getLocalizedLabel ()
 
 getValue (\Magento\Framework\DataObject $object)
 
 isVisible ()
 
 getClass ()
 
 getConfigField ($fieldName)
 
 getSelectOptions ()
 
 getOption ($optionId)
 
 getInputRendererClass ()
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractFrontend
 _getInputValidateClass ()
 
- Protected Attributes inherited from AbstractFrontend
 $_attribute
 
 $_attrBooleanFactory
 

Detailed Description

Quote address attribute frontend custbalance resource model

Author
Magento Core Team core@.nosp@m.mage.nosp@m.ntoco.nosp@m.mmer.nosp@m.ce.co.nosp@m.m

Definition at line 13 of file Custbalance.php.

Member Function Documentation

◆ fetchTotals()

fetchTotals ( \Magento\Quote\Model\Quote\Address  $address)

Fetch customer balance

Parameters
\Magento\Quote\Model\Quote\Address$address
Returns
$this

Definition at line 21 of file Custbalance.php.

22  {
23  $custbalance = $address->getCustbalanceAmount();
24  if ($custbalance != 0) {
25  $address->addTotal(
26  ['code' => 'custbalance', 'title' => __('Store Credit'), 'value' => -$custbalance]
27  );
28  }
29  return $this;
30  }
__()
Definition: __.php:13
$address
Definition: customer.php:38

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