VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: vasia on August 18, 2014, 10:51:05 AM

Title: Final sale price in product list (back-end)
Post by: vasia on August 18, 2014, 10:51:05 AM
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
Title: Re: Final sale price in product list (back-end)
Post by: jenkinhill on August 19, 2014, 11:11:12 AM
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.
Title: Re: Final sale price in product list (back-end)
Post by: vasia on August 19, 2014, 13:55:55 PM
I don t want to change it in front-end, but inside joomla.

e.g domain/administrator/index.php?option=com_virtuemart&view=product
Title: Re: Final sale price in product list (back-end)
Post by: GJC Web Design on August 19, 2014, 22:28:05 PM
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.
Title: Re: Final sale price in product list (back-end)
Post by: vasia on August 20, 2014, 08:19:28 AM
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]
Title: Re: Final sale price in product list (back-end)
Post by: 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.
Title: Re: Final sale price in product list (back-end)
Post by: vasia on August 20, 2014, 11:56:08 AM
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?
Title: Re: Final sale price in product list (back-end)
Post by: GJC Web Design on August 20, 2014, 13:16:33 PM
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