Author Topic: The Feature MultiAuthor  (Read 7536 times)

tobisagt

  • Jr. Member
  • **
  • Posts: 106
Re: The Feature MultiAuthor
« Reply #15 on: December 04, 2014, 18:46:59 pm »
Thank you Milbo. This is indeed the better way! :)

Here's the new Code:
Code: [Select]
<div class="manufacturer">   
    <?
  $manufacturers_id = $this->product->virtuemart_manufacturer_id;

// Zähle die Hersteller
$numManufacturer = count($manufacturers_id);

    $i = 1;
    // Gebe die Hersteller aus
    foreach($manufacturers_id as $manufacturer_id)
    {

$manModel = VmModel::getModel('manufacturer');
$manufacturers_details = $manModel->getManufacturer($manufacturer_id);

// Produktlink des Herstellers
$link = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $manufacturer_id, FALSE);
$name = $manufacturers_details->mf_name;

/* Avoid JavaScript on PDF Output */
    if (strtolower(vRequest::getCmd('output')) == "pdf") {
echo JHtml::_('link', $link, $name);
    } else {
?>
<a class="manuModal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $link ?>"><?php echo $name ?></a>

<?php
// Füge ein Komma hinter jeden Hersteller, außer dem letzten.
if ($i != $numManufacturer)
{
echo ', ';
}
    }
     $i++;
     }
    ?>

</div>

vm_ASL

  • Beginner
  • *
  • Posts: 9
Re: The Feature MultiAuthor
« Reply #16 on: December 08, 2014, 10:09:53 am »
Hello tobisagt,

happy to see a workaraound here, finally! Thank you very much, it works for me, so far...
But what I did was to change my override for components\com_virtuemart\views\productdetails\tmpl\default.php with your code, not in default_manufacturer.php.

Thank you very much, anyway!