Skip to content

Instantly share code, notes, and snippets.

@muskie9
Last active August 29, 2015 14:14
Show Gist options
  • Save muskie9/a846ecd02917e5239cc3 to your computer and use it in GitHub Desktop.
Save muskie9/a846ecd02917e5239cc3 to your computer and use it in GitHub Desktop.
<?php
class MyCustomProduct extends ProductPage{
/* ... */
public function ProductOptionsForm() {
$form = $this->StartForm();
$form .= $this->AddBaseProductDetails();
$form .= $this>ProductOptionsSet();
$form .= $this->MyCustomField();
$form .= $this->AddToCartForm();
$form .= $this->EndForm();
return $form;
}
public function MyCustomField(){
return "<label for='MyCustomField'>My Custom Field</label><input type='text' name='MyCustomField' value='' class='myCSSclass'>";
}
}
class MyCustomProduct_Controller extends ProductPage_Controller{
public function init(){
parent::init();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment