Sunnysideup\EcommerceProductVariation\Control\CreateEcommerceVariations
this class helps to create/edit/delete variations
Synopsis
class CreateEcommerceVariations
extends Controller
{
- // members
- protected integer $_productID = 0;
- protected Product $_product = NULL;
- protected string $_typeorvalue = 'type';
- protected string $_classname = 'type';
- protected string $_namefield = 'Name';
- protected string $_labelfield = 'Label';
- protected integer $_id = 0;
- protected string $_value = '';
- protected integer $_position = 1;
- protected string $_message = '';
- protected string $_messageclass = 'good';
- protected array $_selectedtypeid = ;
- protected array $_selectedvalueid = ;
- protected string $output = '';
- private static array $allowed_actions = ;
- private static string $session_name_for_selected_values = 'SelectecedValues';
- private static string $url_segment = 'createecommercevariations';
- // methods
- public void init()
- public void Link()
- public void index()
- public void Output()
- public void createvariations()
- public string jsonforform()
- public void select()
- public void rename()
- public void add()
- public void remove()
- public void move()
- public boolean cansavevariation()
Hierarchy
Extends
- SilverStripe\Control\Controller
Members
private
- $allowed_actions
- $session_name_for_selected_values
—
string
The name for the session varilable. - $url_segment — string
protected
- $_classname
—
string
ProductAttributeValue | ProductAttributeType - $_id
—
int
Id of the item being altered or its parent... - $_labelfield
—
string
Name of the Label field only for ProductAttributeType - $_message
—
string
Return message - $_messageclass
—
string
Type of message good | bad | warning - $_namefield
—
string
Name of the Name field - $_position
—
int
Position in the sorting order use -1 to distinguish it from 0 (first in sorting order) - $_product
—
Sunnysideup\Ecommerce\Pages\Product
The select Product (Object) - $_productID
—
int
The selected Product (ID) - $_selectedtypeid
—
array
Type IDs that are selected in the PRODUCT - $_selectedvalueid
—
array
Value IDs that are selected in the PRODUCT - $_typeorvalue
—
string
type | value - $_value
—
string
Value of the item being altered - $output
—
string
What is going to be sent back.
Methods
public
- Link()
- Output()
- add() — add a Type or a Value
- cansavevariation()
- createvariations() — checks the selected types and values and makes variations from it...
- index()
- init()
- jsonforform()
- move()
- remove() — remove a Type or a Value
- rename()
- select()