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

Replace reviews column with product's final price in product list backend

Started by afentiko2000, March 01, 2018, 23:22:14 PM

Previous topic - Next topic

afentiko2000

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

afentiko2000


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum


afentiko2000

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.

Studio 42

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" ?

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

afentiko2000

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.

Studio 42

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.

afentiko2000

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.

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

afentiko2000

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.

Studio 42

jenkinhill, what is this view he mean?
Or afentiko2000 give the URL to this view (remove the website)

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Studio 42

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
}