Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Virtuemart Logo manufacturer module and SEF
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: Virtuemart Logo manufacturer module and SEF

Virtuemart Logo manufacturer module and SEF 10 years, 4 months ago #41754

Hi there,
I have Joomsef 3.9.2 and virtuemart 1.1.2 and I have a module called "virtuemart manufacturer logo". Its a hacked module that can display the virtuemart manufacturer logo on product page, which can be also clicked and there will be displayed all products from this manufacturer.

I have a problem that the manufacturer urls are not correctly created. I have 10 manufacturers, but all of them have the same name + the manufacturer variable on the end, like this:

www.eshop.com/manufacturer1?manufacturer_id=1
www.eshop.com/manufacturer1?manufacturer_id=2
www.eshop.com/manufacturer1?manufacturer_id=3

What I want is that the url is like the manufacturer name, like.

www.eshop.com/manufacturer1
www.eshop.com/manufacturer2
www.eshop.com/manufacturer3

Here is the code of the module:

<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
* Manufacturer Module
*
* NOTE: THIS MODULE REQUIRES THE VIRTUEMART COMPONENT!
/*
* @version $Id: mod_virtuemart_manufacturers.php 1279 2008-02-29 09:01:49Z soeren_nb $
* @package VirtueMart
* @subpackage modules
*
* @copyright (C) 2004-2007 Soeren Eberhardt
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* VirtueMart is Free Software.
* VirtueMart comes with absolute no warranty.
*
* www.virtuemart.net
*/

 
global $mosConfig_absolute_path, $sess, $VM_LANG, $mosConfig_live_site;
// Load the virtuemart main parse code
if( file_exists(dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' )) {
require_once( dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' );
} else {
require_once( dirname(__FILE__).'/../components/com_virtuemart/virtuemart_parser.php' );
}
$text_before = $params->get( 'text_before', '');
$show_dropdown = $params->get( 'show_dropdown', 0);
$show_linklist = $params->get( 'show_linklist', 1);
$auto = $params->get( 'auto', 0);
$width = $params->get('window_width', '');
$height = $params->get('window_height', '');
 
$query_all = "SELECT m.manufacturer_id,m.mf_name,m.mf_desc FROM #__{vm}_manufacturer m ";
$query_all .= "ORDER BY m.mf_name ASC";
 
$db = new ps_DB;
$db->query( $query_all );
 
$res = $db->record;
if( empty( $res )) {
echo 'No manufacturers defined!';
return;
}
 
if( $show_linklist == 1 ) {
//begin iframe to house logos from logolist.php
?>
<div style="width:<?php echo $width; ?>;height:<?php echo $height; ?>;overflow:auto;margin:0;padding:1px">
<?php
$num = 0;
foreach( $res as $manufacturer) {
$num = $num + 1;
?>
<a href="<?php echo $sess->url( URL."index.php?option=com_virtuemart&page=shop.browse&manufacturer_id=". $manufacturer->manufacturer_id ) ?>" target="_parent">
<?php echo $manufacturer->mf_desc; ?>
</a>
<?php
if($num==8){
echo "<br />";
$num = 0;//reset counter
}
}
?>
</div>
<?php
}
if( $show_dropdown == 1 ) {
?><div>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" name="vm_manufacturer">
<br/>
<select class="inputbox" name="manufacturer_id" onchange="document.vm_manufacturer.submit()">
<option value=""><?php echo $VM_LANG->_('PHPSHOP_SELECT') ?></option>
<?php
foreach ($res as $manufacturer) {
$selected = '';
if( @$_REQUEST['manufacturer_id'] == $manufacturer->manufacturer_id ) {
$selected = 'selected="selected"';
}
echo "<option value=\"".$manufacturer->manufacturer_id ."\" $selected>". $manufacturer->mf_name ."</option>\n";
 
}
?>
</select>
<br />
<input class="button" type="submit" name="manufacturerSearch" value="<?php echo $VM_LANG->_('PHPSHOP_SEARCH_TITLE') ?>" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="page" value="shop.browse" />
<input type="hidden" name="Itemid" value="<?php echo $sess->getShopItemid() ?>" />
</form>
</div>
<?php
}
?>
<!-- End Manufacturer Module -->
 


What can I change so that the urls are created correctly?
  • Page:
  • 1
User Login Empty