News:

Looking for documentation? Take a look on our wiki

Main Menu

Module styling seems to be missing

Started by bunglehaze, October 29, 2011, 14:34:09 PM

Previous topic - Next topic

bunglehaze

Hi folks, I am mid way through a conversion from J1.5 to J1.7 along with the obligatory migration to VM2. I am probably quite a typical user in that I am stumbling through the different areas and finding my feet and for the most part have the shop looking similar to how it was before but with one major exception.

I have just installed 1.9.8k (todays release) and expected for module styling to have changed as in my install I have nothing at all, nor can I see where this is all setup in VM views. Anyone able to offer guidance on where to start please.

many thx

PRO


bunglehaze

??

There is zero styling to the modules output in my install, I have since added a bit of styling to vm products module but to not have even basic styling included is a bit wierd... No?

If I were a totally new user to VM I would have walked away and tried a different product, I hope that this is something that will be added prior to the stable launch.

PRO

the modules, like the cart? random products etc?


bunglehaze

VM Product module and in this case used for both random products as well as featured products, all I got was a bunched up set of images with text to the side of each. I see now that you should set up a view for each module which was a little unclear but perhaps having a basic template ready made for each would be a good idea for final which would certainly help a lot of novice users.

Cart seems fine and I have yet to try the others

PRO

in the module settings you have div and li based layouts.

bunglehaze

I know, li based styling provides a basic list as expected, the div styling had no styling until I put some in the default.php in vm product module

addijhaq

Same problem too...

Bunglehaze,

can i see what you've added to the default.php to manipulate the "product display" module to fix the plain look of the div set up?


bunglehaze

of course, it is only inline div styling for now as I want to wait until final before I go ahead and make any templates for the different functions. Also I do not understand why the module itself does not have a setting to allow for different templates for the individual functions (ie rename default.php for product.php, featured.php etc which IMO would probably all need slightly differing templates for different uses)

<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$col;
?>

<div class="vmgroup<?php echo $params->get'moduleclass_sfx' ?>">

<?php if ($headerText) { ?>
<div class="vmheader"><?php echo $headerText ?></div>
<?php }
if (
$display_style =="div") { ?>

<div class="vmproduct<?php echo $params->get('moduleclass_sfx'); ?>">
<?php foreach ($products as $product) { ?>
<div style="float:left; width:110px;height:155px;margin:4px;overflow:hidden;">
<div style="width:100px;height:100px;">
<?php
if (!empty($product->images[0]) ) {
echo JHTML::_('link'JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id),$product->images[0]->displayMediaThumb('class="featuredProductImage" border="0"',$product->product_name));
}
?>

</div>
<div style="text-align:center;text-overflow:hidden;white-space:nowrap;">
<?php echo JHTML::link(JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id), $product->product_name, array('title' => $product->product_name)); ?>
</div>
<?php
if ($show_price) {
//  echo $currency->priceDisplay($product->prices['salesPrice']);
if ($product->prices['salesPrice']>0) echo $currency->createPriceDiv('salesPrice','',$product->prices,true);
//  if ($product->prices['salesPriceWithDiscount']>0) echo $currency->priceDisplay($product->prices['salesPriceWithDiscount']);
if ($product->prices['salesPriceWithDiscount']>0) echo $currency->createPriceDiv('salesPriceWithDiscount','',$product->prices,true);
}

?>

</div>
<?php
if ($col == $products_per_row && $products_per_row && $col $totalProd ) {
echo " </div><div style='clear:both;'>";
$col;
} else {
$col++;
}
?>

</div>
<br style='clear:both;' />

<?php
} else {
?>


<ul class="vmproduct<?php echo $params->get('moduleclass_sfx'); ?>">
<?php foreach ($products as $product) : ?>
<li>
<?php
$productModel->addImages($product);
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0"');
?>

<?php echo JHTML::link(JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id), $product->product_name, array('title' => $product->product_name,'rel'=>'facebox')); ?>
<?php
if ($show_price) {
echo $currency->createPriceDiv('salesPrice','',$product->prices,true);
if ($product->prices['salesPriceWithDiscount']>0) echo $currency->createPriceDiv('salesPriceWithDiscount','',$product->prices,true);
}
if ($show_addtocart) echo mod_virtuemart_product::addtocart($product);
?>

</li>
<?php
if (
$col == $products_per_row && $products_per_row) {
echo "
</ul>
<ul>"
;
$col;
} else {
$col++;
}
endforeach; ?>

</ul>

<?php }
if ($footerText) : ?>

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

brutus77cz

#9
Did You find any solution? I am trying to modify layout of module : Virtuemart Products . I have VM 2.0 and Joomla 1.7.4.
I tried to modify DIV and UL layout of this module in file: modules/mod_virtuemart_product/tmp/default.php. I tried to add some text or styling, bud nothing changed on the web :-(
I also tried to modify the manufacturer module and everything works fine....

Could You please give me advice, where modify the styling of this module?

Thanks!

UPDATE: i found it, sorry for stupid question... file is located in yourtemplate/html/mod_virtuemart_products/default.php