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