Author Topic: NO MORE THEME. 2.0 uses VIEWS (Layout Override)  (Read 148697 times)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #15 on: January 04, 2012, 15:37:17 pm »
There i can't find Product Stock Level Picture!

sorry, I cannot figure it out. I do not use stock
I do NOT do development work for hire.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #16 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    }?>
I do NOT do development work for hire.

flaterik

  • Jr. Member
  • **
  • Posts: 100
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #17 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!

flaterik

  • Jr. Member
  • **
  • Posts: 100
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #18 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>

one

  • Beginner
  • *
  • Posts: 14
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #19 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 ?

one

  • Beginner
  • *
  • Posts: 14
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #20 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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #21 on: January 07, 2012, 15:20:58 pm »
you do not do the /view/ folder
I do NOT do development work for hire.

one

  • Beginner
  • *
  • Posts: 14
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #22 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:

Quote
vmError: 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.

infinart

  • Beginner
  • *
  • Posts: 40
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #23 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
Rock on!

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #24 on: January 08, 2012, 18:54:43 pm »
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:

Quote
vmError: 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
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
I do NOT do development work for hire.

one

  • Beginner
  • *
  • Posts: 14
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #25 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.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #26 on: January 09, 2012, 14:35:55 pm »
look at the picture below.

My template name is "home"



[attachment cleanup by admin]
I do NOT do development work for hire.

one

  • Beginner
  • *
  • Posts: 14
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #27 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!

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #28 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
I do NOT do development work for hire.

one

  • Beginner
  • *
  • Posts: 14
Re: NO MORE THEME. 2.0 uses VIEWS
« Reply #29 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