Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Totals.php
Go to the documentation of this file.
1 <?php
7 
10 
18 {
24  public function getGrandTotal()
25  {
26  return $this->getData(self::KEY_GRAND_TOTAL);
27  }
28 
35  public function setGrandTotal($grandTotal)
36  {
37  return $this->setData(self::KEY_GRAND_TOTAL, $grandTotal);
38  }
39 
45  public function getBaseGrandTotal()
46  {
47  return $this->getData(self::KEY_BASE_GRAND_TOTAL);
48  }
49 
56  public function setBaseGrandTotal($baseGrandTotal)
57  {
58  return $this->setData(self::KEY_BASE_GRAND_TOTAL, $baseGrandTotal);
59  }
60 
66  public function getSubtotal()
67  {
68  return $this->getData(self::KEY_SUBTOTAL);
69  }
70 
77  public function setSubtotal($subtotal)
78  {
79  return $this->setData(self::KEY_SUBTOTAL, $subtotal);
80  }
81 
87  public function getBaseSubtotal()
88  {
89  return $this->getData(self::KEY_BASE_SUBTOTAL);
90  }
91 
98  public function setBaseSubtotal($baseSubtotal)
99  {
100  return $this->setData(self::KEY_BASE_SUBTOTAL, $baseSubtotal);
101  }
102 
108  public function getDiscountAmount()
109  {
110  return $this->getData(self::KEY_DISCOUNT_AMOUNT);
111  }
112 
119  public function setDiscountAmount($discountAmount)
120  {
121  return $this->setData(self::KEY_DISCOUNT_AMOUNT, $discountAmount);
122  }
123 
129  public function getBaseDiscountAmount()
130  {
131  return $this->getData(self::KEY_BASE_DISCOUNT_AMOUNT);
132  }
133 
140  public function setBaseDiscountAmount($baseDiscountAmount)
141  {
142  return $this->setData(self::KEY_BASE_DISCOUNT_AMOUNT, $baseDiscountAmount);
143  }
144 
150  public function getSubtotalWithDiscount()
151  {
152  return $this->getData(self::KEY_SUBTOTAL_WITH_DISCOUNT);
153  }
154 
161  public function setSubtotalWithDiscount($subtotalWithDiscount)
162  {
163  return $this->setData(self::KEY_SUBTOTAL_WITH_DISCOUNT, $subtotalWithDiscount);
164  }
165 
171  public function getBaseSubtotalWithDiscount()
172  {
173  return $this->getData(self::KEY_BASE_SUBTOTAL_WITH_DISCOUNT);
174  }
175 
182  public function setBaseSubtotalWithDiscount($baseSubtotalWithDiscount)
183  {
184  return $this->setData(self::KEY_BASE_SUBTOTAL_WITH_DISCOUNT, $baseSubtotalWithDiscount);
185  }
186 
192  public function getShippingAmount()
193  {
194  return $this->getData(self::KEY_SHIPPING_AMOUNT);
195  }
196 
204  {
205  return $this->setData(self::KEY_SHIPPING_AMOUNT, $shippingAmount);
206  }
207 
213  public function getBaseShippingAmount()
214  {
215  return $this->getData(self::KEY_BASE_SHIPPING_AMOUNT);
216  }
217 
224  public function setBaseShippingAmount($baseShippingAmount)
225  {
226  return $this->setData(self::KEY_BASE_SHIPPING_AMOUNT, $baseShippingAmount);
227  }
228 
234  public function getShippingDiscountAmount()
235  {
236  return $this->getData(self::KEY_SHIPPING_DISCOUNT_AMOUNT);
237  }
238 
245  public function setShippingDiscountAmount($shippingDiscountAmount)
246  {
247  return $this->setData(self::KEY_SHIPPING_DISCOUNT_AMOUNT, $shippingDiscountAmount);
248  }
249 
256  {
257  return $this->getData(self::KEY_BASE_SHIPPING_DISCOUNT_AMOUNT);
258  }
259 
266  public function setBaseShippingDiscountAmount($baseShippingDiscountAmount)
267  {
268  return $this->setData(self::KEY_BASE_SHIPPING_DISCOUNT_AMOUNT, $baseShippingDiscountAmount);
269  }
270 
276  public function getTaxAmount()
277  {
278  return $this->getData(self::KEY_TAX_AMOUNT);
279  }
280 
287  public function setTaxAmount($taxAmount)
288  {
289  return $this->setData(self::KEY_TAX_AMOUNT, $taxAmount);
290  }
291 
297  public function getBaseTaxAmount()
298  {
299  return $this->getData(self::KEY_BASE_TAX_AMOUNT);
300  }
301 
308  public function setBaseTaxAmount($baseTaxAmount)
309  {
310  return $this->setData(self::KEY_BASE_TAX_AMOUNT, $baseTaxAmount);
311  }
312 
318  public function getWeeeTaxAppliedAmount()
319  {
320  return $this->getData(self::KEY_WEEE_TAX_APPLIED_AMOUNT);
321  }
322 
329  public function setWeeeTaxAppliedAmount($weeeTaxAppliedAmount)
330  {
331  return $this->setData(self::KEY_WEEE_TAX_APPLIED_AMOUNT, $weeeTaxAppliedAmount);
332  }
333 
339  public function getShippingTaxAmount()
340  {
341  return $this->getData(self::KEY_SHIPPING_TAX_AMOUNT);
342  }
343 
350  public function setShippingTaxAmount($shippingTaxAmount)
351  {
352  return $this->setData(self::KEY_SHIPPING_TAX_AMOUNT, $shippingTaxAmount);
353  }
354 
360  public function getBaseShippingTaxAmount()
361  {
362  return $this->getData(self::KEY_BASE_SHIPPING_TAX_AMOUNT);
363  }
364 
371  public function setBaseShippingTaxAmount($baseShippingTaxAmount)
372  {
373  return $this->setData(self::KEY_BASE_SHIPPING_TAX_AMOUNT, $baseShippingTaxAmount);
374  }
375 
381  public function getSubtotalInclTax()
382  {
383  return $this->getData(self::KEY_SUBTOTAL_INCL_TAX);
384  }
385 
392  public function setSubtotalInclTax($subtotalInclTax)
393  {
394  return $this->setData(self::KEY_SUBTOTAL_INCL_TAX, $subtotalInclTax);
395  }
396 
402  public function getBaseSubtotalInclTax()
403  {
404  return $this->getData(self::KEY_BASE_SUBTOTAL_INCL_TAX);
405  }
406 
413  public function setBaseSubtotalInclTax($baseSubtotalInclTax)
414  {
415  return $this->setData(self::KEY_BASE_SUBTOTAL_INCL_TAX, $baseSubtotalInclTax);
416  }
417 
423  public function getShippingInclTax()
424  {
425  return $this->getData(self::KEY_SHIPPING_INCL_TAX);
426  }
427 
434  public function setShippingInclTax($shippingInclTax)
435  {
436  return $this->setData(self::KEY_SHIPPING_INCL_TAX, $shippingInclTax);
437  }
438 
444  public function getBaseShippingInclTax()
445  {
446  return $this->getData(self::KEY_BASE_SHIPPING_INCL_TAX);
447  }
448 
455  public function setBaseShippingInclTax($baseShippingInclTax)
456  {
457  return $this->setData(self::KEY_BASE_SHIPPING_INCL_TAX, $baseShippingInclTax);
458  }
459 
465  public function getBaseCurrencyCode()
466  {
467  return $this->getData(self::KEY_BASE_CURRENCY_CODE);
468  }
469 
476  public function setBaseCurrencyCode($baseCurrencyCode)
477  {
478  return $this->setData(self::KEY_BASE_CURRENCY_CODE, $baseCurrencyCode);
479  }
480 
486  public function getQuoteCurrencyCode()
487  {
488  return $this->getData(self::KEY_QUOTE_CURRENCY_CODE);
489  }
490 
497  public function setQuoteCurrencyCode($quoteCurrencyCode)
498  {
499  return $this->setData(self::KEY_QUOTE_CURRENCY_CODE, $quoteCurrencyCode);
500  }
501 
505  public function getCouponCode()
506  {
507  return $this->getData(self::KEY_COUPON_CODE);
508  }
509 
513  public function setCouponCode($couponCode)
514  {
515  return $this->setData(self::KEY_COUPON_CODE, $couponCode);
516  }
517 
523  public function getItemsQty()
524  {
525  return $this->getData(self::KEY_ITEMS_QTY);
526  }
527 
534  public function setItemsQty($itemsQty = null)
535  {
536  return $this->setData(self::KEY_ITEMS_QTY, $itemsQty);
537  }
538 
544  public function getItems()
545  {
546  return $this->getData(self::KEY_ITEMS);
547  }
548 
555  public function setItems(array $items = null)
556  {
557  return $this->setData(self::KEY_ITEMS, $items);
558  }
559 
563  public function getTotalSegments()
564  {
565  return $this->getData(self::KEY_TOTAL_SEGMENTS);
566  }
567 
571  public function setTotalSegments($totals = [])
572  {
573  return $this->setData(self::KEY_TOTAL_SEGMENTS, $totals);
574  }
575 
581  public function getExtensionAttributes()
582  {
583  return $this->_getExtensionAttributes();
584  }
585 
592  public function setExtensionAttributes(\Magento\Quote\Api\Data\TotalsExtensionInterface $extensionAttributes)
593  {
594  return $this->_setExtensionAttributes($extensionAttributes);
595  }
596 }
setWeeeTaxAppliedAmount($weeeTaxAppliedAmount)
Definition: Totals.php:329
setQuoteCurrencyCode($quoteCurrencyCode)
Definition: Totals.php:497
setItems(array $items=null)
Definition: Totals.php:555
setDiscountAmount($discountAmount)
Definition: Totals.php:119
setBaseShippingDiscountAmount($baseShippingDiscountAmount)
Definition: Totals.php:266
setShippingInclTax($shippingInclTax)
Definition: Totals.php:434
setItemsQty($itemsQty=null)
Definition: Totals.php:534
setBaseShippingInclTax($baseShippingInclTax)
Definition: Totals.php:455
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
setShippingAmount($shippingAmount)
Definition: Totals.php:203
setBaseCurrencyCode($baseCurrencyCode)
Definition: Totals.php:476
setBaseShippingAmount($baseShippingAmount)
Definition: Totals.php:224
setExtensionAttributes(\Magento\Quote\Api\Data\TotalsExtensionInterface $extensionAttributes)
Definition: Totals.php:592
$totals
Definition: totalbar.phtml:10
setBaseDiscountAmount($baseDiscountAmount)
Definition: Totals.php:140
setBaseShippingTaxAmount($baseShippingTaxAmount)
Definition: Totals.php:371
setBaseSubtotalWithDiscount($baseSubtotalWithDiscount)
Definition: Totals.php:182
setSubtotalWithDiscount($subtotalWithDiscount)
Definition: Totals.php:161
setBaseSubtotal($baseSubtotal)
Definition: Totals.php:98
setShippingDiscountAmount($shippingDiscountAmount)
Definition: Totals.php:245
setBaseGrandTotal($baseGrandTotal)
Definition: Totals.php:56
setBaseTaxAmount($baseTaxAmount)
Definition: Totals.php:308
setSubtotalInclTax($subtotalInclTax)
Definition: Totals.php:392
$items
setShippingTaxAmount($shippingTaxAmount)
Definition: Totals.php:350
setBaseSubtotalInclTax($baseSubtotalInclTax)
Definition: Totals.php:413