VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: dnlvsci on September 23, 2012, 18:54:39 PM

Title: Ask a question css problem
Post by: dnlvsci on September 23, 2012, 18:54:39 PM
Hello!

If I want to use my own virtuemart.css and disabling the deafult vmsite-ltr.css the ask a question styles missing. My file contain the original ask a question styles but the css not rendered. Can anyone tell me why?
Title: Re: Ask a question css problem
Post by: bytelord on September 23, 2012, 21:51:58 PM
Hello,

You forgot to mention you joomla, virtuemart and PHP version. Where did you place your virtuemart.css file? Do you use template override? Do you use any third party template?
Title: Re: Ask a question css problem
Post by: malaclypse on September 24, 2012, 12:26:32 PM
Quote from: bytelord on September 23, 2012, 21:51:58 PM
You forgot to mention you joomla, virtuemart and PHP version.
I don't think that this makes any difference in this case, as long as we are talking about VM2. .

I was facing the same problem, changes in the CSS file of my template just would not apply. The thing being different for the ask-a-question box is that it is displayed in an iframe. So the CSS of the parenting document does not apply to it.

I did not want to make any changes to the vmsite-ltr.css too, as it is overwritten by each update. So I made a template override:

edit the file, after the line $document = JFactory::getDocument(); insert a new line $document->addStyleSheet( $this->baseurl ."/templates/yourtemplate/css/yourcssfile.css" );


If anyone knows a better way to do this, please share.
Title: Re: Ask a question css problem
Post by: dnlvsci on September 24, 2012, 17:24:39 PM
malaclypse said good. This is general problem. This happen both of joomla version. Now I'm using J2.5.7 and VM 2.010 but some of my site using J.1.5.26 and VM2.01.  Since I'm using VM2 this happen every version of VM.

I'm using my own template, and I have virtuemart.css in my css folder and I disabled vmsite-ltr.css in VM config. The template override doesn't metter, because didn't work with original tempalte too if you using different css than vmsite-ltr.css.
Title: Re: Ask a question css problem
Post by: dnlvsci on September 24, 2012, 18:02:03 PM
Quote from: dnlvsci on September 24, 2012, 17:24:39 PM
If anyone knows a better way to do this, please share.

I have a better way :) Now I renamed my virtuemart.css to vmsite-ltr.css in my template css folder. The styles now good but I think this not solve the main problem..... The question is why renderer good ask a question iframe style if your own style name have vmsite-ltr.css and why not renderer good if your css have another name??????

The second problem this: I have a general style for input type="submit" in the template styles. This isn't loading too, and any general formatting like h1 p div and etc.. so any general joomla formatting not loading....
Title: Re: Ask a question css problem
Post by: bytelord on September 24, 2012, 18:20:08 PM
Hello,

You made something wrong with your styling i suppose. Please take a look here how you could use firebug to resolve issues like the one you have: http://forum.virtuemart.net/index.php?topic=102850.0

Regards
Title: Re: Ask a question css problem
Post by: dnlvsci on September 24, 2012, 19:54:07 PM
Believe me, the problem is not unique and not mine. Just try it yourself! Disable the default VM CSS in VM config, after copy the vmsite-ltr.css in your template css folder and rename that example virtuemart.css. After paste this your template index.php (in this example case I'm using Joomla default Atomic template so->)

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/virtuemart.css" type="text/css" /> After try the ask a question popup.... The result........... grrrr

After that, rename back the virtuemart.css to vmsite-ltr.css and paste this in your template index.php file
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ vmsite-ltr.css" type="text/css" /> Try the ask a question popup... The result working fine.

I'm templating in joomla more than 3 years ago, and If you can't believe me, check out the Gavick Pro Bikestore template http://demo.gavick.com/index.php?month=Jun&year=2012
Ther is no ask a question style too because they are using vm.css and vmframe.css hovever they definied color style in they vm.css example:
.ask-a-question-view .form-field textarea.field {
   width: 394px;
   border: solid #eee 1px;
   color: #777;
   text-align: left;
   padding: 12px;
}
If you watch this in firebug you can see no style for the textarea hovever the vm.css conatin the code.......
Title: Re: Ask a question css problem
Post by: bytelord on September 24, 2012, 20:51:41 PM
hello,

i don't know about gavick templates, you should ask gavick about...

On your issue now, what's that exactly? default theme css has styling for ask-a-question, also inside productdetails\default.php around line 29 there are extra javascript for ask-a-question, what is now working?
There is no reason to disable the vm css from backend in case you are using overrides, because overrides does not contain ALL the styling...
Title: Re: Ask a question css problem
Post by: dnlvsci on September 24, 2012, 21:05:04 PM
hello,

i don't know about gavick templates, you should ask gavick about...

On your issue now, what's that exactly? default theme css has styling for ask-a-question, also inside productdetails\default.php around line 29 there are extra javascript for ask-a-question, what is now working?
There is no reason to disable the vm css from backend in case you are using overrides, because overrides does not contain ALL the styling...

The gavick was just an example. The reason why I disable-> I want to make my own style. first I copied the whole  vmsite-ltr.css my template and renamed it virtuemart.css....I will make a video or picture pack and show my problem. This will better than the "chat" xD
Title: Re: Ask a question css problem
Post by: bytelord on September 24, 2012, 21:10:38 PM
Gavick uses framework, so is not a standard joomla template, although he is using vm template overrides and load that css from it's code.

Please take a look here for template overrides: http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system
http://docs.joomla.org/Understanding_Output_Overrides
Title: Re: Ask a question css problem
Post by: dnlvsci on September 24, 2012, 21:59:47 PM
Yes yes. I want to style override too but not working the override in the "ask a question" modal frame and the "recommend "modal frame.  The style override (in the 2 things case) working good if my override style name is vmsite-ltr.css but not working if i'm using another css style name (example virtuemart.css). And another one, not working the general styles override what I coded in my joomla style. Ex: I have a general red color of the H1's. The H1 color rendering everywhere in VM good, except in the "ask a question" modal and in the "recommend modal".
Title: Re: Ask a question css problem
Post by: bytelord on September 24, 2012, 22:17:34 PM
Hello,

Do you have any live url to check it?

Also could use the property a.ask-a-question to apply the color style?

Regards
Title: Re: Ask a question css problem
Post by: dnlvsci on September 26, 2012, 21:21:58 PM
No I haven't any live url. I'm working on my localhost. I'd like to upload professional template on the live site. I will make a screen shot, and attac my next post. You will see my problem.

Update: here is my modal style problem... I hope you will unserstand everything. ;)

[attachment cleanup by admin]
Title: Re: Ask a question css problem
Post by: bytelord on September 26, 2012, 22:02:46 PM
Hello,

I am sure there is gavick template thing, So many posts for that :) , but anyway. You could add the following style inside your virtuemart.css or override.css if you using it.

.ask-a-question-view h1, .manufacturer-details-view h1 {

}

inside {} style it as you wish.

* Will change both title for ask-a-question and manufacturer-details title popup
Regards

* Gavick uses heavy overrides and overrides all that styles as you see on your screenshot

Regards
Title: Re: Ask a question css problem
Post by: dnlvsci on September 27, 2012, 11:50:47 AM
:) This is not Gavick theme. This is my own theme The gavick was an example. This happen all theme what using virtuemart style override. Rocket theme, gavick, yootheme, my own theme etc.

I thought the VM2 using some absolute url or something else when call ask a question modal frame style. That's why I open this topic. I want to understand how does it work (the css calling) And what i said in the past: This happen the RECOMMEND modal style too.

I think i will contact with milbo and ask him how does it work. Thank you for your help.
Title: Re: Ask a question css problem
Post by: bytelord on September 27, 2012, 12:13:10 PM
Hello,

Sorry for the mistake, didn't read carefully. Inside your custom vm.css file did you try this?

.ask-a-question-view h1, .manufacturer-details-view h1 {

}

In your screenshot you show how to customize your css for styling the header title of the popup ask a question...
the js code form that pop is at the start of default.php of product details

Quote

... default theme css has styling for ask-a-question, also inside productdetails\default.php around line 29 there are extra javascript for ask-a-question, what is now working?
There is no reason to disable the vm css from backend in case you are using overrides, because overrides does not contain ALL the styling...

css is just styling that you can override its properties or create new, take a look on the above. Also it uses facebox.css that is you use firebug you could see it and is located under assets folder in your vm installation.

Regards