Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • Catalog
  • CatalogAdmin
  • CatalogCMSActionDecorator
  • CatalogMemberDecorator
  • CatalogPrice
  • CMSSiteTreeFilter_Catalog
  • Monument
  • MonumentCatalog
  • MonumentForm
  • Orders1CExchange_SiteConfig
  • PaymentType
  • Product
  • ProductCatalogSiteConfig
  • ProductSearchPage
  • SimpleOrderButton
  • SimpleOrderData
  • SimpleOrderForm
  • SimpleOrderPage
  • StartCatalog
  • VirtualProduct

Interfaces

  • OrderButtonInterface
 1 <?php
 2 /**
 3  * Improvements to Price for presenting in templates.
 4  * @package Catalog
 5  * @author dvp
 6  */
 7 class CatalogPrice extends Decimal {
 8 
 9     public static function getCurrency() {
10         return SiteConfig::current_site_config()->CatalogCurrency;
11     }
12 
13     function __construct($name, $defaultValue = 0) {
14         parent::__construct($name, 12, 2, $defaultValue);
15     }
16 
17     function getValue() {
18         $decimalSize = (SiteConfig::current_site_config()->CatalogDiscountCeil) ? 0 : 2;
19         return round($this->value, $decimalSize);
20     }
21     
22     function Nice($decimalSize = false) {
23         if (!$decimalSize)
24             $decimalSize = (SiteConfig::current_site_config()->CatalogDiscountCeil) ? 0 : 2;
25         return parent::Nice($decimalSize);
26     }
27 
28     function Whole() {
29         return $this->Int();
30     }
31     
32     function requireField() {
33         $parts=Array('datatype'=>'decimal', 'precision'=>"$this->wholeSize,2", 'default'=>sprintf("%.2f", $this->defaultValue), 'arrayValue'=>$this->arrayValue);
34         $values=Array('type'=>'decimal', 'parts'=>$parts);
35         DB::requireField($this->tableName, $this->name, $values);
36     }
37 }
38 
39 
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0