News:

Looking for documentation? Take a look on our wiki

Main Menu

Final sale price in product list (back-end)

Started by vasia, August 18, 2014, 10:51:05 AM

Previous topic - Next topic

vasia

Hello,

I need to get a solution about final price displaying (in joomla's product list) instead of base price that it displays. I haven 't seen any answer which works to me until now. Is there any possible solution?

Thanks

jenkinhill

In the category list you can show whichever prices you like. eg see http://demo.virtuemart.net/headgear

All prices selected in VM config/pricing can be shown using the default VM category template, so maybe you have a template override that is outdated or incorrectly coded.  Look at the code in the VM template file components/com_virtuemart/views/category/tmpl/default.php The price display code is from around line 300 onwards.
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

vasia

#2
I don t want to change it in front-end, but inside joomla.

e.g domain/administrator/index.php?option=com_virtuemart&view=product

GJC Web Design

Honestly - how is anyone supposed to know what you mean?

QuoteI need to get a solution about final price displaying (in joomla's product list) instead of base price that it displays.
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vasia

To make it more specific, I need to display the final price in the atachment which i send instead of base price.


[attachment cleanup by admin]

GJC Web Design

you need to find that template in the admin - see if the price you want is in the product object
If so display it
If not work backwards to incl. the price you want in the object then display it.
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

vasia

#6
Quote from: GJC Web Design on August 20, 2014, 10:08:47 AM
you need to find that template in the admin - see if the price you want is in the product object
If so display it
If not work backwards to incl. the price you want in the object then display it.


I couldn't understand you. I am not a pro developer or something. Could you explain that to me please?
You ask about product item if it has final price? If so, it has. But in list is displayed only the base price.
And how to display that?

The file is here:

public_html/administrator/components/com_virtuemart/views/product/tmpl/default.php

and this is the code:

<!-- Product price -->
<td align="right" ><?php
if(isset($product->product_price_display)) {
echo $product->product_price_display;
} elseif(!empty($product->prices)) {
echo JText::_('COM_VIRTUEMART_MULTIPLE_PRICES');
} else {
echo JText::_('COM_VIRTUEMART_NO_PRICE_SET');
}
?>
</td>


I did some tries but I didn't know what to change.

e.g I did it like "echo $product->product_price_display*1.23;" which didn't give correct results and it's not very practical if the Tax will be changed (I'll have to change it again manually).

I'm looking for a dynamic value. Can someone help on this?

GJC Web Design

You need to look in the $product object but you can't expect volunteers to recode your site - if you haven't the skills employ someone who has
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation