News:

Looking for documentation? Take a look on our wiki

Main Menu

NO MORE THEME. 2+ uses VIEWS (Layout Override)

Started by PRO, September 14, 2011, 21:28:43 PM

Previous topic - Next topic

PRO

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

PRO

You could do your own like this though


<?php if ($this->product->product_in_stock <= 100) { ?>
                  <div>HTML CSS HERE</div>
               <?php    }?>

flaterik

Oh thank you for the ideas!

If work well, i put the code here if is usefull!

flaterik

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

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

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


one

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.

infinart

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

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

one

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

look at the picture below.

My template name is "home"



[attachment cleanup by admin]

one

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

one, NO

correct
YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php
YOUR_TEMPLATE/html/com_virtuemart/category/default.php

one

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