VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: ModestZou on February 06, 2012, 09:24:39 AM

Title: Related Products problem
Post by: ModestZou on February 06, 2012, 09:24:39 AM
Hi,
Long title, can not be deleted related products.
See attached.

Thanks,

Modest

Joomla! Version 1.7.4
virtuemart 2.0.0

[attachment cleanup by admin]
Title: Re: Related Products Bug
Post by: flo31 on February 06, 2012, 10:52:48 AM
This is a css bug, because the surrounding box height is fixed, and the img also.
So when the title is too long, the div containing the close image disapears behind.

You can try as a first fix:

In administrator/components/com_virtuemart/assets/css/admin.style.css

in .vm_thumb_image {

remove line 145 :      height:120px;
Title: Re: Related Products Bug
Post by: ModestZou on February 06, 2012, 13:16:47 PM
Thanks flo31.

How do limit the product name length.

See attached.

Modest

Joomla! Version 1.7.4
virtuemart 2.0.0

[attachment cleanup by admin]
Title: Re: Related Products problem
Post by: karuppiah on February 06, 2012, 16:04:20 PM
Hello guys,
Open file joomla_root/components/com_virtuemart/themes/default/templates/common/relatedProducts.tpl.php in any text editor.


Simply add a class and the necessary divs to the table cell, you will have to adjust your css to suit -


     <td valign="top">
        <div class="related">
           <div class="module" style="width:210px;height:160px;">
              <div style="width:210px;height:160px;"><div><div></br>
           <?php echo $ps_product->product_snapshot( $products->f('product_sku') ) ?>
          </div></div></div>
            </div>
         </div>
</div>
     </td>


For More information,http://www.gjcwebdesign.com/virtuemart-related-products-customise.html
Title: Re: Related Products problem
Post by: ModestZou on February 07, 2012, 05:19:37 AM
Hi karuppiah,

virtuemart 2.0.0 did not find this file.

See attached.

Thanks,

Modest

[attachment cleanup by admin]
Title: Re: Related Products problem
Post by: karuppiah on February 07, 2012, 06:02:33 AM
sorry the above code will be applicable for 1.15-1.18 vesions..not for 2.0 versions.
Title: Re: Related Products problem
Post by: PRO on February 07, 2012, 13:07:03 PM
Only way to do it on the front end is overflow:hidden

http://www.w3schools.com/cssref/pr_pos_overflow.asp

#relatedproduct A:link{}
Title: Re: Related Products problem
Post by: ModestZou on February 07, 2012, 16:02:27 PM
Hi BanquetTables.pro,

I've tried, but I did not succeed.
Title: Re: Related Products problem
Post by: ModestZou on February 08, 2012, 07:33:33 AM
Can someone please help me?
Title: Re: Related Products problem
Post by: PRO on February 08, 2012, 18:05:20 PM
set a specific width of the div product-field-type-R
Title: Re: Related Products problem
Post by: ModestZou on February 09, 2012, 07:12:20 AM
Banquet Tables Pro,

Thank you for your help! ;)

localhost/templates/youtheme/css/vm.css
.product-field-display a img {
display: block;
}

Changed
.product-field-display a img {
float:center;
}



localhost/templates/youtheme/css/vm.css

.product-related-products > div {
display:inline-block;
margin: 12px 0;
padding: 0 24px;
border-right: 1px solid #eee;
font-size: 11px;
font-weight: bold;
text-transform: uppercase
}

Changed
.product-related-products > div {
display:inline-block;
margin: 12px 0;
width: 110px;
padding: 0 24px;
border-right: 1px solid #eee;
font-size: 11px;
font-weight: bold;
text-align: center;
text-transform: uppercase
}


[attachment cleanup by admin]