Author Topic: .vmAttribChildDetail - why does theme.css get ignored / overwritten  (Read 1531 times)

2cats

  • Beginner
  • *
  • Posts: 5
I need to adjust the setting for .vmAttribChildDetail. I have made the changes in theme.css however when I inspect the element on the page, my settings have been overwritten.  Why is this and how do I fix it?

I am brand new to Virtuemart.

A page where you can see an example of what I need to adjust is: http://www.toyswithpizzazz.com.au/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=4&category_id=1&option=com_virtuemart&Itemid=29

The attribute list and quantity box run over the top of each other.

2cats

  • Beginner
  • *
  • Posts: 5
Re: .vmAttribChildDetail - why does theme.css get ignored / overwritten
« Reply #1 on: October 31, 2010, 10:05:54 am »
Despite previously searching for the answer to this problem, it wasn't until I continued searching after posting my question that I found this answer elsewhere in the forum:

Hi,

edit the file /components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_advanced_attribute.tpl.php

Replace the existing foreach-loop with the following code:

Code: [Select]
foreach($attributes as $attribute) {
    ?>
    <div class="vmAttribChildDetail" style="float:left;margin:3px;">
    <?php 
    
foreach ( $attribute['options_list'] as $options_item ) { ?>

    <div>
        <?php if( isset( $options_item['display_price']) ) : ?>
        <input type="radio" style="margin-top: 15px;" id="<?php echo $attribute['titlevar'?>_field" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" value="<?php echo $options_item['base_var'?>"><?php echo $options_item['base_value'?> (<?php echo $options_item['sign'].$options_item['display_price'?>)<br />
        <?php else : ?>
        <input type="radio" style="margin-top: 15px;" id="<?php echo $attribute['titlevar'?>_field" name="<?php echo $attribute['titlevar'].$attribute['product_id'?>" value="<?php echo $options_item['base_var'?>"><?php echo $options_item['base_value'?><br />
        <?php endif; ?>
        </div>
    <? } ?>
   
    </div>
    <br style="clear:both;" />
<?
}


May need some finetuning - but should work...

Thomas

Solved the problem.  I didn't know where to look (being new to Virtuemart).

Thank #$## for this forum.  I was going insane.  ??? Happy now. ;)