Author Topic: Replace reviews column with product's final price in product list backend  (Read 953 times)

afentiko2000

  • Beginner
  • *
  • Posts: 9
  • A beginner
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

  • Beginner
  • *
  • Posts: 9
  • A beginner
I forgott ro mention virtuemart 3.0.14  joomla 3.6.4....

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26975
  • Always on vacation
    • Jenkin Hill Internet
Both versions are very old and insecure. Maybe update before making your changes?  http://forum.virtuemart.net/index.php?topic=118683.0
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM..3.4.0.9935 on Joomla 3.8.12 PHP 7.0.31

afentiko2000

  • Beginner
  • *
  • Posts: 9
  • A beginner
Thanks. I'll do it right now...

afentiko2000

  • Beginner
  • *
  • Posts: 9
  • A beginner
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3338
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26975
  • Always on vacation
    • Jenkin Hill Internet
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM..3.4.0.9935 on Joomla 3.8.12 PHP 7.0.31

afentiko2000

  • Beginner
  • *
  • Posts: 9
  • A beginner
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3338
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
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

  • Beginner
  • *
  • Posts: 9
  • A beginner
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26975
  • Always on vacation
    • Jenkin Hill Internet
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM..3.4.0.9935 on Joomla 3.8.12 PHP 7.0.31

afentiko2000

  • Beginner
  • *
  • Posts: 9
  • A beginner
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3338
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
jenkinhill, what is this view he mean?
Or afentiko2000 give the URL to this view (remove the website)

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26975
  • Always on vacation
    • Jenkin Hill Internet
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM..3.4.0.9935 on Joomla 3.8.12 PHP 7.0.31

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3338
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
The basic code is
Code: [Select]
<?php $price $product->allPrices[$product->selectedPrice];
echo 
$price['product_override_price'];  ?>
To check if the override is active use
Code: [Select]
if(!empty($price['override'])) {
// your code here
}