VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: afentiko2000 on March 01, 2018, 23:22:14 PM

Title: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 01, 2018, 23:22:14 PM
Hello there. I would like to change the review's column in product list backend with the after discount product's final price. I found the file in html/administrator/componets/com_virtuemart/views/tmpl/default.php and the code i want to change is <!-- Product price -->
<td align="right" ><?php
if(isset($product->product_price_display)) {
echo $product->product_price_display;
}
?></td>. Any help???
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 02, 2018, 15:31:19 PM
I forgott ro mention virtuemart 3.0.14  joomla 3.6.4....
Title: Re: Replace reviews column with product's final price in product list backend
Post by: jenkinhill on March 02, 2018, 16:12:10 PM
Both versions are very old and insecure. Maybe update before making your changes?  http://forum.virtuemart.net/index.php?topic=118683.0
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 03, 2018, 07:19:29 AM
Thanks. I'll do it right now...
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 05, 2018, 21:50:06 PM
So joomla 3.8.5 virtuemart 3.2.12. How can i change the product list template and replace reviews with product's final price.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: Studio 42 on March 06, 2018, 04:15:09 AM
Quote from: afentiko2000 on March 05, 2018, 21:50:06 PM
So joomla 3.8.5 virtuemart 3.2.12. How can i change the product list template and replace reviews with product's final price.
what you mean with "reviews" ?
Title: Re: Replace reviews column with product's final price in product list backend
Post by: jenkinhill on March 06, 2018, 10:34:45 AM
Let's get this clear. In the product list you want to replace the Shopper reviews column with a new column showing the product calculated final price.  This would mean calculating that price on the fly for every product in the list, as final prices are not saved in the database.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 06, 2018, 11:31:05 AM
Thanks a lot jenkinhill for the reply. I thought it could be a code for showing  after the discount final price because it could be easier for me to see from the list to which products i have made a discount. I've tried to replace product_price with product_override_price but nothing happened.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: Studio 42 on March 06, 2018, 13:17:36 PM
administrator/componets/com_virtuemart/views/tmpl/default.php  is not a valid folder views/MYVIEW/tmpl/default.php, if you want help please simplify the task to forum user.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 06, 2018, 17:38:50 PM
Thanks for the reply studio42. I meant to change the shopper reviews with the discounted final price of my product. So that it could be easier for me to control the product price and final price. But if the final price isn't in the database i suppose that it isn't possible to do that.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: jenkinhill on March 06, 2018, 18:01:01 PM
Would this be to show the override price (if set) - not the calculated sales price where a discount rule has been applied?  The override price is stored in the db.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 07, 2018, 06:29:52 AM
I am sorry for the confusion i am not so good with my english. I have a final price product without a specific discounted rule just an overrided price. This overrided price i want to be shown instead of the shopper reviews.I tried to change to   
echo $product->product_override_price_display;
} but nothing happened. Again sorry for the confusion.
Title: Re: Replace reviews column with product's final price in product list backend
Post by: Studio 42 on March 07, 2018, 18:09:12 PM
jenkinhill, what is this view he mean?
Or afentiko2000 give the URL to this view (remove the website)
Title: Re: Replace reviews column with product's final price in product list backend
Post by: jenkinhill on March 07, 2018, 20:22:50 PM
Patrick it is administrator/index.php?option=com_virtuemart&view=product   - to replace the Shopper Reviews column with one showing product_override_price if set for that product
Title: Re: Replace reviews column with product's final price in product list backend
Post by: Studio 42 on March 07, 2018, 21:02:57 PM
The basic code is
<?php $price $product->allPrices[$product->selectedPrice];
echo 
$price['product_override_price'];  ?>

To check if the override is active use
if(!empty($price['override'])) {
// your code here
}

Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 09, 2018, 15:56:46 PM
I don't know what to say... it works perfectly.thank you very much studio 42...
Title: Re: Replace reviews column with product's final price in product list backend
Post by: afentiko2000 on March 09, 2018, 15:58:51 PM
And you jenkinhill  :) :) :)