News:

Support the VirtueMart project and become a member

Main Menu

Ask a question css problem

Started by dnlvsci, September 23, 2012, 18:54:39 PM

Previous topic - Next topic

dnlvsci

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?

bytelord

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?
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

malaclypse

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:


  • create a folder in your temlate: /html/com_virtuemart/askquestion
  • copy the file /components/com_virtuemart/views/askquestion/tmpl/form.php into that folder
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.

dnlvsci

#3
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.

dnlvsci

#4
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....

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

dnlvsci

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.......

bytelord

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...
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

dnlvsci

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

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

dnlvsci

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".

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

dnlvsci

#12
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]

bytelord

#13
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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

dnlvsci

:) 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.