News:

Looking for documentation? Take a look on our wiki

Main Menu

[FIXED] Feature not working - Manufacturer Browse Page Header

Started by grayceworks, December 11, 2008, 04:58:51 AM

Previous topic - Next topic

grayceworks

Description:
Give a description of the bug in your own words.

In the shop.browse page, it has the code to show the manufacturer description on the manufacturer browse page. The browse_header_manufacturer.tpl.php  file includes the code to show the description. However, in the live shop, only the manufacturer name shows, not the description.

VirtueMart Version:
Joomla 1.5.7 with integrated VirtueMart 1.1.2 stable.

Steps to replicate:
1)Create a manufacturer and enter a description.
2) Create products for the manufacturer
3) go to  the manufacturer browse page
4) manufacturer name appears with the listing of products, but the entered manufacturer description does not display.

Live URL:

example page:
http://yawac2.webtestsystems.com/index.php?option=com_virtuemart&page=shop.browse&manufacturer_id=1&Itemid=29

Proposed fix(es):
No idea. I'm not a coder.

the referenced code  from shop.browse is:

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' );



referenced code in browse_header_manufacturer.tpl.php :

<h3><?php echo $browsepage_lbl ?></h3>
<div class="browseDesc"><?php echo $browsepage_lbltext ?></div>



System info:
Enter your system info (operating system, web server, php version, mysql version).

Linux hosting on godaddy.com. php 5, mysql 5.
searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10

grayceworks

Thanks to MikeUK for finding the solution to this!

Quote from: MikeUK on December 14, 2008, 11:18:32 AM
Appreciate the problem. I was sort of hoping someone else might have done this and posted the info you need by now. But doesn't look like that will happen.
Had a look at you post again with the shop.browse code:
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_lbltext = $db->f("mf_desc");
$browsepage_lbl = shopMakeHtmlSafe( $db->f("mf_name") );
$tpl->set( 'browsepage_lbl', $browsepage_lbl );
$browsepage_lbltext = $db->f("mf_desc");

perhaps this line needs to get the description also from the database. So it would be:
$db->query( "SELECT manufacturer_id, mf_name, mf_desc FROM #__{vm}_manufacturer WHERE manufacturer_id='$manufacturer_id'");
assuming mf_desc is the correct name for the field in the database.
searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10


grayceworks

I downloaded the latest release of VirtueMart last month, and apparently it wasn't fixed there, in 1.1.2 Stable version, and there were a few other people posting the same issue, and receiving no response or solution. Just an FYI.
So that's why I had posted the problem here, which MikeUK was a lifesaver in fixing for me! Thanks again Mike!
searching for solutions
====================================
Joomla 1.5.9
VirtueMart 1.1.3
Linux/Apache|PHP5|mySQL5
Firefox 3.0.6 | Internet Exploder 7 
Windoze XP sp3 | Suse 10

aravot

Latest release is v1.1.2 we don't release SVN internal versions until all bugs are fixed, glad you got it fixed, thank you Mike.