Index: branches/5.1.x/units/shipping_quote_engines/shipping_quote_engine.php =================================================================== diff -u -N -r13100 -r13813 --- branches/5.1.x/units/shipping_quote_engines/shipping_quote_engine.php (.../shipping_quote_engine.php) (revision 13100) +++ branches/5.1.x/units/shipping_quote_engines/shipping_quote_engine.php (.../shipping_quote_engine.php) (revision 13813) @@ -1,6 +1,6 @@ initProperties(); + } + + /** * $params = Array( * 'AccountLogin' => 'login', * 'AccountPassword' => 'pass', @@ -136,4 +150,48 @@ { } + + /** + * Returns list of shipping types, that can be selected on product editing page + * + * @return Array + */ + function GetAvailableTypes() + { + return Array (); + + } + + /** + * Returns virtual field names, that will be saved as properties + * + * @return Array + */ + function GetEngineFields() + { + return Array (); + } + + /** + * Loads properties of shipping quote engine + * + */ + function initProperties() + { + $sql = 'SELECT Properties, FlatSurcharge, PercentSurcharge + FROM ' . $this->Application->getUnitOption('sqe', 'TableName') . ' + WHERE LOWER(ClassName) = ' . $this->Conn->qstr( strtolower( get_class($this) ) ); + $data = $this->Conn->GetRow($sql); + + if (is_array($data)) { + $properties = $data['Properties'] ? unserialize($data['Properties']) : Array (); + $properties['FlatSurcharge'] = $data['FlatSurcharge']; + $properties['PercentSurcharge'] = $data['PercentSurcharge']; + + $this->properties = $properties; + } + else { + $this->properties = Array (); + } + } } \ No newline at end of file