News:

Looking for documentation? Take a look on our wiki

Main Menu

Layout of a category in the module

Started by Amilcar, January 23, 2018, 00:15:32 AM

Previous topic - Next topic

Amilcar


Can you call the Layout menu option of a category, where the products of a category are shown on the homepage, within a module?

I create the menu item and call this menu item within a module.

I would not like to use the VirtueMart Products module, because of the formatting shown.

Att..
Amilcar

Ghost

Yes, you can. Here's a basic mod_virtuemart_product override using product sublayout:

<?php // no direct access
defined ('_JEXEC') or die('Restricted access');
// add javascript for price and cart, need even for quantity buttons, so we need it almost anywhere
vmJsApi::jPrice();
?>

<div class="vmgroup<?php echo $params->get ('moduleclass_sfx'?>">
<?php if ($headerText) { ?>
<div class="vmheader"><?php echo $headerText ?></div>
<?php }
echo shopFunctionsF::renderVmSubLayout('products',array('products'=>array($products), 'currency'=> $currency'showRating' => false));

if ($footerText) { ?>

<div class="vmfooter<?php echo $params->get ('moduleclass_sfx'?>">
<?php echo $footerText ?>
</div>
<?php ?>
</div>

Amilcar


Okay Ghost, thanks for your cooperation.
But I do not know how to use this code that you reported.
Could you help me with that?
Thank you very much.

Att..

Amilcar

Ghost

Create a template override of mod_virtuemart_product and add this code to the override file.

If you don't know how to make template overrides, read this https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core