Home Blog pc-software joomla | extension | hikashop

joomla | extension | hikashop

Popis: Procházení pro Hika shop 1.4.5 verze starter. Zobrazení produktu doplněno o plugin procházení.
Klíčová slova: Joomla!, HihaShop, navigator, product
Hits: 2656
Hodnocení uživatelů: / 0
NejhoršíNejlepší 
Blog - pc-software
Napsal uživatel Administrator   
Pondělí, 14 Únor 2011 00:50

HikaShop 1.4.5 verze starter

 

navigace u zobrazení produktu v HikaShop

 

reference:
http://originaly.eu

zdroje:
http://forum.joomla.org/viewtopic.php?p=1900091 
http://forum.joomla.org/viewtopic.php?p=2402427
http://cz.php.net/manual/en/function.strtr.php

vlastnosti:
 vychází z navigátoru článků Joomla!
prochází kategorii podobně jako navigátor článků
podporuje SEF
opravuje SEF hika shop české znaky (ž, č, š ...) v URL
 

oprava CZ-cs aliasů v Joomla! SEF URL

do souboru
/libraries/joomla/filter/filteroutput.php
před

 


	 $lang =& JFactory::getLanguage();

	 $str = $lang->transliterate($str);

	

zapsat


	// tcladin add for correct aliases for hikashop

	$table = array(

	'Ů'=>'U', 'ů'=>'u','Ě'=>'E','ě'=>'e', 'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',

	'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',

	'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',

	'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',

	'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',

	'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',

	'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b',

	'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r', 'Ř'=>'R', 'ř'=>'r', '+'=>'a', 

	);

	$str = strtr($str, $table);

	

	

	// konec --- tcladin add for correct aliases for hikashop

	

 

a do souboru

/templates/TVOJE TEMPLATE/html/com_hikashop/product/show.php
za odstavec s h2 cca line 30
pokud soubor neexistuje jdi do
backend->components->hikashop->configuration->display->views product(view)  show(file)
a edituj do souboru z backendu, ulož -> soubor se objeví v /templates/TVOJE TEMPLATE/html/com_hikashop/product/show.php

zapsat


	<?php

	#######################################################

	//<Prev Next> Copied in from /content/pagenavigation.php

	//Check for //MODIFIED to see which variables have been modified to reflect grabbing parameter from within the aritcle

	

	$db = & JFactory::getDBO();

	$user = & JFactory::getUser();

	$nullDate = $db->getNullDate();

	$date =& JFactory::getDate();

	$config = & JFactory::getConfig();

	$now = $date->toMySQL();

	$uid = $this->element->product_id; //MODIFIED

	$cid = $this->element->category_id; //MODIFIED

	 $option = 'com_hikashop'; //MODIFIED

	 $canPublish = $user->authorize('com_hikashop', 'publish', 'content', 'all'); //MODIFIED

	

	// tcladin add for correct aliases for hikashop

	function normalize_alias ($string){

	 $table = array(

	'Ů'=>'U', 'ů'=>'u','Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',

	'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',

	'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',

	'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',

	'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',

	'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',

	'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b',

	'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r', 'Ř'=>'R', 'ř'=>'r', '+'=>'a', 

	);

	return trim(strtolower(strtr($string, $table)));

	}

	// konec --- tcladin add for correct aliases for hikashop

	

	// array of articles in same category correctly ordered

	$query = 'SELECT * FROM #__hikashop_product AS a LEFT JOIN #__hikashop_product_category AS cc ON cc.product_id = a.product_id WHERE cc.category_id = '.$cid;

	

	$db->setQuery($query);

	$list = $db->loadObjectList('product_id');

	// this check needed if incorrect Itemid is given resulting in an incorrect result

	if ( !is_array($list) ) {

	$list = array();

	}

	

	reset($list);

	

	// location of current content item in array list

	$location = array_search($uid, array_keys($list));

	$rows = array_values($list);

	$row->prev = null;

	$row->next = null;

	if ($location -1 >= 0) {

	// the previous content item cannot be in the array position -1

	$row->prev = $rows[$location -1];

	}

	if (($location +1) < count($rows)) {

	// the next content item cannot be in an array position greater than the number of array postions

	$row->next = $rows[$location +1];

	}

	$pnSpace = "&#160&#160";

	

	if ($row->prev) {

	$row->prev = JRoute::_('/galerie/product/show/cid-'.$row->prev->product_id.'/name-'.str_replace(" ","-",normalize_alias($row->prev->product_name)).'/category_pathway-'.$row->prev->category_id);

	} else {

	$row->prev = '';

	}

	if ($row->next) {

	$row->next = JRoute::_('/galerie/product/show/cid-'.$row->next->product_id.'/name-'.str_replace(" ","-",normalize_alias($row->next->product_name)).'/category_pathway-'.$row->next->category_id); 

	} else {

	$row->next = '';

	}

	

	// output

	if ($row->prev || $row->next)

	{ $html = '<table align="center" class="pagenav"><tr>';

	if ($row->prev) { $html .= '<td class="pagenav_prev"><a href="'. $row->prev .'">'.JText::_( '&#171;' ).$pnSpace . JText::_( 'Prev' ) . '</a></td>'; }

	if ($row->prev && $row->next) { $html .= '<td width="50">&nbsp;</td>';}

	if ($row->next) { $html .= '<td class="pagenav_next"><a href="'. $row->next .'">'. JText::_( 'Next' ) .$pnSpace . JText::_( '&#187;' ) .'</a></td>';}

	$html .= '</tr></table>'; }

	echo $html;

	

	##################################################

	 ?>

	

Aktualizováno Pondělí, 18 Duben 2011 16:26