VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: PRO on September 14, 2011, 21:28:43 PM

Title: NO MORE THEME. 2+ uses VIEWS (Layout Override)
Post by: PRO on September 14, 2011, 21:28:43 PM
2.0 does NOT use a "theme". It uses the standard Joomla "View".


The view folders are located
com_virtuemart/views/MANY_VIEWS_HERE


Doing a Joomla Template Override is easy.
Open the view folder you want to change, THEN, the tmpl folder.
COPY the "default.php"
THEN< follow the steps below.
In your JOOMLA template folder. You create a folder called  "html" then a folder called "com_virtuemart" in it.
Then for each view you want to override. Create a folder for it.
Then place your modified "default.php" an that views folder.
So , to override the product details page. You create YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php

Doing a Joomla Template override guarantees the view will use your modified default.php

FOR changing the css. What you do is copy the virtuemart css located in
com_virtuemart/assets/css/vmsite-ltr.css

THEN, add that to your joomla template css file. (or call it seperately, AFTER you put a copy in your Joomla template foler)
THEN, go to vmart configuration, and turn off virtuemart css

[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: Milbo on September 15, 2011, 05:01:12 AM
Nice one Banquet here some more hints: http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: ruigato on September 15, 2011, 19:12:02 PM
hello

in the category view i manage to show category images via

echo $category->images[0]->displayMediaThumb("",true);

the output is the image with link to itself, can someone help me to link the image to the category?

I would like to do the same with the product images listings in categories, linking the image to de product details and not the standar modal image poput.

Thanks in advance
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on September 15, 2011, 19:20:17 PM
You can try this

         // Category Link
         $caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );

                     <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
                     <?php echo $category->images[0]->displayMediaThumb("",true); ?>


                     </a>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on September 20, 2011, 20:06:16 PM
Link the picture to the flypage from the category Page


<?php echo JHTML::_('link', JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id),$product->images[0]->displayMediaThumb('class="browseProductImage" border="0"',false)); ?>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: Ellalex on September 29, 2011, 09:49:01 AM
Based on this "YOU CAN then choose it as the default in vmart configuration" I created my own productdetails view and changed the vmart configuration to have the one I changed as default.

So I thought this would be my default view for at least the new products so that I don't have to choose it every time I create a new product... but when I create a new product at Product Details Page field the "default" is selected and not the one I set up as the default in vmart configuration.

Is this how it works or am I doing something wrong? Do I have to choose the new one for all products I create?
   
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: Ellalex on September 30, 2011, 13:31:47 PM
Quote from: BanquetTables.pro on September 20, 2011, 20:06:16 PM
Lance, it could be coded.

BUT you can also choose related categories in each product

Related Categories works though I would prefer it to show this without me having to add them but anyway this works but I want to move it on another place on the view e.g. under Manufacturer in product-details view.

Anyone knows which code I should move there? I tried many ways but none seemed to work :(

Edit: Found it, had to move the code below to move custom fields on another place in productdetails view  ::)

<?php
if (!empty(
$this->product->customfields)) { ?>

<div class="product-fields">
<?php
$custom_title null ;
foreach ($this->product->customfields as $field){
?>
<div style="display:inline-block;" class="product-field product-field-type-<?php echo $field->field_type ?>">
<?php if ($field->custom_title != $custom_title) { ?>
<span class="product-fields-title" ><b><?php echo JText::_($field->custom_title); ?></b></span>
<?php echo JHTML::tooltip($field->custom_tip,  JText::_($field->custom_title), 'tooltip.png');
?>

<span class="product-field-display"><?php echo $field->display ?></span>
<span class="product-field-desc"><?php echo jText::_($field->custom_field_desc?></span>
</div>
<?php
$custom_title $field->custom_title;
?>

</div>
<?php
// Product custom_fields END ?>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PeterMK85 on December 25, 2011, 16:43:40 PM
For me one thing is missing:

The code for the measurements of the product (length/height/width/weight)

Anybody knows that?
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on December 25, 2011, 17:20:43 PM
Quote from: PeterMK85 on December 25, 2011, 16:43:40 PM
For me one thing is missing:

The code for the measurements of the product (length/height/width/weight)

Anybody knows that?

http://forum.virtuemart.net/index.php?topic=92756.0
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: flaterik on January 03, 2012, 02:08:03 AM
How to use this code on product detail page?
I try to use it but doesn't recognize <?php echo $product->stock->stock_level ?> and the image doesn't work

Product Stock Level Picture
                  <div class="paddingtop8">
                     <span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo

$product->stock->stock_tip ?>"></span>
                     <span class="stock-level"><?php echo JText::_

('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
                  </div>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: infinart on January 03, 2012, 11:40:55 AM
ok. So how does one, like myself, with no PHP and very little html skill make the category pages look decent. I like my sites to be pixel perfect.
Are there pre-made php files that already style the page rather than the mess I see as in the attached image?

(http://infiniteart.com.au/ftp/Screen%20Shot%202012-01-03%20at%209.38.39%20PM)
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 03, 2012, 15:54:17 PM
Quote from: infinart on January 03, 2012, 11:40:55 AM
ok. So how does one, like myself, with no PHP and very little html skill make the category pages look decent. I like my sites to be pixel perfect.
Are there pre-made php files that already style the page rather than the mess I see as in the attached image?

(http://infiniteart.com.au/ftp/Screen%20Shot%202012-01-03%20at%209.38.39%20PM)

sounds like you will need to buy a theme , or learn html/css

No other way around it
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: flaterik on January 03, 2012, 16:05:46 PM
[quote ]
Product Stock Level Picture
                  <div class="paddingtop8">
                     <span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo

$product->stock->stock_tip ?>"></span>
                     <span class="stock-level"><?php echo JText::_

('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
                  </div>
[/quote]

Someone can help me? I think i don't write very well my problem
The code that i post work on category page.
I want to put in productdetails but doesn't work.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 03, 2012, 17:08:52 PM
Quote from: flaterik on January 03, 2012, 02:08:03 AM
How to use this code on product detail page?
I try to use it but doesn't recognize <?php echo $product->stock->stock_level ?> and the image doesn't work

Product Stock Level Picture
                  <div class="paddingtop8">
                     <span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo

$product->stock->stock_tip ?>"></span>
                     <span class="stock-level"><?php echo JText::_

('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
                  </div>


http://forum.virtuemart.net/index.php?topic=92756.0


Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: flaterik on January 03, 2012, 23:25:40 PM
There i can't find Product Stock Level Picture!
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 04, 2012, 15:37:17 PM
Quote from: flaterik on January 03, 2012, 23:25:40 PM
There i can't find Product Stock Level Picture!

sorry, I cannot figure it out. I do not use stock
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 04, 2012, 15:39:12 PM
You could do your own like this though


<?php if ($this->product->product_in_stock <= 100) { ?>
                  <div>HTML CSS HERE</div>
               <?php    }?>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: flaterik on January 04, 2012, 19:25:44 PM
Oh thank you for the ideas!

If work well, i put the code here if is usefull!
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: flaterik on January 04, 2012, 20:18:48 PM
Good!
Not fine programmation but works!
The variable $titolo , is directly in my language but it's easy to put here the general language text. I haven't time at moment :)
I put my personal quantity. What is the variabile for Stock Notification? Putting it in the quantity make it work for every product.
If you know give me the right var

Here the code

<div class="paddingtop8b">
             <?php if ($this->product->product_in_stock == 0) {
                 $livello='nostock';
               $titolo='Spiacente, attualmente non ne abbiamo disponibili';
                           } elseif ($this->product->product_in_stock < 2) {
                              $livello='lowstock';
                              $titolo='Sono rimasti gli ultimi';
                           }
               else {
                              $livello='normalstock';
                              $titolo='Ne abbiamo in abbondanza';
                           }
           ?>
             <span><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span><span class="vmicon vm2-<?php echo $livello?>" title="<?php echo $titolo ?>"></span>
             </div>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: one on January 07, 2012, 14:46:35 PM
Quote
Doing a Joomla Template Override is easy.

This step is clear and very good but what with CSS files wich is stored in com_virtuemar/assets/css ?
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: one on January 07, 2012, 15:15:24 PM
And this path is correct?
Quote
So , to override the product details page. You create YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php

not this path?

YOUR_TEMPLATE/html/com_virtuemart/view/productdetails/default.php
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 07, 2012, 15:20:58 PM
you do not do the /view/ folder
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: one on January 08, 2012, 11:31:04 AM
I have put full copy from components/com_virtuemart/views/ template to:

YOUR_TEMPLATE/html/com_virtuemart/virtuemart

and in backend VM i see error:

QuotevmError: Attention file tmpl has no extension in view virtuemart and directory /xxx/templates/beez/html/com_virtuemart/virtuemart

Try to find solution on forum bat cant find clear unswer for me.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: infinart on January 08, 2012, 12:38:06 PM
when you say buy a theme do you mean a joomla template or a vm theme? If a vm theme  I thought 2.0 does not use themes. if it does, where do I get them?
thanks,
Carl
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 08, 2012, 18:54:43 PM
Quote from: one on January 08, 2012, 11:31:04 AM
I have put full copy from components/com_virtuemart/views/ template to:

YOUR_TEMPLATE/html/com_virtuemart/virtuemart

and in backend VM i see error:

QuotevmError: Attention file tmpl has no extension in view virtuemart and directory /xxx/templates/beez/html/com_virtuemart/virtuemart

Try to find solution on forum bat cant find clear unswer for me.


YOUR_TEMPLATE/html/com_virtuemart/virtuemart

should be

YOUR_TEMPLATE/html/com_virtuemart/

AND ONLY put the actual default.php  files.   NOT the whole folder. dont

html/com_virtuemart
category/default.php    for category
productdetails/default.php   for product detals



Quote from: one on January 07, 2012, 14:46:35 PM
Quote
Doing a Joomla Template Override is easy.

This step is clear and very good but what with CSS files wich is stored in com_virtuemar/assets/css ?


turn off "use virtuemart css"

THEN, move your modified css folder into yout template css folder, and add the code in your template index.php file
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: one on January 09, 2012, 08:05:51 AM
Ok, now clear for me. Thank you BanquetTables.pro. Next question, I have put YOUR_TEMPLATE/html/com_virtuemart/default.php do some changes on it but I not see this changes on frontend.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 09, 2012, 14:35:55 PM
look at the picture below.

My template name is "home"



[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: one on January 09, 2012, 16:33:26 PM
Yeah!!! :D Now I understand folder structure to overide Joomla Template.:) It should look like this:

YOUR_TEMPLATE/html/com_virtuemart/html/com_virtuemart/virtuemart/default.php for VM main page
YOUR_TEMPLATE/html/com_virtuemart/html/com_virtuemart/category/default.php    for category
YOUR_TEMPLATE/html/com_virtuemart/html/com_virtuemart/productdetails/default.php   for product detals
...

and contains only default.php file.

Thank you BanquetTables.pro!

Regarding CSS file I understand you, Thank you very much!
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on January 09, 2012, 16:59:19 PM
one, NO

correct
YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php
YOUR_TEMPLATE/html/com_virtuemart/category/default.php
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: one on January 09, 2012, 17:35:24 PM
Ohh... Sorry, it my mistake copy\paste... :) This will be correct:

YOUR_TEMPLATE/html/com_virtuemart/virtuemart/default.php for VM main page
YOUR_TEMPLATE/html/com_virtuemart/category/default.php    for category
YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php   for product detals
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: TBoele on March 14, 2012, 10:21:20 AM
And if you wanna override default_customfields.php you place a copy of this file in :

yourtemplate/html/com_virtuemart/productdetails/default_customfields.php

Is this correct ?
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on March 14, 2012, 12:28:31 PM
yes
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: drewby07 on March 20, 2012, 19:09:48 PM
Just FYI, doing this override broke all of my default VM images....such as the "add to cart" button etc.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: corymp on March 20, 2012, 19:17:26 PM
Quote from: drewby07 on March 20, 2012, 19:09:48 PM
Just FYI, doing this override broke all of my default VM images....such as the "add to cart" button etc.
take a copy of everything in /components/com_virtuemart/assets/ and put them in -> /templates/yourtemplate/
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on March 20, 2012, 19:37:25 PM
Quote from: corymp on March 20, 2012, 19:17:26 PM
Quote from: drewby07 on March 20, 2012, 19:09:48 PM
Just FYI, doing this override broke all of my default VM images....such as the "add to cart" button etc.
take a copy of everything in /components/com_virtuemart/assets/ and put them in -> /templates/yourtemplate/

Not everything,

Just the images folder.

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: corymp on March 20, 2012, 19:41:25 PM
Yeah, you're right. For me,  I have the css files copied over and virtuemart styling turned off. plus I've been styling everything including facebox, etc. I found it's nice to have it all in there
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: jakobe on March 31, 2012, 00:30:08 AM
what a nightmare!

just let folks create, install and use templates.

why all of the headache?...stop re-inventing the core way 99% of users want to use Joomla.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on March 31, 2012, 12:04:05 PM
Quote from: jakobe on March 31, 2012, 00:30:08 AM
what a nightmare!

just let folks create, install and use templates.

why all of the headache?...stop re-inventing the core way 99% of users want to use Joomla.


Why dont learn what  you are talking about?

JOOMLA USES "VIEWS" Unlike Vmart 1.1,  2.0 is actually the way Joomla components are supposed to be implemented.

If you quit your complaining, like you have done in every single of your posts I have read, and take the time to learn, you would be waaaay happier with 2.0

Red This section "Introduction to Model-View-Controller"
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: alvini on April 03, 2012, 10:24:15 AM
Regarding the CSS overwrite the steps you mention are not good.

THE CSS overwrite should be done automatically like for example is on K2.

If i put my VM CSS files the html folder it should load them automatically. I dont get why VM team has not done this.

If i put my VM css files on the template.css file that will make them load everytime and not only on the VM pages as it should.

Please consider to make the CSS overwrite to work smoth like it should on the new releases.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: alvini on April 10, 2012, 12:03:03 PM
Plus overwriting the CSS in that way breaks some other parts like the "ask a question about this product" pop up box...

So if someone knows another better way to overwrites ;D the VM CSS is welcome to share
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: terp on April 10, 2012, 18:43:04 PM
Thanks, BanquetTables.pro....VERY helpful and got it all working.

Rather than add all the VM CSS overhead to EVERY compiled page, since I only have a dozen or so lines modified from the stock VM CSS, I merely added the few lines to my template.css and marked them as !important.

Thanks again.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on April 10, 2012, 18:57:58 PM
Quote from: terp on April 10, 2012, 18:43:04 PM
Thanks, BanquetTables.pro....VERY helpful and got it all working.

Rather than add all the VM CSS overhead to EVERY compiled page, since I only have a dozen or so lines modified from the stock VM CSS, I merely added the few lines to my template.css and marked them as !important.

Thanks again.




I just disabled the vmart css totally. Then, when I saw I needed something from the vmart css, I copied it, and pasted it in my template.
That was only
The quantity buttons, update delete buttons,

and the widths20 etc.

Then, I combined as many classes as I could with my template css.



Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: TBoele on April 11, 2012, 08:01:22 AM
Quote from: BanquetTables.pro on March 31, 2012, 12:04:05 PM
Why dont learn what  you are talking about?

JOOMLA USES "VIEWS" Unlike Vmart 1.1,  2.0 is actually the way Joomla components are supposed to be implemented.

If you quit your complaining, like you have done in every single of your posts I have read, and take the time to learn, you would be waaaay happier with 2.0

Red This section "Introduction to Model-View-Controller"
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1

I make a copy of  .../components/com_virtuemart/views/askquestion/tmpl/form.php  and placed it in  .../templates/my_template/html/com_virtuemart/askquestion/form.php
But when i made some changes it doesn't work. You see the changes if i do it in the original form.php.

Is it not possible to override this ask a question form.php ?
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on April 11, 2012, 14:20:27 PM
Quote from: TBoele on April 11, 2012, 08:01:22 AM
Quote from: BanquetTables.pro on March 31, 2012, 12:04:05 PM
Why dont learn what  you are talking about?

JOOMLA USES "VIEWS" Unlike Vmart 1.1,  2.0 is actually the way Joomla components are supposed to be implemented.

If you quit your complaining, like you have done in every single of your posts I have read, and take the time to learn, you would be waaaay happier with 2.0

Red This section "Introduction to Model-View-Controller"
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1

I make a copy of  .../components/com_virtuemart/views/askquestion/tmpl/form.php  and placed it in  .../templates/my_template/html/com_virtuemart/askquestion/form.php
But when i made some changes it doesn't work. You see the changes if i do it in the original form.php.

Is it not possible to override this ask a question form.php ?

yes its possible,

do you have more than 1 template?

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: baggeler on April 12, 2012, 02:00:07 AM
I followed al this discussions and I think I am getting the idea of overriding functionality.

In my case I did install VM onto Joomla 2.5 and a Yootheme template. It works pretty fine and the only thing remaining so far is that select boxes, buttons and popup forms (e.g. the ask a question form) do not inherit the layout settings and need to be adjusted.

http://www.orgonite-brasil.com/index.php/loja-virtual/orgonite-loja-virtual/por-forma
http://www.orgonite-brasil.com/index.php/component/virtuemart/por-forma/piramide-cheops-detail?Itemid=0

I did learn the basics about CSS some years ago and am refreshing my knowledge now "on the job" after being away from webdesign for over 7 years. Its my understanding that all I need is to create some override for the css file, is this correct (As do not need to modify anything on the layout itself but just change the background and font colors etc. so everything is congruent with the template)

I did download the vmsite-ltr.css (is this the correct one?) and now I am about to find the right tags I need to modify. How can I find out which are the correct classes to modify, can anybody point me to the files where to look for?

Thanks for your help!
Bernhard
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: TBoele on April 12, 2012, 08:12:19 AM
Quote from: BanquetTables.pro on April 11, 2012, 14:20:27 PM
yes its possible,

do you have more than 1 template?

No i have only 1 template installed, beside the default templates. And like i said i copied the file to ../templates/my_template/html/com_virtuemart/askquestion/form.php  and nothing happened. Only if i make a change to the original file.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: robinclapp on April 20, 2012, 23:27:36 PM
Banquet tables

You know your solution: 

<?php echo JHTML::_('link', JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id),$product->images[0]->displayMediaThumb('class="browseProductImage" border="0"',false)); ?>

Is there any way to get a class="modal" into the link so that the details page is a popup?  I have your solution working on my site right now I just need to work in this last piece
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on April 21, 2012, 12:41:03 PM
Quote from: robinclapp on April 20, 2012, 23:27:36 PM
Banquet tables

You know your solution: 

<?php echo JHTML::_('link', JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id),$product->images[0]->displayMediaThumb('class="browseProductImage" border="0"',false)); ?>

Is there any way to get a class="modal" into the link so that the details page is a popup?  I have your solution working on my site right now I just need to work in this last piece


the modal does not work on PAGES, just images.

It can be done with changing the link, and a target new

Or, the modalizer plugin http://www.nonumber.nl/extensions/modalizer      can do it, BUT::::::::::::::  You will have some conflicts that have to be worked out if you try to use it
Title: where are the views for the modules?
Post by: phiroz on April 24, 2012, 18:52:55 PM
hi,

i'm creating custom views for VM2, and dont have issue with ones i can find in the VIEWS folder.

but for some reason i'm blind to finding the file that is creating the view for Module VirtueMart Products.
so the this here is the code of that the file is creating. i searched folder "com_virtuemart\views" for some file that used the "vmgroup" class

<div class="vmgroup">
<div class="vmheader">Take a look at our brand new products</div>
<div class="vmproduct">
<div class=" width33 floatleft">
<div class="spacer">
<a title="Smaller Shovel" href="/bb/index.php/component/virtuemart/gardentools/smaller-shovel-detail?Itemid=0">
<div class="clear"></div>
<a href="/bb/index.php/component/virtuemart/gardentools/smaller-shovel-detail?Itemid=0">Smaller Shovel</a>
<div class="clear"></div>
</div>


----------- i am an idiot --------------- :o :o :o :o :o :-[
okie so in the same post i just realize where i was going wrong as i was explaining the "component/com_virtuemart" was my AHH HA moment .... its a MODULE. So i should be looking in "modules\mod_virtuemart_product"

lolz what a great first post. still posted it in case some people were wondering where some of the views were.

component view are located in  "components\com_virtuemart\views"
module views are located in "modules\mod_virtuemart_xxxxx"

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on April 24, 2012, 22:08:09 PM
modules/mod_virtuemart_product/tmpl/HERE


Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: Snarkelton on May 01, 2012, 01:10:34 AM
I'm sorry, I'm not a PHP expert...

Where exactly do I put:

<?php echo JHTML::_('link', JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id),$product->images[0]->displayMediaThumb('class="browseProductImage" border="0"',false)); ?>

in category/default.php I assume, but where? what line(s)???
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: Snarkelton on May 01, 2012, 02:28:31 AM
DISREGARD ---found it. ...around line 441.

And it works! Thanks BT.p!

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: readyforchange on May 08, 2012, 21:17:14 PM
QuoteFOR changing the css. What you do is copy the virtuemart css located in
com_virtuemart/assets/css/vmsite-ltr.css

THEN, add that to your joomla template css file. (or call it seperately, AFTER you put a copy in your Joomla template foler)
THEN, go to vmart configuration, and turn off virtuemart css

I have a question regarding this...

I am using yootheme cloud.  Where would I add the vmsite-ltr.css to since there is no template.css ?

Thanks!
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on May 09, 2012, 00:19:10 AM
Quote from: readyforchange on May 08, 2012, 21:17:14 PM
QuoteFOR changing the css. What you do is copy the virtuemart css located in
com_virtuemart/assets/css/vmsite-ltr.css

THEN, add that to your joomla template css file. (or call it seperately, AFTER you put a copy in your Joomla template foler)
THEN, go to vmart configuration, and turn off virtuemart css

I have a question regarding this...

I am using yootheme cloud.  Where would I add the vmsite-ltr.css to since there is no template.css ?

Thanks!

whatever file your template loads.

View source, or use firebug

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: kasperghost on May 24, 2012, 20:15:43 PM
Hey Banquettables.pro,
is it possible to add the functionality of module VM - featured products into the overriden
<template>\html\com_virtuemart\virtuemart\default.php
Or do i have to directly edit the \components\com_virtuemart\views\virtuemart\tmpl\default.php ?

I want to have my frontpage load only featured products but with the added functionality of the
module. That is missing from the default.php inside virtuemart. Is it possible?
If I load inside an article the featured products and dont load the virtuemart at the frontpage then
the categories module stops functioning correctly while at the same time on top of the article a
message is being displayed to load the virtuemart.
How can I have categories working on the module on the side with no categories being at the center?

sorry for my english!
thanx for any answer in advance!
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: cristina on June 01, 2012, 17:05:37 PM
Hi,
does somebody knows if override works even for the backend?
I would like to override the "orders" in the administration.
I managed to make the changes I want, but if I can override the admin component it would be better.

Thanks
Cristina
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on June 01, 2012, 17:17:01 PM
Quote from: cristina on June 01, 2012, 17:05:37 PM
Hi,
does somebody knows if override works even for the backend?
I would like to override the "orders" in the administration.
I managed to make the changes I want, but if I can override the admin component it would be better.

Thanks
Cristina


yes, you do the same, but in your admin template
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: cristina on June 01, 2012, 17:51:19 PM
Thanks BanquetTables.pro.

Cristina
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: bajobongo on June 04, 2012, 14:42:16 PM
Quote from: BanquetTables.pro on June 01, 2012, 17:17:01 PM
Quote from: cristina on June 01, 2012, 17:05:37 PM
Hi,
does somebody knows if override works even for the backend?
I would like to override the "orders" in the administration.
I managed to make the changes I want, but if I can override the admin component it would be better.

Thanks
Cristina

No, not always. I've modified a file product_edit_information.php (available at: administator/component/com_virtuemart/views/product/*) in my template and nothing. Only default.php from this directory is overridable. Is it bug?
yes, you do the same, but in your admin template
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PHPHELL on June 25, 2012, 14:51:36 PM
Hi  BanquetTables.pro.

joomla 2.5
vm 2.6

I have recently purchased a vm template and I have to say the whole experience was hell - I finally got it and then of course turned to instruction from them as to how to install it.

What I found was vague at best and they used the term "Theme folder" as to where to install!  Yet vm2 does not have a themes folder.  I wrote to them but as they are pretty usless at best, I hold no hope for any decent help.

So I search for help and found your instructions.

However, I am struggling to make sense of your guide and hope you can clarify.


QuoteOpen the view folder you want to change, THEN, the tmpl folder.
COPY the "default.php"

I only have one view folder and I opened tmpl folder and copied the default.php.

QuoteIn your JOOMLA template folder. You create a folder called  "html" then a folder called "com_virtuemart" in it.

This is where the template instructions did help, I uploaded the new vm template html folder to this directory as you say and it does have the com_virtuamart folder within.

QuoteThen for each view you want to override. Create a folder for it.

Now, this is where I am really lost. could you possibly explain in detail. I want to change every view and clearly the new template has all views changed. I can only assume you mean here that I create a folder for say "productdetails"

do I name this new folder anything I want? productdetails1 for example?  and do this with ALL other views  askaquestion, cart  etc  ( this seems longwinded and I do not think I am correct)

QuoteThen place your modified "default.php" an that views folder.

Again I am lost.... I have no idea what I need to do, to modify "default.php"  what line or even what I need to do to call this new template.  Of course answers to the above questions may make this clearer.

I feel totally let down from a paid for sevice, not what you you expect really so if you can lessen the blow and eleborate further I would be very greatful.

Thanks

Scott
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: srajca on June 26, 2012, 23:32:40 PM
OK so what you have to do is the following. You have a template installed in your joomla. Lets call it YOURTEMPLATE. So to make an override you simply have to go to;
templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default.php
this is for the default in productdetails
if you do not have file html or any of the files that follow than simply create them.
And that is all the magic. Once you will start editing inside that folder then this will be an override and it will not be affected when upgrading Virtuemart.

Here are some examples;
templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default_images.php   -----> for images in product details view
templates/YOURTEMPLATE/html/com_virtuemart/category/default.php                         -----> for default category view
templates/YOURTEMPLATE/html/com_virtuemart/cart/default_pricelist.php                   -----> for price view in cart

and so on...hope I was able to help.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: reddeer on August 06, 2012, 21:10:38 PM
Thank you, Banquet Table Pro, for all the quick and valuable VirtueMart configuration tips.  :)  This theme information was especially helpful.
Sincerely,
Reddeer
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: simsar78 on August 09, 2012, 08:59:51 AM
hello,
i have tested your info for changing the template ... one for category.
But i change che template in the category manager ... i no have reasons... virtuemart take the css and other by the principal theme .... why ?

In the old version... it's all ok....but in 2.0.8 no ?

thank you
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: baggeler on August 11, 2012, 01:42:16 AM
PHPhell

Would be nice to know which template you bought which is causing headaches. I like the forum because it shows the real problems we all have, all that which is not visible in the polished marketing stuff which we see when we go purchasing for components. Its important to share all these bugs or non appearant weaknesses so we can see which vendors care and help (I see there are quite a lot here taking a lot of care in solving) and which just stay quiet and leave us alone...

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: hendrix01 on September 06, 2012, 11:24:04 AM
Still can't figure out how to call the CSS on the index file...
can anyone help me
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on September 06, 2012, 18:14:32 PM
Quote from: hendrix01 on September 06, 2012, 11:24:04 AM
Still can't figure out how to call the CSS on the index file...
can anyone help me

in your template index.php file?


I use this

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/kaizen/css/kaizen.css" type="text/css" />
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: jfdutoit on October 09, 2012, 15:51:48 PM
This post is really helpful.

Now I ran into a problem that makes me confused.

I created an override file as described in previous posts. 

Here's what I want to achieve:

There is one category that I want a different layout for.  All the other categories should use the default.  I want to use both the default file and the override file. 

But since I created the override file, all categories now uses the override's layout. 

When I play with the configuration of the category pages in the administrator's area, I see no changes.  It doesn't matter if I choose "Copy of Default", "Default", or "No Override" under the "Category Browse Page"-options.  Every time the override's layout are used. 

Is there another place where I must make config changes.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on October 10, 2012, 00:27:59 AM
Quote from: jfdutoit on October 09, 2012, 15:51:48 PM
This post is really helpful.

Now I ran into a problem that makes me confused.

I created an override file as described in previous posts. 

Here's what I want to achieve:

There is one category that I want a different layout for.  All the other categories should use the default.  I want to use both the default file and the override file. 

But since I created the override file, all categories now uses the override's layout. 

When I play with the configuration of the category pages in the administrator's area, I see no changes.  It doesn't matter if I choose "Copy of Default", "Default", or "No Override" under the "Category Browse Page"-options.  Every time the override's layout are used. 

Is there another place where I must make config changes.

http://forum.virtuemart.net/index.php?topic=94044.0
will that help?


are you changing the administrator main configuration?

or in the individual category that lets you choose a layout?>
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: jfdutoit on October 10, 2012, 09:49:31 AM
Thanks for you reply.

Quote from: PRO on October 10, 2012, 00:27:59 AM
http://forum.virtuemart.net/index.php?topic=94044.0
will that help?

I looked a couple of times at that post, but due to my limited css knowledge and lack in confidence, I'm rather trying to find some other solution before I try it. 

Here's what I did in the two files.  Maybe that is exactly the css changes you refer to, without me realizing it. 

The relevant code that I use in the default file looks like this:  (This shows the product name and images in the first div, and the short description and 'add-to-cart-bar' in the next div.  These two div's show horizontally on the page.)  (Horizontal Layout)
<div class="width30 floatleft center">
<div class="width70 floatright">

Below is the way I changed it in the override file:  (In this case, the second div shows below the first div.)  (Vertical Layout)
<div class="">
<div class="">


Quote from: PRO on October 10, 2012, 00:27:59 AM
are you changing the administrator main configuration?

or in the individual category that lets you choose a layout?>

I played around with all the possible settings.  I set the main config to one option, then I test every setting in the category.  When I'm done with all the settings in the category page, I move on to the next setting in the main config.  Then I test every single option again.
Even though I did this, I saw no change.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on October 10, 2012, 18:28:33 PM
Quote from: jfdutoit on October 10, 2012, 09:49:31 AM
Thanks for you reply.

Quote from: PRO on October 10, 2012, 00:27:59 AM
http://forum.virtuemart.net/index.php?topic=94044.0
will that help?

I looked a couple of times at that post, but due to my limited css knowledge and lack in confidence, I'm rather trying to find some other solution before I try it. 

Here's what I did in the two files.  Maybe that is exactly the css changes you refer to, without me realizing it. 

The relevant code that I use in the default file looks like this:  (This shows the product name and images in the first div, and the short description and 'add-to-cart-bar' in the next div.  These two div's show horizontally on the page.)  (Horizontal Layout)
<div class="width30 floatleft center">
<div class="width70 floatright">

Below is the way I changed it in the override file:  (In this case, the second div shows below the first div.)  (Vertical Layout)
<div class="">
<div class="">


Quote from: PRO on October 10, 2012, 00:27:59 AM
are you changing the administrator main configuration?

or in the individual category that lets you choose a layout?>

I played around with all the possible settings.  I set the main config to one option, then I test every setting in the category.  When I'm done with all the settings in the category page, I move on to the next setting in the main config.  Then I test every single option again.
Even though I did this, I saw no change.


so in the category you want different, you changed this?

Category Browse Page



ALSO:
When you have a setting in the administrator config. Then, create a new category. Its automatically assigned that category.
So, when you go back and change the "main config", its NOT going to change all the categories. You would have to do that manually in each 1.

So, you leave the main config to be the "normal" one,

and then in the categories you want different, or special. Assign them in the individual category
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: Scott799 on October 13, 2012, 03:39:49 AM
ok, not a "pro" here, but "Banquet Tables Pro" seems to be... hopefully someone can help translate a bit for the non-technical guy like me?

I have a site almost ready to go live, my final stages are now and I'm trying to get the payment functioning correctly.

J 1.7 and VM 2.0
site: www.golfsgreatheritage.com

question 1 - When I go to my checkout after selecting a product, there are no "steps indicated at the top of the page", somewhat confusing, but moving ahead...
ISSUE 1 - When I enter in the bill and ship to info as a customer would, then check agree to terms, and click "continue to check out", the only thing that happens is I loop back to this page. 

I've read so much in the forum, makes me question the use of the term "stable" with a VM cart situation given all the posts, and now after several days of trial and error on suggestions (which are really are all over the map) from the backend admin side I have not resolved this.  I noticed the code from Banquet Pro to setup a custom checkout, but this is not clear to me as I'm only understand a smidge of code related stuff.  I looked at the suggested php file to edit, but there is a lot more code there then what is offered on this post.  Do you simple add Banquet Pro's code at the end?

"Stable" is such a mis-used description, given recoding is needed just to make VM 2 version checkout to work without looping?  I have seen, but now don't anymore that there is a "confirm" button, why does this not show up for me?  Reminds me of the cache issue I resolved, but in this case the problem persists even if I don't enable the joomla core cache.

I was able to get a sandbox test to go all the way through a week ago, but now without sandbox activated, a normal guest checkout or registered checkout is just a silly loop.  Not much sales activity in this mode.  PLEASE HELP!

Thanks,
Scott
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on October 18, 2012, 02:12:23 AM
Quote from: Scott799 on October 13, 2012, 03:39:49 AM
ok, not a "pro" here, but "Banquet Tables Pro" seems to be... hopefully someone can help translate a bit for the non-technical guy like me?

I have a site almost ready to go live, my final stages are now and I'm trying to get the payment functioning correctly.

J 1.7 and VM 2.0
site: www.golfsgreatheritage.com

question 1 - When I go to my checkout after selecting a product, there are no "steps indicated at the top of the page", somewhat confusing, but moving ahead...
ISSUE 1 - When I enter in the bill and ship to info as a customer would, then check agree to terms, and click "continue to check out", the only thing that happens is I loop back to this page. 

I've read so much in the forum, makes me question the use of the term "stable" with a VM cart situation given all the posts, and now after several days of trial and error on suggestions (which are really are all over the map) from the backend admin side I have not resolved this.  I noticed the code from Banquet Pro to setup a custom checkout, but this is not clear to me as I'm only understand a smidge of code related stuff.  I looked at the suggested php file to edit, but there is a lot more code there then what is offered on this post.  Do you simple add Banquet Pro's code at the end?

"Stable" is such a mis-used description, given recoding is needed just to make VM 2 version checkout to work without looping?  I have seen, but now don't anymore that there is a "confirm" button, why does this not show up for me?  Reminds me of the cache issue I resolved, but in this case the problem persists even if I don't enable the joomla core cache.

I was able to get a sandbox test to go all the way through a week ago, but now without sandbox activated, a normal guest checkout or registered checkout is just a silly loop.  Not much sales activity in this mode.  PLEASE HELP!

Thanks,
Scott

RE: question 1.
Is it giving an error at the top?

I have attached steps.txt     to use it, you have to change the .txt to .php


You can just place it in the same /cart    folder

Then, call it with this code
<?php include("steps.php"); ?>

Place that code wherever you want

in cart/tmpl/default.php   right after this should be good
<div class="cart-view">




[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: neo314 on November 20, 2012, 20:53:54 PM
Quote from: alvini on April 03, 2012, 10:24:15 AM
Regarding the CSS overwrite the steps you mention are not good.

THE CSS overwrite should be done automatically like for example is on K2.

If i put my VM CSS files the html folder it should load them automatically. I dont get why VM team has not done this.

If i put my VM css files on the template.css file that will make them load everytime and not only on the VM pages as it should.

Please consider to make the CSS overwrite to work smoth like it should on the new releases.

I agree. I understand the Joomla! override system, but the CSS is a problem because you have to change so much to make it happen or risk breaking something. It may get better when there is some documentation.

If I turn off VM's CSS, how much of com_virtuemart/assets needs to be copied to my template? All of css? All of css and images? That makes it harder to track changes I think.

I have kept VM CSS and JS on in the configuration, then attached a VM specific css file to my template CSS and worked out overriding the specific elements as needed. It is manageable, but time consuming since my template does not wrap the buttons in span tags and the css is a bit complex. Extensive use of !important helps.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: PRO on November 20, 2012, 23:21:59 PM
Quote from: neo314 on November 20, 2012, 20:53:54 PM
Quote from: alvini on April 03, 2012, 10:24:15 AM
Regarding the CSS overwrite the steps you mention are not good.

THE CSS overwrite should be done automatically like for example is on K2.

If i put my VM CSS files the html folder it should load them automatically. I dont get why VM team has not done this.

If i put my VM css files on the template.css file that will make them load everytime and not only on the VM pages as it should.

Please consider to make the CSS overwrite to work smoth like it should on the new releases.

I agree. I understand the Joomla! override system, but the CSS is a problem because you have to change so much to make it happen or risk breaking something. It may get better when there is some documentation.

If I turn off VM's CSS, how much of com_virtuemart/assets needs to be copied to my template? All of css? All of css and images? That makes it harder to track changes I think.

I have kept VM CSS and JS on in the configuration, then attached a VM specific css file to my template CSS and worked out overriding the specific elements as needed. It is manageable, but time consuming since my template does not wrap the buttons in span tags and the css is a bit complex. Extensive use of !important helps.

when doing my site.

I took out vmart css.

THEN:

looked for things that needed classes.

Combined classes with my template ones.
Alot more manageable,

Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: neo314 on November 21, 2012, 20:29:00 PM
Quote from: PRO on November 20, 2012, 23:21:59 PM
Quote from: neo314 on November 20, 2012, 20:53:54 PM
...
I have kept VM CSS and JS on in the configuration, then attached a VM specific css file to my template CSS and worked out overriding the specific elements as needed. It is manageable, but time consuming since my template does not wrap the buttons in span tags and the css is a bit complex. Extensive use of !important helps.

when doing my site.

I took out vmart css.

THEN:

looked for things that needed classes.

Combined classes with my template ones.
Alot more manageable,

I'll have to look at that. It makes sense. I found too much of my template did not get applied, and that much of the css was fine and helpful (general layout) except for the "look" of some elements. Also, because I use some tools to help generate my template and have more than one template that might be used, this method would probably be less manageable for me. I can apply the same overrides to more than one template the way that I am doing it.

I think the css override should work though and be a part of VM. I would modify my comment however. There were too many !importants used which can cause a performance hit at the browser. The problem, which I am not sure why it is done this way, is that the VM layout and css uses extra elements like span.addtocart-button input.addtocart-button. That makes the VM css more specific than the template. To reduce the use of !important in the override css, I had to make my css equally specific because most of the template code only styles the button.

I'm not against the use of the span tag for the VM layout, but styling the button more specifically in theVM css seemed unnecessary, so some of the overriding css had to look like this:

form[name="enterCouponCode"] input.coupon {
width:200px;
}
form.inline input[name="quantity"] {
width:30px;
}
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 01, 2013, 03:35:26 AM
This treath help me put my custom field after the price! Thank you all for all the examples. Now i want it to add the same CSS Style that the Sales Price.

I was looking around but i don't see any CSS Style on the defaul.php of the product detail.

My Custom field code is

<?php // Custom Field Precio
 if (!empty($this->product->customfieldsSorted['precio'])) { $this->position='precio'; echo $this->loadTemplate('customfields');    }   ?>
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on February 01, 2013, 17:16:33 PM
what?
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 01, 2013, 20:08:38 PM
Sorry PRO. My bad. I think i didn't explained my self well.

On my product detail i want to have the same CSS of the Sale Price (#1 on the Image) for my custom field (#2 on the Image)



[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on February 01, 2013, 20:35:47 PM
Quote from: Flasher on February 01, 2013, 20:08:38 PM
Sorry PRO. My bad. I think i didn't explained my self well.

On my product detail i want to have the same CSS of the Sale Price (#1 on the Image) for my custom field (#2 on the Image)



If you only use 1 language: you can do it like this in default_customfields.php
(I THINK this should work like you want, I did not test it)
What is does is separate the styling differently for that custom field position.
change "myposition"  to YOUR position
defined ( '_JEXEC' ) or die ( 'Restricted access' );
?>
<div class="product-fields">
       <?php
       $custom_title = null;
       foreach ($this->product->customfieldsSorted[$this->position] as $field) {
       if ($field->layout_pos != myposition) {
          if ( $field->is_hidden ) //OSP http://forum.virtuemart.net/index.php?topic=99320.0
             continue;
         if ($field->display) {
       ?><div class="product-field product-field-type-<?php echo $field->field_type ?>">
          <?php if ($field->custom_title != $custom_title) { ?>
             <span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span>
             <?php
             if ($field->custom_tip)
            echo JHTML::tooltip($field->custom_tip, JText::_($field->custom_title), 'tooltip.png');
         }
         ?>
              <span class="product-field-display"><?php echo $field->display ?></span>
              <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>
          </div>
          <?php
          $custom_title = $field->custom_title;
         }
       }}
       ?>
      
       <?php
       if (!empty($this->product->customfieldsSorted[$this->position])) {
       foreach ($this->product->customfieldsSorted[$this->position] as $field ) {
      if ($field->layout_pos == myposition) {
          ?><div class="my-pos">Pago Con Tarjeta <span class="product-price"><?php echo $field->display ?></span></div>
          <?php
      }
       } }
       ?>
        </div>
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 02, 2013, 01:32:31 AM
Hi again Pro. It worked well. I can see the price alignment but the CSS is the same. It doesn't appears like the Sale Price. Here is a screen.



[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on February 02, 2013, 17:52:24 PM
Quote from: Flasher on February 02, 2013, 01:32:31 AM
Hi again Pro. It worked well. I can see the price alignment but the CSS is the same. It doesn't appears like the Sale Price. Here is a screen.



http://forum.virtuemart.net/index.php?topic=102850.0


change the css

Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 02, 2013, 20:11:46 PM
Quote from: PRO on February 02, 2013, 17:52:24 PM
Quote from: Flasher on February 02, 2013, 01:32:31 AM
Hi again Pro. It worked well. I can see the price alignment but the CSS is the same. It doesn't appears like the Sale Price. Here is a screen.



TYVM sir!!! It's done!

http://forum.virtuemart.net/index.php?topic=102850.0


change the css


Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 02, 2013, 20:50:28 PM
Ok now that the CSS is working i'm having another issue. The Customfield Price is appearing Twice. I Remove the one from the exampled you gave me of default_customfields.php

and i'm doing everything on the the default.php of the template views. But i getting double custom fields on the screen.

Here is my code:

    <?php // Custom Field Precio
 if (!empty($this->product->customfieldsSorted['precio'])) { $this->position='precio'; echo $this->loadTemplate('customfields');    }   ?>

</div>
                  <?php
        if (!empty($this->product->customfieldsSorted[$this->position])) {
       
    foreach ($this->product->customfieldsSorted[$this->position] as $field ) {
        if ($field->layout_pos == precio) {
          
?>
<div class="PricesalesPrice">Pago con Tarjeta <span class="PricesalesPrice"><?php echo $field->display ?></span></div>
          <?php
      
}
       } }
       
?>

               
<?php ?>




[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on February 03, 2013, 15:37:49 PM
did you set it up like a cart variant?

Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 03, 2013, 19:47:05 PM
Quote from: PRO on February 03, 2013, 15:37:49 PM
did you set it up like a cart variant?



No is not set like a cart variant. and i don't want it to be. It just a Information Price Field.
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on February 04, 2013, 13:15:51 PM
looks like its not removed from somewhere else

are you sure its not being called 2 times in your template?

Look here
http://forum.virtuemart.net/index.php?topic=90935.msg378890#msg378890

do you see where I changed the "normal" custom fields file to say
  if ($field->layout_pos != myposition) {

^^ that makes it NOT display in the regular custom fields
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Flasher on February 04, 2013, 20:40:07 PM
Well i end it up erasing everything to start again. What is the best option to display the custom field.

On the viev folder of the template in the default.php file or in the default_customfields.php on the view folder of product details of virtuemart?????
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on February 04, 2013, 21:39:46 PM
like this

http://forum.virtuemart.net/index.php?topic=90935.msg378886#msg378886


then do the normal in default.php

<?php
if (!empty($this->product->customfieldsSorted['mypos'])) {
   $this->position='mypos';
   echo $this->loadTemplate('customfields');
?>
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: yagami on March 08, 2013, 23:54:02 PM
hi
I want to move the product name above the image, I also want to move the description, selling price, cost and details below the image.
would help me a lot thanks.
I searched the views in tmpl ... quiesiera find the div and you can modify as html.

http://balanar.netii.net/
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on March 09, 2013, 04:36:20 AM
Quote from: yagami on March 08, 2013, 23:54:02 PM
hi
I want to move the product name above the image, I also want to move the description, selling price, cost and details below the image.
would help me a lot thanks.
I searched the views in tmpl ... quiesiera find the div and you can modify as html.

http://balanar.netii.net/

http://forum.virtuemart.net/index.php?topic=97744.0

http://forum.virtuemart.net/index.php?topic=92756.0
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: jey09 on March 28, 2013, 10:41:04 AM
Hi people,

I want to put the name of the product and the manufacturer of the list view of the products when you click a category , but I don't know where in the view folder is this, in order to change it.

i'm trying to change the php file in \templates\ot_bicyclegreen\html\mod_virtuemart_product\default.php too, but when I tried to put the complete short description, or the name  but I cant, I put:

Short Description

<?php echo $product->product_s_desc ?>

where before was
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>

but it still having the description with final "..." and stripping the text.

I also edit the default php from C:\Users\mt-2010-3\Desktop\Web\Mowes\www\Pruebas\components\com_virtuemart\views\category\tmpl ,  but nothing happen

I use virtuemart 2.0.20b and joomla 2.5,

what more can I do to see all the short description and manufacturer and product name in product list?

Help please!
thanks!
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: PRO on March 28, 2013, 16:02:15 PM
Quote from: jey09 on March 28, 2013, 10:41:04 AM
Hi people,

I want to put the name of the product and the manufacturer of the list view of the products when you click a category , but I don't know where in the view folder is this, in order to change it.

i'm trying to change the php file in \templates\ot_bicyclegreen\html\mod_virtuemart_product\default.php too, but when I tried to put the complete short description, or the name  but I cant, I put:

Short Description

<?php echo $product->product_s_desc ?>

where before was
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>

but it still having the description with final "..." and stripping the text.

I also edit the default php from C:\Users\mt-2010-3\Desktop\Web\Mowes\www\Pruebas\components\com_virtuemart\views\category\tmpl ,  but nothing happen

I use virtuemart 2.0.20b and joomla 2.5,

what more can I do to see all the short description and manufacturer and product name in product list?

Help please!
thanks!


you are editing the product MODULE

please look at this picture

(http://forum.virtuemart.net/index.php?action=dlattach;topic=90935.0;attach=47483;image)
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: romeo2die on August 07, 2013, 10:07:20 AM
Where to put the vmsite-ltr.css? inside

templates/MYTEMPLATES/css?

Can anyone confirm this for me?
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: AH on August 07, 2013, 13:10:29 PM
I prefer to use a separate CSS file, calling it something like vm-mods.css and only put in this the elements I am overriding, plus any new elements I make (and there are a few of those, lol!)

That way I know what I have "adjusted" and do not load the total css elements twice for VM.

This should go in the:-
root/yourtemplate/wherever your template gets its css files from

You need to load it in the default template, otherwise it will just be ignored!
e.g. for beez5
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template?>/css/vm-mods.css" type="text/css" />

Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: servlet on November 09, 2013, 21:29:06 PM
How to override com_virtuemart/views/askquestion/view.html.php
it is not in tmpl folder?
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: Maxim Pishnyak on November 22, 2013, 20:13:20 PM
With the help of own plugin.
Title: Re: NO MORE THEME. 2.0 uses VIEWS
Post by: kelecz on June 13, 2014, 14:14:58 PM
Quote from: PRO on September 20, 2011, 20:06:16 PM
Link the picture to the flypage from the category Page

Hello, thx for Ship plugin, works in a minute. I need it for different weight prices in same country.

I am pretty new and do not know any php coding, little css. I want to put in same line Ask about question (Povprašajte o izdelku) and Social b. module. In this situation they are both in position 2 on my template but module is going cross over product description text or it is ok when there is no description.

Virtue 266
Joomla 2522
localhost

(//)


[attachment cleanup by admin]
Title: Re: NO MORE THEME. 2.0 uses VIEWS (Layout Override)
Post by: GJC Web Design on June 13, 2014, 14:59:42 PM
1.  Please don't post on the end of a 7 page general discussion on VM templating - make your own topic labeled with your question

2. http://forum.virtuemart.net/index.php?topic=104795.0

3. this is a standard html/css question which you should easily be able to fix with this post:  http://forum.virtuemart.net/index.php?topic=102850.msg341610#msg341610

hint: all it needs is some css clearing - but as no live site etc can't help more