PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
themes
/
rehub
/
content-egg-templates
<?php /* * Name: Price history table with graph * Modules: * Module Types: PRODUCT * Shortcoded: FALSE */ ?> <?php use ContentEgg\application\helpers\TemplateHelper; use ContentEgg\application\helpers\CurrencyHelper; // sort items by price ?> <?php $postid = (isset($post_id)) ? $post_id : get_the_ID();?> <?php if (get_post_type($postid) == 'product'):?> <?php $itemsync = \ContentEgg\application\WooIntegrator::getSyncItem($postid); $unique_id = $itemsync['unique_id']; $module_id = $itemsync['module_id'];?> <?php else:?> <?php $unique_id = get_post_meta($postid, '_rehub_product_unique_id', true);?> <?php $module_id = get_post_meta($postid, '_rehub_module_ce_id', true);?> <?php endif;?> <?php if ($unique_id && $module_id) :?> <?php $syncitem = ($unique_id) ? $data[$module_id][$unique_id] : '';?> <?php $pricesarray = TemplateHelper::priceHistoryPrices($unique_id, $module_id, $limit = 3); $pricescheck = ''; if (!empty($pricesarray) && is_array($pricesarray)){ $pricescheck = (count($pricesarray) > 1) ? true : ''; } ?> <?php if (!empty($pricescheck) && !empty($syncitem)) :?> <?php $currency_code = (!empty($syncitem['currencyCode'])) ? $syncitem['currencyCode'] : ''; $currency_rate = 1; ?> <?php if(rehub_option('ce_custom_currency')) { $currency_code = rehub_option('ce_custom_currency'); $currency_rate = CurrencyHelper::getCurrencyRate($syncitem['currencyCode'], $currency_code); if (!$currency_rate) $currency_rate = 1; }?> <table class="rh-tabletext-block ce-price-hist"> <tr> <th class="rh-tabletext-block-heading" colspan="2"><?php _e('Price history for ', 'rehub_framework');?><?php echo esc_attr($syncitem['title']); ?></th> </tr> <tr> <td class="rh-tabletext-block-left"> <div class="rh-tabletext-block-latest"> <div class="mb10"><strong><?php _e('Latest updates:', 'rehub_framework');?></strong></div> <?php $prices = TemplateHelper::priceHistoryPrices($unique_id, $module_id, $limit = 8); ?> <?php if ($prices): ?> <ul> <?php foreach ($prices as $price): ?> <li> <?php echo TemplateHelper::formatPriceCurrency($price['price'], $currency_code); ?> - <?php echo date(get_option('date_format'), $price['date']); ?> </li> <?php endforeach; ?> </ul> <?php endif; ?> <?php $since = TemplateHelper::priceHistorySinceDate($unique_id, $module_id); ?> <?php if ($since): ?> <?php _e('Since:', 'rehub_framework');?> <?php echo date(get_option('date_format'), $since); ?> <?php endif; ?> </div> </td> <td class="rh-tabletext-block-right"> <div class="rh-table-price-graph"> <?php TemplateHelper::priceHistoryMorrisChart($unique_id, $module_id, 180, array('lineWidth' => 2, 'postUnits' => ' ' . $currency_code, 'goals' => array((int) $syncitem['price']*$currency_rate), 'fillOpacity' => 0.5), array('style' => 'height: 230px;')); ?> </div> <ul class="rh-lowest-highest"> <?php $price = TemplateHelper::priceHistoryMax($unique_id, $module_id); ?> <?php if ($price): ?> <li> <b style="color: red;"><?php _e('Highest Price:', 'rehub_framework');?></b> <?php echo TemplateHelper::formatPriceCurrency($price['price']*$currency_rate, $currency_code); ?> - <?php echo date(get_option('date_format'), $price['date']); ?> </li> <?php endif; ?> <?php $price = TemplateHelper::priceHistoryMin($unique_id, $module_id); ?> <?php if ($price): ?> <li> <b style="color: green;"><?php _e('Lowest Price:', 'rehub_framework');?></b> <?php echo TemplateHelper::formatPriceCurrency($price['price']*$currency_rate, $currency_code); ?> - <?php echo date(get_option('date_format'), $price['date']); ?> </li> <?php endif; ?> </ul> </td> </tr> </table> <?php else:?> <div class="rhhidden" id="nopricehsection">-</div> <?php endif;?> <?php endif;?>
[+]
..
[+]
AvantlinkProducts
[+]
Flipkart
[+]
Optimisemedia
[+]
Udemy
[+]
QwantImages
[+]
Zanox
[+]
AffilinetProducts
[+]
Walmart
[+]
Youtube
[+]
GoogleImages
[+]
Twitter
[+]
Impactradius
[+]
LomadeeProducts
[-] block_all_logolist_widget.php
[edit]
[+]
PayTM
[+]
Shareasale
[+]
Ebay
[-] block_all_merchant_widget.php
[edit]
[-] .htaccess
[edit]
[+]
Pepperjam
[-] wdgt_price_movers_top_offers.php
[edit]
[-] block_all_offers_logo.php
[edit]
[+]
BingImages
[+]
Flickr
[-] block_all_pricehistory_full.php
[edit]
[+]
AE
[-] wdgt_price_movers_grid.php
[edit]
[+]
TradedoublerProducts
[+]
Offer
[+]
Bolcom
[+]
Linkwise
[+]
Aliexpress
[+]
Envato
[+]
Viglink
[-] block_all_simple_list.php
[edit]
[+]
Kelkoo
[+]
GoogleNews
[+]
GdeSlon
[+]
Amazon
[+]
Affiliatewindow
[+]
Linkshare
[+]
CjProducts
[+]
GoogleBooks
[-] block_all_offers_list.php
[edit]
[+]
TradetrackerProducts
[-] block_all_offers_grid.php
[edit]
[+]
AdmitadProducts
[-] block_all_pricealert_full.php
[edit]