I have a link in my menu for store which takes you to a page with the categories layout. I see that I can change this to go to a page showing manufactures layout. Is it possible to change the link that goes to a page that lists all of the categories as well as the manufactures? If so, can someone please tell me how to do this?
I still haven't figured this out and it appears that nobody knows how to show the manufactures and the categories on the same page. Can anyone confirm that these are the pages that display the manufactures and the categories?
/components/com_virtuemart/views/categories/view.html.php
/components/com_virtuemart/views/manufacture/view.html.php
If so, I am going to try to combine some of the code from one of the pages with the other page in hopes to show everything on the same page.
So I grabbed some of the code from the manufactures view page and put it in the categories view page, now the categories show two times, which tells me that I need to hard code some variable value that is being requested from somewhere. Does anyone know which variables in the 2nd part of the function I need to manually set so that the manufactures will show below the categories? Here is the current page I am editing.
http://www.likdancewear.com/index.php?option=com_virtuemart&view=categories&virtuemart_category_id=0&Itemid=773
I am guessing it is somewhere in this part of the code
$virtuemart_manufacturer_id = JRequest::getInt('virtuemart_manufacturer_id', 0);
$mf_category_id = JRequest::getInt('mf_category_id', 0);
// get necessary models
$model = VmModel::getModel('manufacturer');
if ($virtuemart_manufacturer_id !=0 ) {
$manufacturer = $model->getManufacturer();
$model->addImages($manufacturer,1);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"',false);
$document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_DETAILS').' '.strip_tags($manufacturer->mf_name));
$this->assignRef('manufacturerImage', $manufacturerImage);
$this->assignRef('manufacturer', $manufacturer);
$pathway->addItem(strip_tags($manufacturer->mf_name));
$this->setLayout('details');
} else {
$document->setTitle(JText::_('COM_VIRTUEMART_MANUFACTURER_PAGE')) ;
$manufacturers = $model->getManufacturers(true, true, true);
$model->addImages($manufacturers,1);
$this->assignRef('manufacturers', $manufacturers);
$this->setLayout('default');
}
I have figured out a little more. If I change the url from
http://www.likdancewear.com/index.php?option=com_virtuemart&view=categories&virtuemart_category_id=0&Itemid=773
to
http://www.likdancewear.com/index.php?option=com_virtuemart&view=manufacturer&virtuemart_category_id=0&Itemid=773
the manufactures will show; however I can't find anywhere in
/components/com_virtuemart/views/categories/view.html.php
where it does a request for the query string view
I would guess that in the 2nd part of the function I would need to change view from categories to manufactures. Does anyone know how to set this so I can show both views on the same page?
Hello,
Why you don't create a joomla menu item with the above link? (index.php?option=com_virtuemart&view=manufacturer&virtuemart_category_id=0&Itemid=XXX)
Thanks for trying to help bytelord, but that doesn't work. When I set the link to
http://www.likdancewear.com/ndex.php?option=com_virtuemart&view=manufacturer&virtuemart_category_id=0&Itemid=773
only the manufactures show. I need the categories to show AND the manufactures.
So I think I was in the wrong file. It looks like
/components/com_virtuemart/views/categories/tmpl/default.php
is the file that request the value for view out of the url. Can anyone confirm? I spent over a week working with the wrong file. Surely someone has changed their VM to show a list of categories and manufactures on their store main page.