當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Hook::deleteProduct方法代碼示例

本文整理匯總了PHP中Hook::deleteProduct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Hook::deleteProduct方法的具體用法?PHP Hook::deleteProduct怎麽用?PHP Hook::deleteProduct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Hook的用法示例。


在下文中一共展示了Hook::deleteProduct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 public function delete()
 {
     if (!GroupReduction::deleteProductReduction($this->id)) {
         return false;
     }
     Hook::deleteProduct($this);
     if (!parent::delete() or !$this->deleteCategories(true) or !$this->deleteImages() or !$this->deleteProductAttributes() or !$this->deleteProductFeatures() or !$this->deleteTags() or !$this->deleteCartProducts() or !$this->deleteAttributesImpacts() or !$this->deleteAttachments() or !$this->deleteCustomization() or !SpecificPrice::deleteByProductId((int) $this->id) or !$this->deletePack() or !$this->deleteProductSale() or !$this->deleteSceneProducts() or !$this->deleteSearchIndexes() or !$this->deleteAccessories() or !$this->deleteFromAccessories()) {
         return false;
     }
     if ($id = ProductDownload::getIdFromIdProduct($this->id)) {
         if ($productDownload = new ProductDownload($id) and !$productDownload->delete(true)) {
             return false;
         }
     }
     return true;
 }
開發者ID:srikanthash09,項目名稱:codetestdatld,代碼行數:16,代碼來源:Product.php

示例2: delete

 public function delete()
 {
     Hook::deleteProduct($this);
     if (!parent::delete() or !$this->deleteCategories() or !$this->deleteImages() or !$this->deleteProductAttributes() or !$this->deleteProductFeatures() or !$this->deleteTags() or !$this->deleteCartProducts() or !$this->deleteAttributesImpacts() or !$this->deleteAttachments() or !$this->deleteCustomization() or !$this->deleteQuantityDiscounts() or !$this->deletePack() or !$this->deleteProductSale() or !$this->deleteSceneProducts() or !$this->deleteSearchIndexes() or !$this->deleteAccessories()) {
         return false;
     }
     if ($id = ProductDownload::getIdFromIdProduct($this->id)) {
         if ($productDownload = new ProductDownload($id) and !$productDownload->delete(true)) {
             return false;
         }
     }
     return true;
 }
開發者ID:Bruno-2M,項目名稱:prestashop,代碼行數:13,代碼來源:Product.php

示例3: delete

 public function delete($force_delete = false)
 {
     // check if the product is not used in a non validated order
     if (!$force_delete && !$this->isDeletable()) {
         return false;
     }
     if (!$force_delete && !GroupReduction::deleteProductReduction($this->id)) {
         return false;
     }
     Hook::deleteProduct($this);
     if (!parent::delete() || !$this->deleteCategories(true) || !$this->deleteProductAttributes() || !$this->deleteProductFeatures() || !$this->deleteTags() || !$this->deleteCartProducts() || !$this->deleteAttachments() || !$this->deleteCustomization() || !SpecificPrice::deleteByProductId((int) $this->id) || !$this->deletePack() || !$this->deleteProductSale() || !$this->deleteSceneProducts() || !$this->deleteSearchIndexes() || !$this->deleteAccessories() || !$this->deleteFromAccessories()) {
         return false;
     }
     if (!_PS_MODE_DEMO_ && !$this->deleteImages()) {
         return false;
     }
     if ($id = ProductDownload::getIdFromIdProduct($this->id)) {
         if ($productDownload = new ProductDownload($id)) {
             if (!$productDownload->delete(true)) {
                 return false;
             }
         }
     }
     return true;
 }
開發者ID:Evil1991,項目名稱:PrestaShop-1.4,代碼行數:25,代碼來源:Product.php

示例4: delete

 public function delete()
 {
     Hook::deleteProduct($this);
     if (!parent::delete() or !$this->deleteCategories() or !$this->deleteImages() or !$this->deleteProductAttributes() or !$this->deleteProductFeatures() or !$this->deleteTags() or !$this->deleteCartProducts() or !$this->deleteAttributesImpacts()) {
         return false;
     }
     if ($id = ProductDownload::getIdFromIdProduct($this->id)) {
         if ($productDownload = new ProductDownload($id) and !$productDownload->delete(true)) {
             return false;
         }
     }
     return true;
 }
開發者ID:raulgimenez,項目名稱:dreamongraphics_shop,代碼行數:13,代碼來源:Product.php


注:本文中的Hook::deleteProduct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。