PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
plugins
/
content-egg
/
application
/
components
<?php namespace ContentEgg\application\components; use ContentEgg\application\helpers\ImageHelper; /** * AffiliateParserModule abstract class file * * @author keywordrush.com <support@keywordrush.com> * @link http://www.keywordrush.com/ * @copyright Copyright © 2015 keywordrush.com */ abstract class AffiliateParserModule extends ParserModule { final public function isAffiliateParser() { return true; } public function isItemsUpdateAvailable() { return false; } public function doRequestItems(array $items) { throw new \Exception('doRequestItems method not implemented yet'); } public function presavePrepare($data, $post_id) { $data = parent::presavePrepare($data, $post_id); foreach ($data as $key => $item) { $data[$key]['percentageSaved'] = 0; if (!isset($data[$key]['priceOld'])) $data[$key]['priceOld'] = $item['priceOld'] = 0; if ($item['priceOld'] && $item['priceOld'] <= $item['price']) $data[$key]['priceOld'] = 0; if (!isset($data[$key]['priceOld'])) $data[$key]['priceOld'] = 0; if ($data[$key]['priceOld'] && $data[$key]['price'] && $data[$key]['price'] < $data[$key]['priceOld']) $data[$key]['percentageSaved'] = floor(((float) $data[$key]['priceOld'] - (float) $data[$key]['price']) / (float) $data[$key]['priceOld'] * 100); } return $data; } public function renderUpdatePanel() { } }
[+]
..
[-] VirtualPage.php
[edit]
[-] Module.php
[edit]
[-] ModuleTemplateManager.php
[edit]
[-] ExtraData.php
[edit]
[-] LinkHandler.php
[edit]
[-] FeaturedImage.php
[edit]
[-] Content.php
[edit]
[-] CEWidget.php
[edit]
[-] BlockTemplateManager.php
[edit]
[-] TemplateManager.php
[edit]
[-] Scheduler.php
[edit]
[-] ModuleApi.php
[edit]
[-] ContentProduct.php
[edit]
[-] ModuleConfig.php
[edit]
[-] AffiliateParserModule.php
[edit]
[-] AffiliateParserModuleConfig.php
[edit]
[-] ParserModuleConfig.php
[edit]
[-] ContentManager.php
[edit]
[-] ParserModule.php
[edit]
[-] index.php
[edit]
[-] ContentCoupon.php
[edit]
[-] Config.php
[edit]
[-] Cpa.php
[edit]
[-] WidgetTemplateManager.php
[edit]
[-] iScheduler.php
[edit]
[-] Shortcoded.php
[edit]
[-] ModuleManager.php
[edit]