本文整理汇总了PHP中VmModel::store方法的典型用法代码示例。如果您正苦于以下问题:PHP VmModel::store方法的具体用法?PHP VmModel::store怎么用?PHP VmModel::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VmModel
的用法示例。
在下文中一共展示了VmModel::store方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
function store(&$data)
{
if (!vmAccess::manager('manufacturercategories')) {
vmWarn('Insufficient permissions to store manufacturer category');
return false;
}
return parent::store($data);
}
示例2: store
/**
* Bind the post data to the coupon table and save it
*
* @author RickG, Oscar van Eijk
* @return mixed False if the save was unsuccessful, the coupon ID otherwise.
*/
function store(&$data)
{
// Convert selected dates to MySQL format for storing.
if ($data['coupon_start_date']) {
$startDate = JFactory::getDate($data['coupon_start_date']);
$data['coupon_start_date'] = $startDate->toSql();
}
if ($data['coupon_expiry_date']) {
$expireDate = JFactory::getDate($data['coupon_expiry_date']);
$data['coupon_expiry_date'] = $expireDate->toSql();
}
return parent::store($data);
}
示例3: store
/**
* Bind the post data to the coupon table and save it
*
* @author RickG, Oscar van Eijk
* @return mixed False if the save was unsuccessful, the coupon ID otherwise.
*/
function store(&$data)
{
$table = $this->getTable('coupons');
//$data = JRequest::get('post');
$table->bindChecknStore($data);
// Convert selected dates to MySQL format for storing.
if ($data['coupon_start_date']) {
$startDate = JFactory::getDate($data['coupon_start_date']);
$data['coupon_start_date'] = $startDate->toMySQL();
}
if ($data['coupon_expiry_date']) {
$expireDate = JFactory::getDate($data['coupon_expiry_date']);
$data['coupon_expiry_date'] = $expireDate->toMySQL();
}
parent::store($data);
return $table->virtuemart_coupon_id;
}
示例4: store
function store(&$data)
{
$myfields = array('basePrice', 'variantModification', 'basePriceVariant', 'basePriceWithTax', 'basePriceWithTax', 'discountedPriceWithoutTax', 'salesPrice', 'priceWithoutTax', 'salesPriceWithDiscount', 'discountAmount', 'taxAmount');
$params = array();
$params['show_prices'] = (bool) $data['show_prices'];
// $param ='show_prices='.$data['show_prices']."\n";
foreach ($myfields as $fields) {
$params[$fields] = (bool) $data[$fields];
$params[$fields . 'Text'] = (bool) $data[$fields . 'Text'];
$params[$fields . 'Rounding'] = (int) $data[$fields . 'Rounding'];
// $param .= $fields.'='.$data[$fields]."\n"; //attention there must be doublequotes
// $param .= $fields.'Text='.$data[$fields.'Text']."\n";
// $param .= $fields.'Rounding='.$data[$fields.'Rounding']."\n";
}
// if(!class_exists('JParameter')) require(JPATH_VM_LIBRARIES.DS.'joomla'.DS.'html'.DS.'parameter.php' );
// $jparam = new JParameter($param);
$data['price_display'] = json_encode($params);
return parent::store($data);
}
示例5: store
function store(&$data)
{
$myfields = array('basePrice', 'variantModification', 'basePriceVariant', 'basePriceWithTax', 'basePriceWithTax', 'discountedPriceWithoutTax', 'salesPrice', 'priceWithoutTax', 'salesPriceWithDiscount', 'discountAmount', 'taxAmount', 'unitPrice');
$param = 'show_prices=' . $data['show_prices'] . "\n";
foreach ($myfields as $fields) {
$param .= $fields . '=' . $data[$fields] . "\n";
//attention there must be doublequotes
$param .= $fields . 'Text=' . $data[$fields . 'Text'] . "\n";
$param .= $fields . 'Rounding=' . $data[$fields . 'Rounding'] . "\n";
}
if (!class_exists('JParameter')) {
require JPATH_VM_LIBRARIES . DS . 'joomla' . DS . 'html' . DS . 'parameter.php';
}
$jparam = new JParameter($param);
$data['price_display'] = serialize(new JParameter($param));
return parent::store($data);
}
示例6: adduser
/**
* Add customer to the waiting list for specific product
*
* @author Seyi Awofadeju
* @return insert_id if the save was successful, false otherwise.
*/
public function adduser($data)
{
JSession::checkToken() or jexit('Invalid Token, in notify customer');
return parent::store($data);
}