示例#1
0
            echo $currency->createPriceDiv('salesPriceWithDiscount', JText::_("Price: "), $price, false, false, 1.0, true);
        }
        echo '</div>';
        echo '</div>';
    }
    echo '</div>';
    if ($params->get('item_popup_display') == 1) {
        echo '<div class="sj_vm_deals_popup sj_absolute">';
        if ($params->get('item_addtocart_display', 1) == 1) {
            $_item['product'] = $item;
            echo '<div class="item-addtocart">';
            echo shopFunctionsF::renderVmSubLayout('addtocart', $_item);
            echo '</div>';
        }
        if ($params->get('item_quickview_display', 1) == 1) {
            echo '<div class="item-quick-view">';
            echo '<a href="' . $item->link . '" title="' . $item->title . '" ' . VMDealsHelper::parseTarget($params->get('link_target')) . ' style="display:none;"></a>';
            echo '</div>';
        }
        echo '</div>';
    }
    echo '</div>';
    echo '</div>';
}
echo '</div>';
if ($params->get('item_first_product_display', 1) == 1) {
    echo '</div>';
}
?>

示例#2
0
                    echo '<div class="item-inner-title-module-sub-category-item"><a href="' . $ci->link . '">' . $ci->title . '</a></div>';
                }
            }
            echo '</div>';
        }
        echo '</div>';
        if ($params->get('item_image_category_display') == 1) {
            if (class_exists('VMDealsHelper')) {
                $item_img = VMDealsHelper::getVmCImage($category_info[0], $params, 'imgcfgcat');
            } else {
                $item_img = VMDealsPHelper::getVmCImage($category_info[0], $params, 'imgcfgcat');
            }
            if ($item_img) {
                echo '<div class="item-inner-title-module-category-img"> ';
                if (class_exists('VMDealsHelper')) {
                    echo VMDealsHelper::imageTag($item_img, $cat_image_config);
                } else {
                    echo VMDealsPHelper::imageTag($item_img, $cat_image_config);
                }
                echo '</div>';
            }
        }
    }
    echo '</div>';
    if ($type != 'POP') {
        require JModuleHelper::getLayoutPath($module->module, $layout . '_deals');
    } else {
        require JModuleHelper::getLayoutPath($module->module, $layout . '_popup');
    }
    echo '</div>';
} else {
示例#3
0
<?php

/**
 * @package Sj Vm Listing Tabs
 * @version 1.0.0
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @copyright (c) 2014 YouTech Company. All Rights Reserved.
 * @author YouTech Company http://www.smartaddons.com
 *
 */
defined('_JEXEC') or die;
$layout = $params->get('layout', 'default');
$type = $params->get('item_countdown_display');
if ($type != 'POP') {
    require_once dirname(__FILE__) . '/core/helper_deals.php';
    $list = VMDealsHelper::getList($params);
    if ($params->get('item_categori_title_display') == 0) {
        $category_info = VMDealsHelper::getList($params, 1);
    }
} else {
    require_once dirname(__FILE__) . '/core/helper.php';
    $list = VMDealsPHelper::getList($params);
    $category_info = VMDealsPHelper::getList($params, 1);
}
$module_id = 'sj_vm_deal_' . $module->id;
if (count($list) > 0) {
    require JModuleHelper::getLayoutPath($module->module, $layout);
    require JModuleHelper::getLayoutPath($module->module, $layout . '_js');
} else {
    echo 'Has no items';
}
示例#4
0
    $item_img = VMDealsHelper::getVmImage($item, $params, 'imgcfg');
    if ($item_img) {
        echo '<div class="item-image">
									<a href="' . $item->link . '"
										title="' . $item->title . '" ' . VMDealsHelper::parseTarget($params->get('link_target')) . ' >' . VMDealsHelper::imageTag($item_img, $small_image_config) . '
										<span class="image-border"></span>
									</a>';
        echo '</div>';
    }
    if ($params->get('item_title_display', 1) == 1 || $params->get('item_rating_display', 1) == 1 || (int) $params->get('item_prices_display', 1)) {
        echo '<div class="product-info">';
        echo '<div class="block-ratting-title">';
        if ($params->get('item_title_display', 1) == 1) {
            echo '<div class="item-title">';
            echo '<a href="' . $item->link . '" title="' . $item->title . '" ' . VMDealsHelper::parseTarget($params->get('link_target')) . ' >';
            echo VMDealsHelper::truncate($item->title, (int) $params->get('item_title_max_characters', 25));
            echo '</a>';
            echo '</div>';
        }
        if ($params->get('item_rating_display', 1) == 1) {
            if (!isset($item->rating->rating) || $item->rating->rating == null) {
                $rating = 0;
            } else {
                $rating = $item->rating->rating;
            }
            echo '<div class="item-rating" data-rating="' . $rating . '">';
            echo '<div class="item-star"></div>';
            echo '<div class="item-star"></div>';
            echo '<div class="item-star"></div>';
            echo '<div class="item-star"></div>';
            echo '<div class="item-star"></div>';
示例#5
0
    /**
     * Override function getCategories in model Category
     */
    public static function getCategories($onlyPublished = true, $parentId = false, $childId = false, $keyword = "", $vendorId = false)
    {
        $categoryModel = VmModel::getModel('Category');
        $select = ' c.`virtuemart_category_id`, l.`category_description`, l.`category_name`, c.`ordering`, c.`published`, cx.`category_child_id`, cx.`category_parent_id`, c.`shared` ';
        $joinedTables = ' FROM `#__virtuemart_categories_' . VmConfig::$vmlang . '` l
				  JOIN `#__virtuemart_categories` AS c using (`virtuemart_category_id`)
				  LEFT JOIN `#__virtuemart_category_categories` AS cx
				  ON l.`virtuemart_category_id` = cx.`category_child_id` ';
        $where = array();
        if ($onlyPublished) {
            $where[] = " c.`published` = 1 ";
        }
        if ($parentId !== false) {
            $where[] = ' cx.`category_parent_id` = ' . (int) $parentId;
        }
        if ($childId !== false) {
            $where[] = ' cx.`category_child_id` = ' . (int) $childId;
        }
        if ($vendorId === false) {
            $vendorId = VmConfig::isSuperVendor();
        }
        if ($vendorId == 1) {
            $where[] = ' (c.`virtuemart_vendor_id` = "' . (int) $vendorId . '" OR c.`shared` = "1") ';
        }
        if (!empty($keyword)) {
            $db = JFactory::getDBO();
            $keyword = '"%' . $db->escape($keyword, true) . '%"';
            //$keyword = $db->Quote($keyword, false);
            $where[] = ' ( l.`category_name` LIKE ' . $keyword . '
							   OR l.`category_description` LIKE ' . $keyword . ') ';
        }
        $whereString = '';
        if (count($where) > 0) {
            $whereString = ' WHERE ' . implode(' AND ', $where);
        } else {
            $whereString = 'WHERE 1 ';
        }
        $ordering = $categoryModel->_getOrdering();
        self::$_category_tree = $categoryModel->exeSortSearchListQuery(0, $select, $joinedTables, $whereString, 'GROUP BY virtuemart_category_id', $ordering);
        return self::$_category_tree;
    }