News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

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

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]

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ruigato

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

PRO

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>

PRO

#4
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)); ?>

Ellalex

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?
   

Ellalex

#6
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 ?>

PeterMK85

For me one thing is missing:

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

Anybody knows that?

PRO

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

flaterik

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>

infinart

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?

Rock on!

PRO

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?



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

No other way around it

flaterik

#12
[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.

PRO

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



flaterik

There i can't find Product Stock Level Picture!