VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: ICWater on January 28, 2013, 20:20:13 PM

Title: category alignment css? and .vm-pagination issue
Post by: ICWater on January 28, 2013, 20:20:13 PM
i'm using vm 2.0.18a my site is http://globalenginesales.com/component/virtuemart/engines i have a couple issues 1. the product listing, i'd like the image to be centered over the text not floated to the left, been searching for a couple days and haven't found a working solution. also when i set "Default Number of Products per Row" 3 it shows as it is now 2 accross and one below, i'd like 3 across. so i set it for 2 just so it's even then it displays one above the other. i'm just trying to figure out what css is controlling this. i've hit the chrome developer tools and whatnot i see "browseProductImage" but i cant find that in the css. uhg. any help would be appreciated. 

other issue is in the navigation there's no spaces in the "StartPrev123NextEnd" looks like crap, tried several solutions listed in other threads but no love :/
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 28, 2013, 22:14:12 PM
i mean these things should be controlled by css, no?
Title: Re: category alignment css? and .vm-pagination issue
Post by: jenkinhill on January 28, 2013, 23:27:26 PM
There is a problem with your template's gantry css - see http://forum.virtuemart.net/index.php?topic=110509
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 28, 2013, 23:56:34 PM
awesome that did it for the pagenataion issue :) any chance you could point me to a fix for my category problem?  ;D
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 29, 2013, 01:57:40 AM
do i have two different navigation systems inhabiting the same space there? seems kinda wacky and cluttered.
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 29, 2013, 20:35:33 PM
could someone just tell me if that alignment is controlled by css or php and where?
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 30, 2013, 02:02:49 AM
wait so are all my issues gantry related or just that one?
Title: Re: category alignment css? and .vm-pagination issue
Post by: jenkinhill on January 30, 2013, 13:16:35 PM
For centering the image on the category layout page you need to use a template override for joomla_root/components/com_virtuemart/views/category/tmpl/default.php - the normal layout is to use a left and right div, but you just need one div with appropriate css changes.  Here I am assuming that the RT template does not already have overrides for VM layout. If so they will be in /templates/rt_dominion/html/com_virtuemart/category/

There are always problems with Joomla templates that provide more bells & whistles than you will ever need as they usually load a lot of different js and css files. In the case here, the VM css file is one of the first to load so VM styles could be superceded by later added style definitions.
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 31, 2013, 00:55:14 AM
does moving the default.phph to that directory automatically create an override?
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 31, 2013, 01:06:59 AM
also what line in the default.php controls alignment? i'm a php noob :p
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 31, 2013, 21:27:55 PM
i'm working under the assumption i need to change this
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">

but i dont know what to change it to?  :-[
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 31, 2013, 23:05:43 PM
well snap that looks much better  :D guess sometimes ya just gotta dive in and start changing stuff  :P
Title: Re: category alignment css? and .vm-pagination issue
Post by: jenkinhill on January 31, 2013, 23:16:33 PM
That's the best way to learn. And I seem to remember a bit further down you change <div class="width70 floatright"> to <div>
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 31, 2013, 23:17:40 PM
think that's what i did
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on January 31, 2013, 23:51:09 PM
ok, now the featured products on the front page. are those controlled by the same default.php in the category folder? seems to be styled totally different. sorry cant link it as i have it unpublished till the store is live and functioning.
Title: Re: category alignment css? and .vm-pagination issue
Post by: jenkinhill on February 01, 2013, 10:08:03 AM
I think that is in  joomla_root/modules/mod_virtuemart_product/tmpl/
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on February 01, 2013, 20:29:35 PM
much thanks, does that need an override or can i edit it directly?
Title: Re: category alignment css? and .vm-pagination issue
Post by: jenkinhill on February 01, 2013, 23:51:54 PM
Override - always! See http://www.ostraining.com/blog/joomla/overrides/
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on February 01, 2013, 23:59:41 PM
thanks again
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on February 02, 2013, 01:09:17 AM
where is this getting the width settings for those product containers?
<?php // no direct access
defined ('_JEXEC') or die('Restricted access');
$col 1;
$pwidth ' width' floor (100 $products_per_row);
if (
$products_per_row 1) {
$float "floatright";
} else {
$float "center";
}
?>

<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'); ?> productdetails">
<?php foreach ($products as $product) { ?>
<div class="<?php echo $pwidth ?> <?php echo $float ?>">
<div class="spacer">
<?php
if (!empty($product->images[0])) {
$image $product->images[0]->displayMediaThumb ('class="featuredProductImage" border="0"'FALSE);
} else {
$image '';
}
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), $image, array('title' => $product->product_name));
echo '<div class="clear"></div>';
$url JRoute::('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $product->virtuemart_product_id '&virtuemart_category_id=' .
$product->virtuemart_category_id); ?>

<a href="<?php echo $url ?>"><?php echo $product->product_name ?></a>        <?php    echo '<div class="clear"></div>';

if ($show_price) {
//  echo $currency->priceDisplay($product->prices['salesPrice']);
if (!empty($product->prices['salesPrice'])) {
echo $currency->createPriceDiv ('salesPrice'''$product->pricesFALSEFALSE1.0TRUE);
}
//  if ($product->prices['salesPriceWithDiscount']>0) echo $currency->priceDisplay($product->prices['salesPriceWithDiscount']);
if (!empty($product->prices['salesPriceWithDiscount'])) {
echo $currency->createPriceDiv ('salesPriceWithDiscount'''$product->pricesFALSEFALSE1.0TRUE);
}
}
if ($show_addtocart) {
echo mod_virtuemart_product::addtocart ($product);
}
?>

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

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

<?php
} else {
$last count ($products) - 1;
?>


<ul class="vmproduct<?php echo $params->get ('moduleclass_sfx'); ?> productdetails">
<?php foreach ($products as $product) : ?>
<li class="<?php echo $pwidth ?> <?php echo $float ?>">
<?php
if (!empty($product->images[0])) {
$image $product->images[0]->displayMediaThumb ('class="featuredProductImage" border="0"'FALSE);
} else {
$image '';
}
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), $image, array('title' => $product->product_name));
echo '<div class="clear"></div>';
$url JRoute::('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' $product->virtuemart_product_id '&virtuemart_category_id=' .
$product->virtuemart_category_id); ?>

<a href="<?php echo $url ?>"><?php echo $product->product_name ?></a>        <?php    echo '<div class="clear"></div>';
// $product->prices is not set when show_prices in config is unchecked
if ($show_price and  isset($product->prices)) {
echo '<div class="product-price">'.$currency->createPriceDiv ('salesPrice'''$product->pricesFALSEFALSE1.0TRUE);
if ($product->prices['salesPriceWithDiscount'] > 0) {
echo $currency->createPriceDiv ('salesPriceWithDiscount'''$product->pricesFALSEFALSE1.0TRUE);
}
echo '</div>';
}
if ($show_addtocart) {
echo mod_virtuemart_product::addtocart ($product);
}
?>

</li>
<?php
if ($col == $products_per_row && $products_per_row && $last) {
echo '
</ul><div class="clear"></div>
<ul  class="vmproduct' 
$params->get ('moduleclass_sfx') . ' productdetails">';
$col 1;
} else {
$col++;
}
$last--;
endforeach; ?>

</ul>
<div class="clear"></div>

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

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


i cant find anything that has a meaningful effect on the layout as i did for the catagory. crapoloa
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on February 02, 2013, 01:13:07 AM
where is this located?
<li class=" width33 floatright">
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on February 02, 2013, 01:25:55 AM
oki, almost there. whats the proper php to change this to center? $float = "floatleft";
Title: Re: category alignment css? and .vm-pagination issue
Post by: ICWater on February 02, 2013, 20:13:09 PM
anyone know what code i need to remove to get rid of the bullets?
Title: Re: category alignment css? and .vm-pagination issue
Post by: jenkinhill on February 03, 2013, 17:58:52 PM
Bullets are styled in css. Locate the style with Firebug.   http://www.w3schools.com/css/css_list.asp