VirtueMart Forum

VirtueMart 2 + 3 => Installation, Migration & Upgrade => Topic started by: sumsonchen on April 13, 2012, 18:06:01 pm

Title: why my "related products" is in vertical?
Post by: sumsonchen on April 13, 2012, 18:06:01 pm
looks very strange.
http://www.weixin-china.com/products/other-products/silicone-tmj-tmd-tray-detail.html

How can I fix the problem?

[attachment cleanup by admin]
Title: Re: why my "related products" is in vertical?
Post by: PRO on April 13, 2012, 18:30:24 pm
U need to add the css


.product-field product-field-type-R{width:25%;float:left;}
Title: Re: why my "related products" is in vertical?
Post by: sumsonchen on April 14, 2012, 05:10:37 am
Thanks, "Banquet Tables Pro".
I added .product-field product-field-type-R{width:25%;float:left;} to vmsiteltr.css, but didn't work.
Or should it be added to another css file?
Title: Re: why my "related products" is in vertical?
Post by: sumsonchen on April 14, 2012, 05:31:00 am
Hi "Banquet Tables Pro".

That is amazing.
I just add a dot and it works. Very very appreciate your help

.product-field.product-field-type-R{width:25%;float:left;}

or

.product-field,product-field-type-R{width:25%;float:left;}
Title: Re: why my "related products" is in vertical?
Post by: finbarr69 on July 29, 2012, 14:54:07 pm
This is very good, but when there are fewer than four related products, the "Reviews" section tags itself on the right hand side (and its horizontal rule separator runs through the middle of the related products.  Any ideas how to reserve the rest of the space so that reviews is forced underneath related products?

Thanks!

Brian
Title: Re: why my "related products" is in vertical?
Post by: PRO on July 29, 2012, 15:52:35 pm
You need to add a clearing div after then, and before the reviews
Title: Re: why my "related products" is in vertical?
Post by: finbarr69 on July 31, 2012, 23:32:58 pm
Ah ok, I'll try that.  I guess that will be a template override.

If I figure it out, I'll post the code back on here.

Thanks,

Brian
Title: Re: why my "related products" is in vertical?
Post by: sentnel on October 17, 2012, 03:50:05 am
Not sure if is wrong to bring back this old post, but since is directly related I'll ask here:
- Im getting my related products ok, in a row, but there's no way I can get the image to be centered above the text. The image shows floating left, while the text is centered. Can somebody tell me where, in the .css can I centered the image?

Thanks a lot!

Edit: Update: See the problem ("Productos Relacionados")

http://inposdom.gob.do/filatelia/index.php/component/virtuemart/conmemorativas/125-anos-relaciones-consulares-dominico-ecuatorianas-detail?Itemid=0

Joomla 2.5.7
Virtuemart 2.0.12b
PHP 5.3.3
Title: [SOLVED] Re: why my "related products" is in vertical?
Post by: sentnel on October 17, 2012, 06:02:09 am
Solution:
change:

.product-field-display a img{display: block;}

to:

.product-field-display a img{display: block; margin-left:auto; margin-right:auto;}

in:
components/com_virtuemart/assets/css/vmsite-ltr.css

Title: Re: why my "related products" is in vertical?
Post by: maverickon on July 24, 2014, 14:50:20 pm
Although this topic has not been visited recently, I came up by searchangin at this page so I thought someone else might benefit.
1. I added in custom css file optional for my template:
.product-field,product-field-type-R{width:25%!important;
float:left!important;} - this keeps it untouched in cas of an upgrade.
Alternatively step one might be added directly in vmsite-ltr.css, but this will be changed when upgrade is made.
2. Find file    ...........     /components/com_virtuemart/views/productdetails/tmpl/default_relatedproducts.php
add at the end
 <div style="clear: both;"></div>

This solved it in my case.
Title: Re: why my "related products" is in vertical?
Post by: Milbo on August 13, 2014, 09:09:21 am
Thank you.
Title: Re: why my "related products" is in vertical?
Post by: dsidir on September 07, 2014, 19:50:27 pm
U need to add the css


.product-field product-field-type-R{width:25%;float:left;}

Having exactly the same problem. Could you please tell where exactly this code should be added ? I tried some thing bud didnt work. Using VM 2.9.9
Title: Re: why my "related products" is in vertical?
Post by: GJC Web Design on September 07, 2014, 20:59:15 pm
.product-field,product-field-type-R{
width:25%!important;
float:left!important;
}

in any css file that is loaded
Title: Re: why my "related products" is in vertical?
Post by: dsidir on September 08, 2014, 18:37:27 pm
any specific "line" or at the end of the file it doesnt matter?
Title: Re: why my "related products" is in vertical?
Post by: GJC Web Design on September 09, 2014, 09:27:39 am
just try it!  You will then learn something from your experience - i.e. how css rules work....
Title: Re: why my "related products" is in vertical?
Post by: dsidir on September 09, 2014, 17:12:37 pm
thanx for the help

ok. I see.

I tried it at vmsite-ltr.css  but nothing happened, it didnt work.

I tried after that to a css file of the template at now it seems to work but all the related products fall over a module position and ruin other modules. Furthermore some of the are next to each other, and others are a little bit more on the right.
please see image

[attachment cleanup by admin]
Title: Re: why my "related products" is in vertical?
Post by: jenkinhill on September 09, 2014, 17:56:53 pm
I think its time you used Firebug to work it out:  http://forum.virtuemart.net/index.php?topic=116620.0
Title: Re: why my "related products" is in vertical? [solved]
Post by: dsidir on September 15, 2014, 18:13:29 pm
The solution for whoever has a similar problem is to put at template css file at the end or wherever the following code:

.product-field.product-field-type-R.row-fluid {
width: 32%;
display: inline-block;
}
.product-field.product-field-type-R.row-fluid > .span6 {
float: left;
width: 100%;
margin-left: 0px;
}

However I have 2 more questions for this issue:
1. Another question is when I click to the related products they open to a new tab. Do you know where I can find the code to change it so that will open to the same window ?
2. When you add a product to the basket and the pop up window shows, I see related products again in vertical position and very big. Any help with that will be perfect..Probably I have to use the same code as above but I cant find the file.
Title: Re: why my "related products" is in vertical?
Post by: GJC Web Design on September 15, 2014, 21:00:02 pm
Quote
Another question is when I click to the related products they open to a new tab. Do you know where I can find the code to change it so that will open to the same window ?
$facebook is not a function - JS error - check your VM admin setup for facebook or your template needs up dating

Quote
When you add a product to the basket and the pop up window shows, I see related products again in vertical position and very big. Any help with that will be perfect..Probably I have to use the same code as above but I cant find the file.
can't find an add to cart
Title: Re: why my "related products" is in vertical?
Post by: dsidir on September 16, 2014, 15:47:02 pm
I really didnt understand anything of the above.

1. What facebook has to do with that ?
2. I mean when clicking add to basket for a product
Title: Re: why my "related products" is in vertical?
Post by: GJC Web Design on September 16, 2014, 17:24:37 pm
meant $facebox... was late

have a look thru your VM config->config->templates - what do you find... ? Activate Css Styles & Javascripts

Quote
    When you add a product to the basket and the pop up window shows, I see related products again in vertical position and very big. Any help with that will be perfect..Probably I have to use the same code as above but I cant find the file.

can't find an add to cart

so did I - do you want me to spend half an hour trying to find a product with an add to cart
or will you quicken the whole process by posting a direct link????
Title: Re: why my "related products" is in vertical?
Post by: dsidir on September 17, 2014, 12:34:59 pm
This is on a test server. http://agrogen.esy.es/el/e-shop/futoxomata/futoxoma-50lt- 
Click thw green frame saying "Στο καλάθι" means add to basket and you will see what I mean concerning the related products issue. They are presenting horizontal
Title: Re: why my "related products" is in vertical?
Post by: GJC Web Design on September 17, 2014, 23:21:45 pm
3 lines of css -
I think you better go and read up a bit about css..

.product-field {
  float: left;
  margin: 0 10px 0 0;
  max-width: 150px;
  padding-bottom: 10px !important;
}

[attachment cleanup by admin]
Title: Re: why my "related products" is in vertical?
Post by: dsidir on September 18, 2014, 16:02:07 pm
yes thats great. and its true that I have to read a bit of css.

However I cant find the file that I have to add the code you wrote