VirtueMart Forum

VirtueMart 2 + 3 => Templating & Layouts => Topic started by: liatoss on October 12, 2011, 10:14:40 am

Title: Problem with default manufacturer page
Post by: liatoss on October 12, 2011, 10:14:40 am
If somebody can help me as I have a problem as follows:
On the default manufacturer details popup page, in the last line, where there is a link for all product by a manufacturer, at the end of the url, a strange number is added by the system.

You can check the online page here: http://www.eolimondo.com/index.php/vendors/promo-partners-cats-list/realestate/metropolitana2-detail (http://www.eolimondo.com/index.php/vendors/promo-partners-cats-list/realestate/metropolitana2-detail)

I cannot find the reason of it, but what I found is as follows: that there is internal exception due to there are no primary key in several tables of virtuemart component, maybe such an exception generates such a number....

Any help is appreciated.
Title: Re: Problem with default manufacturer page
Post by: Milbo on October 12, 2011, 23:53:41 pm
Woow, what a page man,
do you mean that? View all Constructora Aybar Products 37

yeah, it is a bit misleading, it is just the number of all products there.
Title: Re: Problem with default manufacturer page
Post by: liatoss on October 13, 2011, 01:06:14 am
Thanks, and yes, you are right. The problem is the 37 after the string "View all products for the selected manufacturer". The number I cannot link with anything as I have less than 10 products in the catalog. So, I am a bit lost... In debugger I found that the string of the code as follow

Code: [Select]
return call_user_func_array('printf', $args);
with the $args as follows {"View all %s products ", "Rodriguez Sandoval"}, produces the string with 37 at the end. As far as I understand the function call_user_func_array is a PHP function, so, I am lost here as arguments are correct but the result is a bit different. I can imagine only that 37 is an error code which happens before the line execution and it is inserted somewhere after the line.
Title: Re: Problem with default manufacturer page
Post by: Milbo on October 13, 2011, 18:57:43 pm
which line?

atm it is not longer to see in the svn, maybe it is something else. We will see when we do the next subrelease what you get then.
Title: Re: Problem with default manufacturer page
Post by: PRO on October 13, 2011, 19:19:30 pm
liatoss, is the manufacturer ID 37 perhaps?


nevermind, I just tried on mine, and get a weird 33,
Title: Re: Problem with default manufacturer page
Post by: PRO on October 13, 2011, 19:46:40 pm

views/manufacturer/details.php
<a href="<?php echo $ProductCategorylink; ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_FROM_MF');?><?php echo
$this->manufacturer->mf_name; ?></a>

en-GB.com_virtuemart.ini
COM_VIRTUEMART_PRODUCT_FROM_MF="View all Products from "

This will remove the number

Title: Re: Problem with default manufacturer page
Post by: Milbo on October 13, 2011, 20:26:45 pm
I use this now
Code: [Select]
<?php // Manufacturer Product Link
$manufacturerProductsURL JROUTE::_('index.php?option=com_virtuemart&view=category&search=true&virtuemart_manufacturer_id=' $this->manufacturer->virtuemart_manufacturer_id);

if(!empty($this->manufacturer->virtuemart_manufacturer_id)) { ?>

<div class="manufacturer-product-link">
<a href="<?php echo $manufacturerProductsURL?>"><?php echo JText::sprintf('COM_VIRTUEMART_PRODUCT_FROM_MF',$this->manufacturer->mf_name); ?></a>
</div>
<?php ?>

I must say,. .I wonder myself why the number was there.