| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 20 | public function init() |
||
| 21 | { |
||
| 22 | parent::init(); |
||
| 23 | Requirements::javascript('silverstripe/admin: thirdparty/jquery/jquery.js'); |
||
| 24 | if ($this->data()->Available && $this->ProductOptions()->exists()) { |
||
| 25 | $formName = $this->PurchaseForm()->FormName(); |
||
| 26 | /*Requirements::javascriptTemplate( |
||
| 27 | 'dynamic/foxystripe: javascript/out_of_stock.js', |
||
| 28 | [ |
||
| 29 | 'FormName' => $formName, |
||
| 30 | ], |
||
| 31 | 'foxystripe.out_of_stock' |
||
| 32 | );*/ |
||
| 33 | Requirements::javascript('dynamic/foxystripe: javascript/product_options.js'); |
||
| 34 | } |
||
| 35 | |||
| 36 | Requirements::customScript(<<<JS |
||
| 37 | var productID = {$this->data()->ID}; |
||
| 38 | JS |
||
| 54 |