Новости Joomla

Как тестировать Joomla PHP-разработчику? Компонент Patch tester.

👩‍💻 Как тестировать Joomla PHP-разработчику? Компонент Patch tester.Joomla - open source PHP-фреймворк с готовой админкой. Его основная разработка ведётся на GitHub. Для того, чтобы международному сообществу разработчиков было удобнее тестировать Pull Requests был создан компонент Patch Tester, который позволяет "накатить" на текущую установку Joomla именно те изменения, которые необходимо протестировать. На стороне инфраструктуры Joomla для каждого PR собираются готовые пакеты, в которых находится ядро + предложенные изменения. В каждом PR обычно находятся инструкции по тестированию: куда зайти, что нажать, ожидаемый результат. Тестировщики могут предположить дополнительные сценарии, исходя из своего опыта и найти баги, о которых сообщить разработчику. Или не найти, и тогда улучшение или исправление ошибки быстрее войдёт в ядро Joomla. Напомню, что для того, чтобы PR вошёл в ядро Joomla нужны минимум 2 положительных теста от 2 участников сообщества, кроме автора. Видео на YouTubeВидео на VK ВидеоВидео на RuTubeКомпонент на GitHub https://github.com/joomla-extensions/patchtester@joomlafeed#joomla #php #webdev #community

Вышел релиз Revo PageBuilder Toolkit for YOOtheme Pro 1.6

Вышел релиз Revo PageBuilder Toolkit for YOOtheme Pro 1.6.2PageBuilder Toolkit - это специализированный плагин для конструктора страниц Yootheme Pro, содержит набор различных утилит для ускорения процесса работы и отладки макета, множественные улучшения в интерфейсе, включая поддержку dark mode, подсказки, быстрая смена разрешения в окне просмотра и много чего еще.v.1.6.2 Что нового?- Индикатор статусов: теперь не просто показывает состояние запросов, но и делает автоматические попытки их отправки при кратковременных сбоях в сети, а если это не помогло, то переводит конструктор в ручной режим, что позволяет сохранит макет и настройки темы прежде чем вы потеряете все, что было сделано с момента последнего сохранения- Подсветка ошибок в макете: плагин анализирует код страницы и может автоматически подсвечивать data атрибуты с кучей мусора, которые попадают в код страницы при копипасте из Figma в TinyMCE (пригодится для старых макетов, в текущей работе плагин сам очищает код мусора). Также есть подсветка семантических ошибок сборки - дубли h1 тега на странице и вложенных друг в друга заголовков.- Улучшена поддержка будущего релиза Yootheme Pro 5 и редактора CodeMirror 6Плагин для русскоязычных пользователей доступен в каталоге расширений SovMart и распространяется за символическую плату (100р). Разработчики Joomla расширений и партнеры автора могут получить плагин бесплатно.Для работы плагина необходим конструктор страниц Yootheme Pro.Разработчик плагина - участник нашего сообщества Александр Судьбинов (@alexrevo), член официальной группы поддержки Yootheme Pro. Страница расширенияОписание на сайте автора@joomlafeed#joomla #yootheme

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

nightbodom

  • Захожу иногда
  • 97
  • 1 / 1
Подскажите пожалуйста, как мне сделать такие же ссылки на товары как тут
http://mobilphone-nn.ru/telefony-tv/a5000-android-htc-desire-z

тоесть получается так http://домен/категория/товар

у меня есть все файлы этого сайта. я перекидывал файлы router.php и ps_session.php но ничего не изменяется.
даже перекидывал .htaccess, бесполезно.

Помогите пожалуйста
*

ELLE

  • Глобальный модератор
  • 4505
  • 893 / 0
Re: Как изменить ссылки товаров?
« Ответ #1 : 09.12.2011, 17:04:08 »
может лучше своё что-то сделать?
и откуда у вас чужой сайт?
*

nightbodom

  • Захожу иногда
  • 97
  • 1 / 1
Re: Как изменить ссылки товаров?
« Ответ #2 : 09.12.2011, 17:10:36 »
Меня больше такой вариант устраивает
Владелец сайта мой знакомый. дал мне поюзать его
*

ELLE

  • Глобальный модератор
  • 4505
  • 893 / 0
Re: Как изменить ссылки товаров?
« Ответ #3 : 09.12.2011, 17:16:07 »
Меня больше такой вариант устраивает
Владелец сайта мой знакомый. дал мне поюзать его
а слабО у него спросить?
или тут вы просто так интересуетесь граберами?
*

nightbodom

  • Захожу иногда
  • 97
  • 1 / 1
Re: Как изменить ссылки товаров?
« Ответ #4 : 09.12.2011, 17:18:22 »
Он его сам не делал сайт. ему делал программер которого сейчас не возможно найти.
А те граберы я давно искал. я уже забил на тот каталог сайтов.
Я делаю свой магазин, и хочу чтобы в нем было все идеально
*

ELLE

  • Глобальный модератор
  • 4505
  • 893 / 0
Re: Как изменить ссылки товаров?
« Ответ #5 : 09.12.2011, 17:27:46 »

Я делаю свой магазин, и хочу чтобы в нем было все идеально

special for you
*

nightbodom

  • Захожу иногда
  • 97
  • 1 / 1
Re: Как изменить ссылки товаров?
« Ответ #6 : 09.12.2011, 17:29:12 »
Спасибо за поддержку :laugh:
*

Град

  • Захожу иногда
  • 152
  • 67 / 0
  • В Багдаде все спокойно
СИЛЬНЫЙ ЕСТ ВКУСНОГО !
*

nightbodom

  • Захожу иногда
  • 97
  • 1 / 1
Re: Как изменить ссылки товаров?
« Ответ #8 : 10.12.2011, 20:15:45 »
Я нашел решение

Для начала надо скачать и установить плагин vmsef http://alex-kurteev.ru/rasshireniya/dopolneniya-k-rassh-m/virtuemart/plagin-sozdanie-druzhestvennyh-urlov-vmsef-for-virtuemart.html

потом в папке components/com_virtuemart/ создать файл router.php

Вставить в него этот код
Код: php
<?php
/**
 * vmsefr.php - Version 1.37 July 01, 2010
 * Copyright (C) 2010 Hagen Petersen - All rights reserved.
 *
 * vmsefr.php from vmSEF enables SEF-Links for VirtueMart.
 * Get more info and how to use at http//www.tinkeltools.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

defined( '_JEXEC' ) or die( 'Restricted access' );
global $vmsefalias, $vmsefparams;
$vmsefparams = vmsef_params();
mb_internal_encoding("UTF-8");

function virtuemartParseRoute($segments) {

if (!enable()) return $segments;
$result = get_all_alias(str_replace(':', '-', end($segments)));
$item = $result['item'];
if (!is_array($item)){
return $segments;
}
if ($item_alias = get_alias($item)){
set_canonical($item_alias['id']);
} elseif ($_SERVER['QUERY_STRING']){
set_canonical();
}
return $item;
}


function virtuemartBuildRoute(&$query){

if (!enable()) return $query;
$segments = array();
unset($query['flypage']);
if (isset($query['page']) && (($query['page'] == 'shop.browse' && (isset($query['category_id']) && $query['category_id'] != '') || $query['page'] == 'shop.product_details'))){
isset($query['product_id'])? $query['product_id']  = (int)$query['product_id']:'';
isset($query['category_id'])? $query['category_id'] = (int)$query['category_id']:'';
if ($item = get_alias($query)){
$query['Itemid'] = $item['id'];
unset($query['manufacturer_id']);
} else {
$alias = get_all_alias();
if (isset($query['category_id'])){
$parent = $query['category_id'];
}
if (isset($query['product_id']) && $query['product_id']) {
$segments[] = $alias['product'][$query['product_id']]['name'];
$parent = $alias['product'][$query['product_id']]['parent'];
unset($query['manufacturer_id']);
}
if (!empty($parent)){
while ($parent > 0){
$temp['category_id'] = $parent;
if($item = get_alias($temp)){
$query['Itemid'] = $item['id'];
break;
}
if(isset($segments)){
array_unshift($segments, $alias['category'][$parent]['name']);
} else {
$segments[]=$alias['category'][$parent]['name'];
}
$parent = $alias['category'][$parent]['parent'];
}
}
}
if (!isset($query['manufacturer_id']) && !isset($query['limit'])){
unset($query['page'],$query['keyword']);
}
unset($query['product_id'],$query['category_id']);
}
return $segments;
}


function get_alias($request){

if (!isset($request['product_id'])) $request['product_id'] = 0;
if (!isset($request['category_id'])) $request['category_id'] = 0;
$query_menu = "
SELECT id, alias, link, params
FROM #__menu
WHERE link like '%index.php?option=com_virtuemart%' and
(params like '%product_id=" . $request['product_id'] . "%' or params like '%category_id=" . $request['category_id'] . "%')";
$db =& JFactory::getDBO();
$db->setQuery($query_menu);
$menuelist = $db->loadObjectList();
if ($menuelist){
$founded = false;
$app =& JFactory::getApplication();
$menu =& $app->getMenu();
    foreach ($menuelist as $item){
    $product_id = 0;
    $category_id = 0;
$params =& $menu->getParams($item->id);
if (!empty($params->_registry['_default']['data']->product_id)){
$product_id = $params->_registry['_default']['data']->product_id;
}
if (!empty($params->_registry['_default']['data']->category_id)){
$category_id = $params->_registry['_default']['data']->category_id;
}
if (($category_id == $request['category_id']) && ($product_id < 1)  && ($request['product_id'] < 1)){
$founded = true;
} elseif (($category_id == $request['category_id']) && ($product_id == $request['product_id'])  && ($request['product_id'] > 0)){
$founded = true;
} elseif (($product_id  == $request['product_id'])  && ($request['product_id'] > 0)){
$founded = true;
}
if ($founded){
$items['alias'] = $item->alias;
$items['id'] = $item->id;
$items['flypage'] = $params->_registry['_default']['data']->flypage;
break;
}
}
}
if (isset($items)){
return $items;
}
}


function get_all_alias($name=''){

$query_item = "
SELECT c.category_id, c.category_name, cref.category_parent_id FROM #__".VMSEF_TABLEPREFIX."_category AS c, #__".VMSEF_TABLEPREFIX."_category_xref AS cref WHERE c.category_id = cref.category_child_id ORDER BY c.category_id";
$db =& JFactory::getDBO();
$db->setQuery($query_item);
$result = $db->loadAssocList();
$found = false;
foreach ($result as $item) {
$string = vmsef_safe_url($item['category_name']);
if (isset($temp[$string])) $string = $item['category_id'] . VMSEFSP . $string;
$alias['category'][$item['category_id']] = array('parent'=>$item['category_parent_id'], 'name'=>$string);
$temp[$string] = true;
if (($name) && ($name == $string)){
$alias['item']['page'] = 'shop.browse';
$alias['item']['category_id'] = $item['category_id'];
$found = true;
break;
}
}
if (!$found){
$query_item = "
SELECT p.product_id, p.product_name, p.product_sku, c.category_id FROM #__".VMSEF_TABLEPREFIX."_product AS p, #__".VMSEF_TABLEPREFIX."_product_category_xref AS c WHERE IF(p.product_parent_id > 0, p.product_parent_id, p.product_id) = c.product_id ORDER BY p.product_id";
$db =& JFactory::getDBO();
$db->setQuery($query_item);
$result = $db->loadAssocList();
foreach ($result as $item) {
$string = vmsef_safe_url($item['product_name']);
if (isset($temp[$string])) $string = $item['product_id'] . VMSEFSP . $string;
$alias['product'][$item['product_id']] = array('parent'=>$item['category_id'], 'name'=>$string);
$temp[$string] = true;
if (($name) && ($name == $string)){
$alias['item']['page'] = 'shop.product_details';
$alias['item']['product_id'] = $item['product_id'];
break;
}
}
}
return $alias;
}


function set_canonical($item_id = 0){

$plugin =& JPluginHelper::getPlugin('system', 'vmsef');
$pluginParams = new JParameter( $plugin->params );
$doc =& JFactory::getDocument();

if ($pluginParams->get('canonical',1) == 1){
if ($item_id == 0){
$canonical = JURI::current();
} else {
$canonical = substr(JURI::base(),0, -1). JRoute::_('index.php?option=com_virtuemart&Itemid=' . $item_id);
}
$doc =& JFactory::getDocument();
$headers=$doc->getHeadData();
foreach($headers['links'] as $temp=>$key){
if(is_integer(strpos($key, "canonical"))){
return;
}
}
}
$doc =& JFactory::getDocument();
if ($doc->getType() == "html"){
if ($pluginParams->get('canonical',1) == 1){
$doc->addHeadLink($canonical, 'canonical');
}
if ($pluginParams->get('noindex',1) == 1){
set_metarobots(NOINDEX);
}
}
return;
}


function set_metarobots ($index = NOINDEX){

$doc =& JFactory::getDocument();
if ($doc->getType() == "html" && $index != ''){
$doc->setMetaData('robots', $index);
}
}


function command($string){
$string = str_replace(' ', '', $string);
$string = str_replace('[SPACE]', ' ', $string);
return $string;
}


function enable(){
if (JPluginHelper::isEnabled('system','vmsef')){
return true;
} else {
if (@unlink(__File__)){
if (file_exists(str_replace('router', 'vmsef', __File__))){
rename(str_replace('router', 'vmsef', __File__),__File__);
}
}
}
}

function vmsef_params(){

$vm = 'vm';
$vm_cfg_path = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'virtuemart.cfg.php';
if(file_exists($vm_cfg_path)){
$vm_cfg = file_get_contents($vm_cfg_path);
if (preg_match('/(?<=VM_TABLEPREFIX\', \').+(?=\')/', $vm_cfg, $regs)) {
if ($regs[0] != '') $vm = $regs[0];
}
}
define ('VMSEF_TABLEPREFIX' , $vm);
$plugin =& JPluginHelper::getPlugin('system', 'vmsef');
$pluginParams = new JParameter($plugin->params);
define ('VMSEFCANONICAL', $pluginParams->get('canonical',1));
define ('VMSEFNOINDEX', $pluginParams->get('noindex',1));
define ('VMSEFEXCHANGE', $pluginParams->get('replace',0));
define ('NOINDEX', 'noindex, follow');
define ('VMSEFSP',chr(45));
$replpatt = trim($pluginParams->get('pattern',''));

if ($replpatt != ''){
preg_match_all("/.+/m", $replpatt, $regs, PREG_PATTERN_ORDER);
$par_arr = $regs[0];
if ($par_arr){
$i=0;
foreach ($par_arr as $patt){
preg_match("/(?<==).+/u", $patt, $regs);
if (isset($regs[0]) && $regs[0] != ''){
$params['e'][$i] = "[". preqqoute(command($regs[0])). "]";
preg_match("/^.{1,4}(?==)/u", $patt, $regs);
if(isset($regs[0]) && $regs[0] != ''){
$params['c'][$i] = command($regs[0]);
} else {
$params['c'][$i] = '';
}
++$i;
}
}
}
}
return $params;
}

function vmsef_safe_url($string = ''){

global $vmsefparams;
if (VMSEFEXCHANGE > 0 && isset($vmsefparams['e'])){
mb_regex_encoding("UTF-8");
  for ($i = 0; $i < count($vmsefparams['e']); $i++) {
$string = mb_ereg_replace($vmsefparams['e'][$i], $vmsefparams['c'][$i], $string);
}
}
if (VMSEFEXCHANGE < 2){
$string = JFilterOutput::stringURLSafe($string);
}
$string = preg_replace('/[- ]{1,10}/', VMSEFSP,$string);
$string = preg_replace('/^[- ]|[- ]$/m', '', $string);
return $string;
}


function preqqoute($string=''){

return preg_quote($string,'/');
}
?>

Проверьте есть ли у Вас в этой папке файл vmsef.php
если нет то создаем и вставляем этот код
Код: php
<?php
/**
 * router.php - Version 1.21 April 06, 2010
 * Copyright (C) 2010 Hagen Petersen - All rights reserved.
 *
 * router.php from vmSEF enables SEF-Links for VirtueMart.
 * Get more info and how to use at http//en.tinkeltools.de
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

defined( '_JEXEC' ) or die( 'Restricted access' );
define ('NOINDEX', 'noindex, follow');
define ('SPACE', '-'); // use '-' or '_' but not ' ' (space)!

function virtuemartParseRoute($segments) {

if (!enable()){
return $segments;
}
$result = get_all_alias(str_replace(':', '-', end($segments)));
$item = $result['item'];
if (!is_array($item)){
return $segments;
}
if ($item_alias = get_alias($item)){
set_canonical($item_alias['id']);
} elseif ($_SERVER['QUERY_STRING']){
set_canonical();
}
return $item;
}


function virtuemartBuildRoute(&$query){

if (!enable()){
return $query;
}
$segments = array();
unset($query['flypage']);
    unset($query['pop']);
if (isset($query['page']) && ($query['page'] == 'shop.browse' || $query['page'] == 'shop.product_details')){
if ($item = get_alias($query)){
$query['Itemid'] = $item['id'];
unset($query['manufacturer_id']);
} else {
$alias = get_all_alias();
if (isset($query['category_id'])){
$parent = $query['category_id'];
}
if (isset($query['product_id']) && $query['product_id']) {
$segments[] = $alias['product'][$query['product_id']]['name'];
$parent = $alias['product'][$query['product_id']]['parent'];
unset($query['manufacturer_id']);
}
if (!empty($parent)){
while ($parent > 0){
if(isset($segments)){
array_unshift($segments, $alias['category'][$parent]['name']);
} else {
$segments[]=$alias['category'][$parent]['name'];
}
$parent = $alias['category'][$parent]['parent'];
}
}
}
if (!isset($query['manufacturer_id'])){
unset($query['page']);
}
unset($query['product_id'],$query['category_id'],$query['keyword']);
}
return $segments;
}


function get_alias($request){

if (!isset($request['product_id'])) $request['product_id'] = 0;
if (!isset($request['category_id'])) $request['category_id'] = 0;
$query_menu = "
SELECT id, alias, link, params
FROM #__menu
WHERE link like '%index.php?option=com_virtuemart%' and
(params like '%product_id=" . $request['product_id'] . "%' or params like '%category_id=" . $request['category_id'] . "%')";
$db =& JFactory::getDBO();
$db->setQuery($query_menu);
$menuelist = $db->loadObjectList();
if ($menuelist){
$founded = false;
    foreach ($menuelist as $item){
    $product_id = 0;
    $category_id = 0;
$app =& JFactory::getApplication();
$menu =& $app->getMenu();
$params =& $menu->getParams($item->id);
if (!empty($params->_registry['_default']['data']->product_id)){
$product_id = $params->_registry['_default']['data']->product_id;
}
if (!empty($params->_registry['_default']['data']->category_id)){
$category_id = $params->_registry['_default']['data']->category_id;
}
if (($category_id == $request['category_id']) && ($product_id < 1)  && ($request['product_id'] < 1)){
$founded = true;
} elseif (($category_id == $request['category_id']) && ($product_id == $request['product_id'])  && ($request['product_id'] > 0)){
$founded = true;
} elseif (($product_id  == $request['product_id'])  && ($request['product_id'] > 0)){
$founded = true;
}
if ($founded){
$items['alias'] = $item->alias;
$items['id'] = $item->id;
$items['flypage'] = $params->_registry['_default']['data']->flypage;
break;
}
}
}
if (isset($items)){
return $items;
}
}


function get_all_alias($name=''){

$query_item = "
SELECT c.category_id, c.category_name, cref.category_parent_id
FROM #__vm_category AS c, #__vm_category_xref AS cref
WHERE c.category_id = cref.category_child_id";
$db =& JFactory::getDBO();
$db->setQuery($query_item);
$result = $db->loadAssocList();
$found = false;
foreach ($result as $item) {
$string = clean(vm_translate($item['category_name']));
if (isset($temp[$string])) $string = $item['category_id'] . SPACE . $string;
$alias['category'][$item['category_id']] = array('parent'=>$item['category_parent_id'], 'name'=>$string);
$temp[$string] = true;
if (($name) && ($name == $string)){
$alias['item']['page'] = 'shop.browse';
$alias['item']['category_id'] = $item['category_id'];
$found = true;
break;
}
}
if (!$found){
$query_item = "
SELECT p.product_id, p.product_name, p.product_parent_id, pref.category_id
FROM #__vm_product AS p, #__vm_product_category_xref AS pref
WHERE p.product_id = pref.product_id or p.product_parent_id = pref.product_id";
$db =& JFactory::getDBO();
$db->setQuery($query_item);
$result = $db->loadAssocList();
foreach ($result as $item) {
$string = clean(vm_translate($item['product_name']));
if (isset($temp[$string])) $string = $item['product_id'] . SPACE . $string;
$alias['product'][$item['product_id']] = array('parent'=>$item['category_id'], 'name'=>$string);
$temp[$string] = true;
if (($name) && ($name == $string)){
$alias['item']['page'] = 'shop.product_details';
$alias['item']['product_id'] = $item['product_id'];
break;
}
}
}
//var_dump($alias);
return $alias;
}


function set_canonical($item_id = 0){

$plugin =& JPluginHelper::getPlugin('system', 'vm_sef');
$pluginParams = new JParameter( $plugin->params );
$doc =& JFactory::getDocument();

if ($pluginParams->get('canonical',1) == 1){
if ($item_id == 0){
$canonical = JURI::current();
} else {
$canonical = substr(JURI::base(),0, -1). JRoute::_('index.php?option=com_virtuemart&Itemid=' . $item_id);
}
$doc =& JFactory::getDocument();
$headers=$doc->getHeadData();
foreach($headers['links'] as $temp=>$key){
if(is_integer(strpos($key, "canonical"))){
return;
}
}
}
$doc =& JFactory::getDocument();
if ($doc->getType() == "html"){
if ($pluginParams->get('canonical',1) == 1){
$doc->addHeadLink($canonical, 'canonical');
}
if ($pluginParams->get('noindex',1) == 1){
set_metarobots(NOINDEX);
}
}
return;
}


function set_metarobots ($index = NOINDEX){

$doc =& JFactory::getDocument();
if ($doc->getType() == "html" && $index != ''){
$doc->setMetaData('robots', $index);
}
}


function clean($string){

$umlaut = array('Г¤','Г¶','Гј','Гџ','Г¦','Гё','ГҐ');
$html   = array('ae','oe','ue','ss','ae','oe','aa');
return str_replace($umlaut, $html, preg_replace('/[- ]{1,10}/', SPACE, preg_replace('/[><!@&=#°^|~´`€µ$§%*\/\\\\+.,;():\'"’[\]{}?]+/', '', strtolower($string))));
}


function enable(){
if (JPluginHelper::isEnabled('system','vmsef')){
return true;
} else {
if (@unlink(__File__)){
if (file_exists(str_replace('router', 'vmsef', __File__))){
rename(str_replace('router', 'vmsef', __File__),__File__);
}
}
}
}

function vm_translate($title)
{
    $tbl = array('Р°' => 'a', 'Р±' => 'b', 'РІ' => 'v', 'Рі' => 'g', 'Рґ' => 'd', 'Рµ' =>
        'e', 'Р¶' => 'g', 'Р·' => 'z', 'Рё' => 'i', 'Р№' => 'y', 'Рє' => 'k', 'Р»' => 'l', 'Рј' =>
        'm', 'РЅ' => 'n', 'Рѕ' => 'o', 'Рї' => 'p', 'СЂ' => 'r', 'СЃ' => 's', 'С‚' => 't', 'Сѓ' =>
        'u', 'С„' => 'f', 'С‹' => 'i', 'СЌ' => 'e', 'Рђ' => 'A', 'Р‘' => 'B', 'Р’' => 'V', 'Р“' =>
        'G', 'Р”' => 'D', 'Р•' => 'E', 'Р–' => 'G', 'Р—' => 'Z', 'Р˜' => 'I', 'Р™' => 'Y', 'Рљ' =>
        'K', 'Р›' => 'L', 'Рњ' => 'M', 'Рќ' => 'N', 'Рћ' => 'O', 'Рџ' => 'P', 'Р ' => 'R', 'РЎ' =>
        'S', 'Рў' => 'T', 'РЈ' => 'U', 'Р¤' => 'F', 'Р«' => 'I', 'Р­' => 'E', 'С‘' => "yo",
        'С…' => "h", 'С†' => "ts", 'С‡' => "ch", 'С?' => "sh", 'С‰' => "shch", 'СЉ' => "", 'СЊ' =>
        "", 'СЋ' => "yu", 'СЏ' => "ya", 'РЃ' => "YO", 'РҐ' => "H", 'Р¦' => "TS", 'Р§' => "CH",
        'РЁ' => "SH", 'Р©' => "SHCH", 'РЄ' => "", 'Р¬' => "", 'Р®' => "YU", 'РЇ' => "YA", ' ' =>
        "-", '(' => '', ')' => '', ',' => '', '.' => '');
    $translate = strtr($title, $tbl);
    //$translate = mb_strtolower(strtr($title, $tbl));
    return $translate;
}

?>

Потом переходим к файлу .htaccess и изменяем его
Код: php
##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your SEF url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

































RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} acs [NC,OR]
RewriteCond %{HTTP_USER_AGENT} alav [NC,OR]
RewriteCond %{HTTP_USER_AGENT} alca [NC,OR]
RewriteCond %{HTTP_USER_AGENT} amoi [NC,OR]
RewriteCond %{HTTP_USER_AGENT} audi [NC,OR]
RewriteCond %{HTTP_USER_AGENT} aste [NC,OR]
RewriteCond %{HTTP_USER_AGENT} avan [NC,OR]
RewriteCond %{HTTP_USER_AGENT} benq [NC,OR]
RewriteCond %{HTTP_USER_AGENT} bird [NC,OR]
RewriteCond %{HTTP_USER_AGENT} blac [NC,OR]
RewriteCond %{HTTP_USER_AGENT} blaz [NC,OR]
RewriteCond %{HTTP_USER_AGENT} brew [NC,OR]
RewriteCond %{HTTP_USER_AGENT} cell [NC,OR]
RewriteCond %{HTTP_USER_AGENT} cldc [NC,OR]
RewriteCond %{HTTP_USER_AGENT} cmd- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dang [NC,OR]
RewriteCond %{HTTP_USER_AGENT} doco [NC,OR]
RewriteCond %{HTTP_USER_AGENT} eric [NC,OR]
RewriteCond %{HTTP_USER_AGENT} hipt [NC,OR]
RewriteCond %{HTTP_USER_AGENT} inno [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ipaq [NC,OR]
RewriteCond %{HTTP_USER_AGENT} java [NC,OR]
RewriteCond %{HTTP_USER_AGENT} jigs [NC,OR]
RewriteCond %{HTTP_USER_AGENT} kddi [NC,OR]
RewriteCond %{HTTP_USER_AGENT} keji [NC,OR]
RewriteCond %{HTTP_USER_AGENT} leno [NC,OR]
RewriteCond %{HTTP_USER_AGENT} lg-c [NC,OR]
RewriteCond %{HTTP_USER_AGENT} lg-d [NC,OR]
RewriteCond %{HTTP_USER_AGENT} lg-g [NC,OR]
RewriteCond %{HTTP_USER_AGENT} lge- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} maui [NC,OR]
RewriteCond %{HTTP_USER_AGENT} maxo [NC,OR]
RewriteCond %{HTTP_USER_AGENT} midp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mits [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mmef [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mobi [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mot- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Android [NC,OR]
RewriteCond %{HTTP_USER_AGENT} android [NC,OR]
RewriteCond %{HTTP_USER_AGENT} moto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mwbp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nec- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} newt [NC,OR]
RewriteCond %{HTTP_USER_AGENT} noki [NC,OR]
RewriteCond %{HTTP_USER_AGENT} opwv [NC,OR]
RewriteCond %{HTTP_USER_AGENT} palm [NC,OR]
RewriteCond %{HTTP_USER_AGENT} pana [NC,OR]
RewriteCond %{HTTP_USER_AGENT} pant [NC,OR]
RewriteCond %{HTTP_USER_AGENT} pdxg [NC,OR]
RewriteCond %{HTTP_USER_AGENT} phil [NC,OR]
RewriteCond %{HTTP_USER_AGENT} play [NC,OR]
RewriteCond %{HTTP_USER_AGENT} pluc [NC,OR]
RewriteCond %{HTTP_USER_AGENT} port [NC,OR]
RewriteCond %{HTTP_USER_AGENT} prox [NC,OR]
RewriteCond %{HTTP_USER_AGENT} qtek [NC,OR]
RewriteCond %{HTTP_USER_AGENT} qwap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sams [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sany [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sch- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sec- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} send [NC,OR]
RewriteCond %{HTTP_USER_AGENT} seri [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sgh- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} shar [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sie- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} siem [NC,OR]
RewriteCond %{HTTP_USER_AGENT} smal [NC,OR]
RewriteCond %{HTTP_USER_AGENT} smar [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sony [NC,OR]
RewriteCond %{HTTP_USER_AGENT} sph- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} symb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} t-mo [NC,OR]
RewriteCond %{HTTP_USER_AGENT} teli [NC,OR]
RewriteCond %{HTTP_USER_AGENT} tim- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} tosh [NC,OR]
RewriteCond %{HTTP_USER_AGENT} tsm- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} upg1 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} upsi [NC,OR]
RewriteCond %{HTTP_USER_AGENT} vk-v [NC,OR]
RewriteCond %{HTTP_USER_AGENT} voda [NC,OR]
RewriteCond %{HTTP_USER_AGENT} w3cs [NC,OR]
RewriteCond %{HTTP_USER_AGENT} wap- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} wapa [NC,OR]
RewriteCond %{HTTP_USER_AGENT} wapi [NC,OR]
RewriteCond %{HTTP_USER_AGENT} wapp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} wapr [NC,OR]
RewriteCond %{HTTP_USER_AGENT} webc [NC,OR]
RewriteCond %{HTTP_USER_AGENT} winw [NC,OR]
RewriteCond %{HTTP_USER_AGENT} winw [NC,OR]
RewriteCond %{HTTP_USER_AGENT} xda [NC,OR]
RewriteCond %{HTTP_USER_AGENT} xda- [NC,OR]
RewriteCond %{HTTP_USER_AGENT} up.browser [NC,OR]
RewriteCond %{HTTP_USER_AGENT} up.link [NC,OR]
RewriteCond %{HTTP_USER_AGENT} windows.ce [NC,OR]
RewriteCond %{HTTP_USER_AGENT} iemobile [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mini [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mmp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} symbian [NC,OR]
RewriteCond %{HTTP_USER_AGENT} midp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} WAP [NC,OR]
RewriteCond %{HTTP_USER_AGENT} phone [NC,OR]
RewriteCond %{HTTP_USER_AGENT} pocket [NC,OR]
RewriteCond %{HTTP_USER_AGENT} mobile [NC,OR]
RewriteCond %{HTTP_USER_AGENT} pda [NC,OR]
RewriteCond %{HTTP_USER_AGENT} PPC [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Series60 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Opera.Mini [NC]
RewriteCond %{HTTP_USER_AGENT} !windows.nt [NC]
RewriteCond %{HTTP_USER_AGENT} !bsd [NC]
RewriteCond %{HTTP_USER_AGENT} !x11 [NC]
RewriteCond %{HTTP_USER_AGENT} !unix [NC]
RewriteCond %{HTTP_USER_AGENT} !macos [NC]
RewriteCond %{HTTP_USER_AGENT} !macintosh [NC]
RewriteCond %{HTTP_USER_AGENT} !tion [NC]
RewriteCond %{HTTP_USER_AGENT} !google [NC]
RewriteCond %{HTTP_USER_AGENT} !yandex [NC]
RewriteCond %{HTTP_USER_AGENT} !bot [NC]
RewriteCond %{HTTP_USER_AGENT} !libwww [NC]
RewriteCond %{HTTP_USER_AGENT} !msn [NC]
RewriteCond %{HTTP_USER_AGENT} !america [NC]
RewriteCond %{HTTP_USER_AGENT} !avant [NC]
RewriteCond %{HTTP_USER_AGENT} !download [NC]
RewriteCond %{HTTP_USER_AGENT} !fdm [NC]
RewriteCond %{HTTP_USER_AGENT} !maui [NC]
RewriteCond %{HTTP_USER_AGENT} !webmoney [NC]
RewriteCond %{HTTP_USER_AGENT} !windows-media-player [NC]

После этого проверяем настройки Joomla
Включить SEO - Да
Использовать mod_rewrite - Да
Добавить суффикс к URL - Нет

Вот и все.
Теперь ссылка получается такого вида http://domain.ua/shop/category/tovar
Не советую включать Добавить суффикс к URL получится так http://domain.ua/shop.html/category.html/tovar.html

ЕСЛИ ПОМОГЛО ПОВЫШАЙТЕ РЕПУТАЦИЮ
*

Град

  • Захожу иногда
  • 152
  • 67 / 0
  • В Багдаде все спокойно
Re: Как изменить ссылки товаров?
« Ответ #9 : 10.12.2011, 21:12:29 »
ЕСЛИ ПОМОГЛО ПОВЫШАЙТЕ РЕПУТАЦИЮ
а если не поможет
то понижать? ;)
СИЛЬНЫЙ ЕСТ ВКУСНОГО !
*

nightbodom

  • Захожу иногда
  • 97
  • 1 / 1
Re: Как изменить ссылки товаров?
« Ответ #10 : 10.12.2011, 21:38:25 »
У меня всё good вот пример http://www.phone-home.pp.ua/shop/china-phone/nokia/nokia-c7
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

VirtueMart 1.1.4 и https дополнительные фото товаров

Автор Sergey1984

Ответов: 0
Просмотров: 3369
Последний ответ 23.10.2018, 19:58:44
от Sergey1984
JComments + VirtueMart (решение проблемы рейтинга товаров)

Автор Oleksii

Ответов: 9
Просмотров: 5768
Последний ответ 13.09.2018, 23:26:17
от bgg87
VMExport YML - Компонент для управления экспортом товаров из VirtueMart 1.1.x на Яндекс.Маркет

Автор jeka5555

Ответов: 5
Просмотров: 3956
Последний ответ 02.07.2017, 21:25:46
от vipiusss
VirtueMart каталог не показывает все категории товаров

Автор vasyun

Ответов: 1
Просмотров: 1375
Последний ответ 14.06.2017, 20:30:51
от vasyun
Проблемы с поиском товаров в VirtueMart

Автор fashion_ff

Ответов: 10
Просмотров: 5647
Последний ответ 29.05.2017, 12:54:06
от OutLaw1