本文整理汇总了PHP中product::setService方法的典型用法代码示例。如果您正苦于以下问题:PHP product::setService方法的具体用法?PHP product::setService怎么用?PHP product::setService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类product
的用法示例。
在下文中一共展示了product::setService方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
} else {
$published = false;
}
// convert to bool the onhome box
if (isset($_REQUEST['onhome'])) {
$onhome = true;
} else {
$onhome = false;
}
$product->setContent($_REQUEST['title_1'], $_REQUEST['content_1'], $_REQUEST['title_2'], $_REQUEST['content_2'], $_REQUEST['title_3'], $_REQUEST['content_3'], $_REQUEST['title_4'], $_REQUEST['content_4'], $_REQUEST['title_5'], $_REQUEST['content_5'], $_REQUEST['title_6'], $_REQUEST['content_6'], $_REQUEST['code']);
$product->setReference($_REQUEST['reference']);
$product->setPrice($_REQUEST['price']);
$product->setVAT($_REQUEST['vat']);
$product->setDiscount($_REQUEST['discount']);
$product->setCategory($_REQUEST['category']);
$product->setDateUpdate();
$product->setService($service);
$product->setPublished($published);
$product->setonHome($onhome);
if ($product->update()) {
print 'sucess';
} else {
print 'failure';
}
}
} else {
print 'error';
}
?>
</div>
示例2: product
// convert to bool the published box
if (isset($_REQUEST['published'])) {
$_REQUEST['published'] = true;
} else {
$_REQUEST['published'] = false;
}
// convert to bool the onhome box
if (isset($_REQUEST['onhome'])) {
$_REQUEST['onhome'] = true;
} else {
$_REQUEST['onhome'] = false;
}
$product = new product();
$product->setReference($_REQUEST['reference']);
$product->setContent($_REQUEST['title_1'], $_REQUEST['content_1'], $_REQUEST['title_2'], $_REQUEST['content_2'], $_REQUEST['title_3'], $_REQUEST['content_3'], $_REQUEST['title_4'], $_REQUEST['content_4'], $_REQUEST['title_5'], $_REQUEST['content_5'], $_REQUEST['title_6'], $_REQUEST['content_6'], $_REQUEST['code']);
$product->setService($_REQUEST['service']);
$product->setPrice($_REQUEST['price']);
$product->setVAT($_REQUEST['vat']);
$product->setDiscount($_REQUEST['discount']);
$product->setUserId($account['name']);
$product->setCategory($_REQUEST['category']);
$product->setDate();
$product->setDateUpdate();
$product->setPublished($_REQUEST['published']);
$product->setonHome($_REQUEST['onhome']);
if ($product->insert()) {
print 'sucess';
$id = $mysqli->insert_id;
?>
<div class="separator30"></div>