本文整理匯總了PHP中WishList::getBoughtProduct方法的典型用法代碼示例。如果您正苦於以下問題:PHP WishList::getBoughtProduct方法的具體用法?PHP WishList::getBoughtProduct怎麽用?PHP WishList::getBoughtProduct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WishList
的用法示例。
在下文中一共展示了WishList::getBoughtProduct方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: WishList
$id_wishlist = (int) Tools::getValue('id_wishlist');
$id_product = (int) Tools::getValue('id_product');
$id_product_attribute = (int) Tools::getValue('id_product_attribute');
$quantity = (int) Tools::getValue('quantity');
$priority = Tools::getValue('priority');
$wishlist = new WishList((int) $id_wishlist);
$refresh = $_GET['refresh'] == 'true' ? 1 : 0;
if (empty($id_wishlist) === false) {
if (!strcmp($action, 'update')) {
WishList::updateProduct($id_wishlist, $id_product, $id_product_attribute, $priority, $quantity);
} else {
if (!strcmp($action, 'delete')) {
WishList::removeProduct($id_wishlist, (int) $context->customer->id, $id_product, $id_product_attribute);
}
$products = WishList::getProductByIdCustomer($id_wishlist, $context->customer->id, $context->language->id);
$bought = WishList::getBoughtProduct($id_wishlist);
for ($i = 0; $i < sizeof($products); ++$i) {
$obj = new Product((int) $products[$i]['id_product'], false, $context->language->id);
if (!Validate::isLoadedObject($obj)) {
continue;
} else {
if ($products[$i]['id_product_attribute'] != 0) {
$combination_imgs = $obj->getCombinationImages($context->language->id);
if (isset($combination_imgs[$products[$i]['id_product_attribute']][0])) {
$products[$i]['cover'] = $obj->id . '-' . $combination_imgs[$products[$i]['id_product_attribute']][0]['id_image'];
}
} else {
$images = $obj->getImages($context->language->id);
foreach ($images as $k => $image) {
if ($image['cover']) {
$products[$i]['cover'] = $obj->id . '-' . $image['id_image'];