Новости Joomla

Обновление пакета плагинов JL Like 5.0

Обновление пакета плагинов  JL Like 5.0

Обновление пакета плагинов JL Like 5.0.0Команда JoomLine рада представить долгожданное обновление плагина социальных кнопок JL Like — версию 5.0.0! В этом релизе мы сделали акцент на совместимости с последними версиями Joomla, улучшении производительности и расширении функционала.👩‍💻 Что нового в JL Like 5.0.0?- Полная совместимость с Joomla 5 — теперь плагин работает на всех актуальных версиях Joomla, включая Joomla 5.- Рефакторинг и оптимизация кода — проведена масштабная чистка и обновление внутренних классов для повышения стабильности и скорости работы.- Удаление устаревших зависимостей — полностью отказались от использования jQuery, что ускорило загрузку страниц и повысило безопасность.- Обновление CSS и удаление неиспользуемых стилей — интерфейс стал еще легче и современнее.- Удалена поддержка устаревших виджетов — например, функциональность твиттер-виджета вынесена из плагина.- Поддержка twitter:card — улучшена интеграция с социальными сетями для красивого отображения ссылок.- Гибкая настройка счетчиков лайков — теперь можно включать и отключать рандомизацию количества лайков.- Улучшено подключение скриптов — переход на WebAssetManager для более корректной работы с ресурсами.- Обновлены языковые переменныеРасширения всё ещё наследуют старую архитектуру плагинов Joomla 3, но были протестированы на Joomla 5.3.Новость на сайте JoomlineСтраница расширенияGitHub расширения@joomlafeed#расширения

0 Пользователей и 1 Гость просматривают эту тему.
  • 2 Ответов
  • 2882 Просмотров
*

secretlive

  • Захожу иногда
  • 52
  • 0 / 0
Вообщем я знаю что на форуме эта тема есть, но немогу никак найти(((

Кто поможет???
Дайте ссылку плиз)))))
*

Sulpher

  • Живу я здесь
  • 2127
  • 402 / 16
  • Шаблоны и расширения Joomla
*

premium

  • Осваиваюсь на форуме
  • 15
  • 0 / 0
Все перепробовал, ничего не получаеться..... :(
Блин очень нада.

Вілажую свой шоп.бровсе )
Кто сможет поправте.
Код
<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName( __FILE__ );

// load important class files
require_once (CLASSPATH."ps_product.php");
$ps_product = new ps_product;
require_once (CLASSPATH."ps_product_category.php");
$ps_product_category = new ps_product_category;
require_once (CLASSPATH."ps_product_files.php");
require_once (CLASSPATH."ps_reviews.php");
require_once (CLASSPATH."imageTools.class.php");
require_once (CLASSPATH."PEAR/Table.php");
require_once(CLASSPATH . 'ps_product_attribute.php' );
$ps_product_attribute = new ps_product_attribute;

$Itemid = $sess->getShopItemid();
$keyword1 = $vmInputFilter->safeSQL( urldecode(vmGet( $_REQUEST, 'keyword1', null )));
$keyword2 = $vmInputFilter->safeSQL( urldecode(vmGet( $_REQUEST, 'keyword2', null )));

$search_op= $vmInputFilter->safeSQL( vmGet( $_REQUEST, 'search_op', null ));
$search_limiter= $vmInputFilter->safeSQL( vmGet( $_REQUEST, 'search_limiter', null ));

if (empty($category_id)) $category_id = $search_category;

$default['category_flypage'] = FLYPAGE;

$db_browse = new ps_DB;
$dbp = new ps_DB;
// NEW: Include the query section from an external file
require_once( PAGEPATH. "shop_browse_queries.php" );

$db_browse->query( $count );

$num_rows = $db_browse->f("num_rows");

if( $limitstart > 0 && $limit >= $num_rows) {

$list = str_replace( 'LIMIT '.$limitstart, 'LIMIT 0', $list );
}
if( $category_id ) {
/**
    * CATEGORY DESCRIPTION
    */
$db->query( "SELECT category_id, category_name FROM #__{vm}_category WHERE category_id='$category_id'");
$db->next_record();
$category_name = shopMakeHtmlSafe( $db->f('category_name') );

/* Set Dynamic Page Title */
$mainframe->setPageTitle( $db->f("category_name") );

$desc =  $ps_product_category->get_description($category_id);
$desc = vmCommonHTML::ParseContentByPlugins( $desc );
/* Prepend Product Short Description Meta Tag "description" when applicable */
$mainframe->prependMetaTag( "description", substr(strip_tags($desc ), 0, 255) );

}
// when nothing has been found we tell this here and say goodbye
if ($num_rows == 0 && (!empty($keyword)||!empty($keyword1))) {
echo $VM_LANG->_('PHPSHOP_NO_SEARCH_RESULT');
}
elseif( $num_rows == 0 && empty($product_type_id) && !empty($child_list)) {
echo $VM_LANG->_('EMPTY_CATEGORY');
}

elseif( $num_rows == 1 && ( !empty($keyword) || !empty($keyword1) ) ) {
// If just one product has been found, we directly show the details page of it
$db_browse->query( $list );
$db_browse->next_record();
$flypage = $db_browse->sf("category_flypage") ? $db_browse->sf("category_flypage") : FLYPAGE;

$url_parameters = "page=shop.product_details&amp;flypage=$flypage&amp;product_id=" . $db_browse->f("product_id") . "&amp;category_id=" . $db_browse->f("category_id");
vmRedirect( $sess->url($url_parameters, true, false ) );
}
else {
// NOW START THE PRODUCT LIST
$tpl = vmTemplate::getInstance();

if( $category_id ) {
/**
    * CATEGORY DESCRIPTION
    */
$browsepage_lbl = $category_name;
$tpl->set( 'browsepage_lbl', $browsepage_lbl );

$tpl->set( 'desc', $desc );

$category_childs = $ps_product_category->get_child_list($category_id);
$tpl->set( 'categories', $category_childs );
$navigation_childlist = $tpl->fetch( 'common/categoryChildlist.tpl.php');
$tpl->set( 'navigation_childlist', $navigation_childlist );

// Set up the CMS pathway
$category_list = array_reverse( $ps_product_category->get_navigation_list($category_id) );
$pathway = $ps_product_category->getPathway( $category_list );
$vm_mainframe->vmAppendPathway( $pathway );

$tpl->set( 'category_id', $category_id );
$tpl->set( 'category_name', $category_name );

$browsepage_header = $tpl->fetch( 'browse/includes/browse_header_category.tpl.php' );

}
elseif( $manufacturer_id) {
$db->query( "SELECT manufacturer_id, mf_name FROM #__{vm}_manufacturer WHERE manufacturer_id='$manufacturer_id'");
$db->next_record();
$mainframe->setPageTitle( $db->f("mf_name") );

$browsepage_lbl = shopMakeHtmlSafe( $db->f("mf_name") );
$tpl->set( 'browsepage_lbl', $browsepage_lbl );
$browsepage_lbltext = $db->f("mf_desc");
$tpl->set( 'browsepage_lbltext', $browsepage_lbltext );
$browsepage_header = $tpl->fetch( 'browse/includes/browse_header_manufacturer.tpl.php' );
}
elseif( $keyword ) {
$mainframe->setPageTitle( $VM_LANG->_('PHPSHOP_SEARCH_TITLE',false) );
$browsepage_lbl = $VM_LANG->_('PHPSHOP_SEARCH_TITLE') .': '.shopMakeHtmlSafe( $keyword );
$tpl->set( 'browsepage_lbl', $browsepage_lbl );

$browsepage_header = $tpl->fetch( 'browse/includes/browse_header_keyword.tpl.php' );
}
else {
$mainframe->setPageTitle( $VM_LANG->_('PHPSHOP_BROWSE_LBL',false) );#
$browsepage_lbl = $VM_LANG->_('PHPSHOP_BROWSE_LBL');
$tpl->set( 'browsepage_lbl', $browsepage_lbl );

$browsepage_header = $tpl->fetch( 'browse/includes/browse_header_all.tpl.php' );
}
$tpl->set( 'browsepage_header', $browsepage_header );

if (!empty($product_type_id) && @$_REQUEST['output'] != "pdf") {
$tpl->set( 'ps_product_type', $ps_product_type);
$tpl->set( 'product_type_id', $product_type_id);
$parameter_form = $tpl->fetch( 'browse/includes/browse_searchparameter_form.tpl.php' );
}
else {
$parameter_form = '';
}
$tpl->set( 'parameter_form', $parameter_form );

// Decide whether to show the limit box
$show_limitbox = ( $num_rows > 5 && @$_REQUEST['output'] != "pdf" );
$tpl->set( 'show_limitbox', $show_limitbox );

// Decide whether to show the top navigation
$show_top_navigation = ( PSHOP_SHOW_TOP_PAGENAV =='1' && $num_rows > $limit );
$tpl->set( 'show_top_navigation', $show_top_navigation );

// Prepare Page Navigation
require_once( CLASSPATH . 'pageNavigation.class.php' );
$pagenav = new vmPageNav( $num_rows, $limitstart, $limit );
$tpl->set( 'pagenav', $pagenav );

$search_string = '';
if ( $num_rows > 1 && @$_REQUEST['output'] != "pdf") {
if ( $num_rows > $limit  || $num_rows > 5 ) {
$search_string = $mm_action_url."index.php?option=com_virtuemart&amp;page=$modulename.browse&amp;category_id=$category_id&amp;keyword=".urlencode( $keyword )."&amp;manufacturer_id=$manufacturer_id&amp;Itemid=$Itemid";
$search_string .= !empty($orderby) ? "&amp;orderby=".urlencode($orderby) : "";

if (!empty($keyword1)) {
$search_string.="&amp;keyword1=".urlencode($keyword1);
$search_string.="&amp;search_category=$search_category";
$search_string.="&amp;search_limiter=$search_limiter";
if (!empty($keyword2)) {
$search_string.="&amp;keyword2=".urlencode($keyword2);
$search_string.="&amp;search_op=$search_op";
}
}

if (!empty($product_type_id)){
foreach($_REQUEST as $key => $value){
if (substr($key, 0,13) == "product_type_"){
$val = vmGet($_REQUEST, $key );
if( is_array( $val )) {
foreach( $val as $var ) {
$search_string .="&".$key."[]=".urlencode($var);
}
} else {
$search_string .="&".$key."=".urlencode($val);
}
}
}
}

}

$tpl->set( 'VM_BROWSE_ORDERBY_FIELDS', $VM_BROWSE_ORDERBY_FIELDS);
   
    if ($DescOrderBy == "DESC") {
        $icon = "sort_desc.png";
        $selected = Array( "selected=\"selected\"", "" );
  $asc_desc = Array( "DESC", "ASC" );
}
else {
  $icon = "sort_asc.png";
        $selected = Array( "", "selected=\"selected\"" );
        $asc_desc = Array( "ASC", "DESC" );
    }
$tpl->set( 'orderby', $orderby );
$tpl->set( 'icon', $icon );
$tpl->set( 'selected', $selected );
$tpl->set( 'asc_desc', $asc_desc );
$tpl->set( 'category_id', $category_id );
$tpl->set( 'manufacturer_id', $manufacturer_id );
$tpl->set( 'keyword', urlencode( $keyword ) );
$tpl->set( 'keyword1', urlencode( $keyword1 ) );
$tpl->set( 'keyword2', urlencode( $keyword2 ) );
$tpl->set( 'Itemid', $Itemid );

if( $show_top_navigation ) {
$tpl->set( 'search_string', $search_string );
}

$orderby_form = $tpl->fetch( 'browse/includes/browse_orderbyform.tpl.php' );
$tpl->set( 'orderby_form', $orderby_form );
    }
    else {
    $tpl->set( 'orderby_form', '' );
    }

$db_browse->query( $list );
$db_browse->next_record();

$products_per_row = (!empty($category_id)) ? $db_browse->f("products_per_row") : PRODUCTS_PER_ROW;

if( $products_per_row < 1 ) {
$products_per_row = 1;
}
$buttons_header = '';
/**
*   Start caching all product details for a later loop
*
**/
if(@$_REQUEST['output'] != "pdf") {

// Show the PDF, Email and Print buttons
$tpl->set('option', $option);
$tpl->set('category_id', $category_id );
$tpl->set('product_id', $product_id );
$buttons_header = $tpl->fetch( 'common/buttons.tpl.php' );

$templatefile = (!empty($category_id)) ? $db_browse->f("category_browsepage") : CATEGORY_TEMPLATE;
if( $templatefile == 'managed' ) {
// automatically select the browse template with the best match for the number of products per row
$templatefile = file_exists(VM_THEMEPATH.'templates/browse/browse_'.$products_per_row.'.php' )
? 'browse_'.$products_per_row
: 'browse_5';
} elseif( !file_exists(VM_THEMEPATH.'templates/browse/'.$templatefile.'.php')) {
$templatefile = 'browse_5';
}
}
else {
$templatefile = "browse_lite_pdf";
}

$tpl->set( 'buttons_header', $buttons_header );

$tpl->set('products_per_row', $products_per_row );
$tpl->set('templatefile', $templatefile );

$db_browse->reset();

$products = array();
$counter = 0;

/*** Start printing out all products (in that category) ***/
while ($db_browse->next_record()) {
 
$manufacturer_id = $ps_product->get_manufacturer_id($db_browse->f("product_id"));
$manufacturer_name = $ps_product->get_mf_name($db_browse->f("product_id"));
$manufacturer_link = "";
if( $manufacturer_id && !empty($manufacturer_name) ) {
$link = "$mosConfig_live_site/index2.php?page=shop.manufacturer_page&amp;manufacturer_id=$manufacturer_id&amp;output=lite&amp;option=com_virtuemart&amp;Itemid=".$Itemid;
$text = '( '.$manufacturer_name.' )';
$manufacturer_link .= vmPopupLink( $link, $text );
}

// If it is item get parent:
$product_parent_id = $db_browse->f("product_parent_id");
if ($product_parent_id != 0) {
$dbp->query("SELECT product_full_image,product_thumb_image,product_name,product_s_desc FROM #__{vm}_product WHERE product_id='$product_parent_id'" );
$dbp->next_record();
}

// Set the flypage for this product based on the category.
// If no flypage is set then use the default as set in virtuemart.cfg.php
$flypage = $db_browse->sf("category_flypage");

if (empty($flypage)) {
            $flypage = FLYPAGE;
        }
        $url_parameters = "page=shop.product_details&amp;flypage=$flypage&amp;product_id=" . $db_browse->f("product_id") . "&amp;category_id=" . $db_browse->f("category_id");
        if( $manufacturer_id ) {
        $url_parameters .= "&amp;manufacturer_id=" . $manufacturer_id;
        }
        if( $keyword != '') {
        $url_parameters .= "&amp;keyword=".urlencode($keyword);
        }
        $url = $sess->url( $url_parameters );

        // Price: xx.xx EUR
if (_SHOW_PRICES == '1' && $auth['show_prices']) {
$product_price = $ps_product->show_price( $db_browse->f("product_id") );
}
else {
$product_price = "";
}
// @var array $product_price_raw The raw unformatted Product Price in Float Format
$product_price_raw = $ps_product->get_adjusted_attribute_price($db_browse->f('product_id'));

// i is the index for the array holding all products, we need to show. to allow sorting by discounted price,
// we need to use the price as first part of the index name!
$i = $product_price_raw['product_price'] . '_' . ++$counter;

        if( $db_browse->f("product_thumb_image") ) {
            $product_thumb_image = $db_browse->f("product_thumb_image");
}
else {
if( $product_parent_id != 0 ) {
$product_thumb_image = $dbp->f("product_thumb_image"); // Use product_thumb_image from Parent Product
}
else {
$product_thumb_image = 0;
}
}
if( $product_thumb_image ) {
if( substr( $product_thumb_image, 0, 4) != "http" ) {
if(PSHOP_IMG_RESIZE_ENABLE == '1') {
$product_thumb_image = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($product_thumb_image)."&amp;newxsize=".PSHOP_IMG_WIDTH."&amp;newysize=".PSHOP_IMG_HEIGHT."&amp;fileout=";
}
elseif( !file_exists( IMAGEPATH."product/".$product_thumb_image )) {
                    $product_thumb_image = VM_THEMEURL.'images/'.NO_IMAGE;
                }
}
}
else {
$product_thumb_image = VM_THEMEURL.'images/'.NO_IMAGE;
}

// Get the full image path, or URL if set, or the no_image
if( $db_browse->f("product_full_image") ) {
$product_full_image = $db_browse->f("product_full_image");
} elseif( $product_parent_id != 0 ) {
$product_full_image = $dbp->f("product_full_image"); // Use product_full_image from Parent Product
}
else {
$product_full_image = VM_THEMEURL . 'images/' . NO_IMAGE;

// Get the size information for the no_image
if( file_exists( VM_THEMEPATH . 'images/' . NO_IMAGE ) ) {
$full_image_info = getimagesize( VM_THEMEPATH . 'images/' . NO_IMAGE );
$full_image_width = $full_image_info[0]+40;
$full_image_height = $full_image_info[1]+40;
}
}

// Get image size information and add the full URL
if( substr( $product_full_image, 0, 4) != 'http' ) {
// This is a local image
if( file_exists( IMAGEPATH . 'product/' . $product_full_image ) ) {
$full_image_info = getimagesize( IMAGEPATH . 'product/' . $product_full_image );
$full_image_width = $full_image_info[0]+40;
$full_image_height = $full_image_info[1]+40;
}

$product_full_image = IMAGEURL . 'product/' . $product_full_image;
} elseif( !isset( $full_image_width ) || !isset( $full_image_height ) ) {
// This is a URL image
$full_image_info = getimagesize( $product_full_image );
$full_image_width = $full_image_info[0]+40;
$full_image_height = $full_image_info[1]+40;
}

$files = ps_product_files::getFilesForProduct( $db_browse->f('product_id') );
$products[$i]['files'] = $files['files'];
$products[$i]['images'] = $files['images'];

$product_name = $db_browse->f("product_name");
if( $db_browse->f("product_publish") == "N" ) {
$product_name .= " (". $VM_LANG->_('CMN_UNPUBLISHED',false) .")";
}

if( empty($product_name) && $product_parent_id!=0 ) {
$product_name = $dbp->f("product_name"); // Use product_name from Parent Product
}
$product_s_desc = $db_browse->f("product_s_desc");
if( empty($product_s_desc) && $product_parent_id!=0 ) {
$product_s_desc = $dbp->f("product_s_desc"); // Use product_s_desc from Parent Product
}
$product_details = $VM_LANG->_('PHPSHOP_FLYPAGE_LBL');

if (PSHOP_ALLOW_REVIEWS == '1' && @$_REQUEST['output'] != "pdf") {
// Average customer rating: xxxxx
        // Total votes: x
$product_rating = ps_reviews::allvotes( $db_browse->f("product_id") );
}
else {
$product_rating = "";
}

// Add-to-Cart Button
if (USE_AS_CATALOGUE != '1' && $product_price != ""
&& !stristr( $product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') )
&& !ps_product::product_has_attributes( $db_browse->f('product_id'), true )
&& $tpl->get_cfg( 'showAddtocartButtonOnProductList' ) ) {

$tpl->set( 'i', $i );
$tpl->set( 'product_id', $db_browse->f('product_id') );
$tpl->set( 'product_in_stock', $db_browse->f('product_in_stock') );
$tpl->set( 'ps_product_attribute', $ps_product_attribute );
$products[$i]['form_addtocart'] = $tpl->fetch( 'browse/includes/addtocart_form.tpl.php' );
$products[$i]['has_addtocart'] = true;
}
else {
$products[$i]['form_addtocart'] = '';
$products[$i]['has_addtocart'] = false;
}

$products[$i]['product_flypage'] = $url;
$products[$i]['product_thumb_image'] = $product_thumb_image;
$products[$i]['product_full_image'] = $product_full_image;
$products[$i]['full_image_width'] = $full_image_width;
$products[$i]['full_image_height'] = $full_image_height;

// Unset these for the next product
unset($full_image_width);
unset($full_image_height);

$products[$i]['product_name'] = shopMakeHtmlSafe( $product_name );
$products[$i]['product_s_desc'] = $product_s_desc;
$products[$i]['product_details'] = $product_details;
$products[$i]['product_rating'] = $product_rating;
$products[$i]['product_price'] = $product_price;
$products[$i]['product_price_raw'] = $product_price_raw;
$products[$i]['product_sku'] = $db_browse->f("product_sku");
$products[$i]['product_weight'] = $db_browse->f("product_weight");
$products[$i]['product_weight_uom'] = $db_browse->f("product_weight_uom");
$products[$i]['product_length'] = $db_browse->f("product_length");
$products[$i]['product_width'] = $db_browse->f("product_width");
$products[$i]['product_height'] = $db_browse->f("product_height");
$products[$i]['product_lwh_uom'] = $db_browse->f("product_lwh_uom");
$products[$i]['product_in_stock'] = $db_browse->f("product_in_stock");
$products[$i]['product_available_date'] = $VM_LANG->convert( vmFormatDate($db_browse->f("product_available_date"), $VM_LANG->_('DATE_FORMAT_LC') ));
$products[$i]['product_availability'] = $db_browse->f("product_availability");
$products[$i]['cdate'] = $VM_LANG->convert( vmFormatDate($db_browse->f("cdate"), $VM_LANG->_('DATE_FORMAT_LC') ));
$products[$i]['mdate'] = $VM_LANG->convert( vmFormatDate($db_browse->f("mdate"), $VM_LANG->_('DATE_FORMAT_LC') ));
$products[$i]['product_url'] = $db_browse->f("product_url");

} // END OF while loop

// Need to re-order here, because the browse query doesn't fetch discounts
if( $orderby == 'product_price' ) {
if ($DescOrderBy == "DESC") {
// using krsort when the Array must be sorted reverse (Descending Order)
krsort($products, SORT_NUMERIC);
} else {
// using ksort when the Array must be sorted in ascending order 
ksort($products, SORT_NUMERIC);
}
}
$tpl->set( 'products', $products );
$tpl->set( 'search_string', $search_string );

if ( $num_rows > 1 ) {
$browsepage_footer = $tpl->fetch( 'browse/includes/browse_pagenav.tpl.php' );
$tpl->set( 'browsepage_footer', $browsepage_footer );
} else {
$tpl->set( 'browsepage_footer', '' );
}


$recent_products = $ps_product->recentProducts(null,$tpl->get_cfg('showRecent', 5));
$tpl->set('recent_products',$recent_products);

$tpl->set('ps_product',$ps_product);
echo $tpl->fetch( $tpl->config->get( 'productListStyle' ) );
}
$product_cell = str_replace( "{manufacturer}", $manufacturer_link, $product_cell );
?>
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Сортировка товаров по дате поступления

Автор coob

Ответов: 2
Просмотров: 2503
Последний ответ 21.06.2018, 08:40:05
от kungurskiy
Сортировка товаров категории по алфавиту

Автор atlet

Ответов: 5
Просмотров: 1999
Последний ответ 20.11.2015, 18:33:50
от atlet
Вывод товара из дочерних категорий в родительскую

Автор B0nG

Ответов: 0
Просмотров: 1823
Последний ответ 03.08.2014, 15:13:57
от B0nG
ID товара вместо cdata

Автор newsky

Ответов: 0
Просмотров: 1545
Последний ответ 01.07.2014, 13:05:12
от newsky
Расширенный Ajax-поиск по характеристикам товара VirtueMart

Автор Arkadiy

Ответов: 990
Просмотров: 204882
Последний ответ 27.06.2014, 16:47:52
от DeLight