Base price with tax instead of base price in category view

souacz
59 Posts
souacz posted this 06 November 2015

I would like to display "base price with tax" instead of "base price" in category view.
I have following configuration of prices in VM:

enter image description here

Now, the base is not displayed because I turned it off in configuration, but "base price with tax" is turned on, so I would like it to be displayed.

enter image description here

I have found a file called "default_products.php" in templates/mytemplate/html/com_virtuemart/virtuemart but do not know what to change it to be displayed as I want. Tried to change 'basePrice' with 'basePriceWithTax' but it did not help, the price was not displayed.

enter image description here

Could you help me, please?

I would like to display "base price with tax" instead of "base price" in category view. I have following configuration of prices in VM: ![enter image description here][1] Now, the base is not displayed because I turned it off in configuration, but "base price with tax" is turned on, so I would like it to be displayed. ![enter image description here][2] I have found a file called "default_products.php" in templates/mytemplate/html/com_virtuemart/virtuemart but do not know what to change it to be displayed as I want. Tried to change 'basePrice' with 'basePriceWithTax' but it did not help, the price was not displayed. ![enter image description here][3] Could you help me, please? [1]: http://gd.wirt08.biznes-host.pl/pliki/2015-11-06_16-13-27.png [2]: http://gd.wirt08.biznes-host.pl/pliki/2015-11-06_16-14-33.png [3]: http://gd.wirt08.biznes-host.pl/pliki/2015-11-06_16-14-04.png
Vote to pay developers attention to this features or issue.
8 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 09 November 2015

Hello,
I'll contact developers how it could be done and will let you know.

Regards,
Aileen

Hello, I'll contact developers how it could be done and will let you know. Regards, Aileen
souacz
59 Posts
souacz posted this 09 November 2015

OK, thank you. I would like to know how to change it also in products slider module.

OK, thank you. I would like to know how to change it also in products slider module.

Last edited 09 November 2015 by souacz

Support Team
Support Team posted this 11 November 2015

Hello,
in fact your solution is correct. The code was changed properly.
But in addition to it please change the code in following files

templates/mytemplate/html/com_virtuemart/category/default_template.php
templates/mytemplate/html/com_virtuemart/productdetails/default_relatedproducts.php
templates/mytemplate/html/com_virtuemart/productdetails/default_template.php
templates/mytemplate/html/mod_virtuemart_product/default.php

Please remember that if you open and save this theme in Themler custom changes in files are overwritten.
However the next Themler update will include appropriate changes and there will be no need in custom coding.

regards,
Aileen

Hello, in fact your solution is correct. The code was changed properly. But in addition to it please change the code in following files templates/mytemplate/html/com_virtuemart/category/default_template.php templates/mytemplate/html/com_virtuemart/productdetails/default_relatedproducts.php templates/mytemplate/html/com_virtuemart/productdetails/default_template.php templates/mytemplate/html/mod_virtuemart_product/default.php Please remember that if you open and save this theme in Themler custom changes in files are overwritten. However the next Themler update will include appropriate changes and there will be no need in custom coding. regards, Aileen
souacz
59 Posts
souacz posted this 11 November 2015

Thank you, unfortunatelly it doesn't solve my problem. I changed string "basePrice" for "basePriceWithTax" in templates/mytemplate/html/com_virtuemart/category/default_template.php and now I can see old prices. But something went wrong, now I always can see the old price, even if new price is not definied for product. I noticed, I do not need to change any more file to see old prices in category view.

enter image description here

You can see it on: http://gd.wirt08.biznes-host.pl/thekids/index.php/chlopcy-0-8-lat - there's the same price twice. I have also category called "outlet" and there is ok but only for products in this category the prices are overwritten. I do not use themler template for product details and there you can see my prices configuration in VM is ok, for instance on http://gd.wirt08.biznes-host.pl/thekids/index.php/chlopcy-0-8-lat/t-shirt-d%C5%82ugi-r%C4%99kaw-minionki-niebieski-detail we can see only sales price and on http://gd.wirt08.biznes-host.pl/thekids/index.php/outlet/t-shirt-angry-birds-czarny-detail we can see old price (base price with tax) and sales price.

So, please let me know how to edit the files of my template for the following config: when the price is overwritten - we can see both prices in category view (old and sales price) and when the price is not overwritten we can see only sales price.

Thank you, unfortunatelly it doesn't solve my problem. I changed string "basePrice" for "basePriceWithTax" in templates/mytemplate/html/com_virtuemart/category/default_template.php and now I can see old prices. But something went wrong, now I always can see the old price, even if new price is not definied for product. I noticed, I do not need to change any more file to see old prices in category view. ![enter image description here][1] You can see it on: http://gd.wirt08.biznes-host.pl/thekids/index.php/chlopcy-0-8-lat - there's the same price twice. I have also category called "outlet" and there is ok but only for products in this category the prices are overwritten. I do not use themler template for product details and there you can see my prices configuration in VM is ok, for instance on http://gd.wirt08.biznes-host.pl/thekids/index.php/chlopcy-0-8-lat/t-shirt-d%C5%82ugi-r%C4%99kaw-minionki-niebieski-detail we can see only sales price and on http://gd.wirt08.biznes-host.pl/thekids/index.php/outlet/t-shirt-angry-birds-czarny-detail we can see old price (base price with tax) and sales price. So, please let me know how to edit the files of my template for the following config: when the price is overwritten - we can see both prices in category view (old and sales price) and when the price is not overwritten we can see only sales price. [1]: http://gd.wirt08.biznes-host.pl/pliki/2015-11-11_17-56-49.png
souacz
59 Posts
souacz posted this 11 November 2015

P.S. When I turn-off themler template for category view that's all right: the old price is displayed only if the price is overwritten in product prices configuration, so it works for default VM template but doesn't work for Themler :(

P.S. When I turn-off themler template for category view that's all right: the old price is displayed only if the price is overwritten in product prices configuration, so it works for default VM template but doesn't work for Themler :(
Support Team
Support Team posted this 12 November 2015

Hello,
we'll re-check this issue and will contact you then.

Regards,
Aileen

Hello, we'll re-check this issue and will contact you then. Regards, Aileen
souacz
59 Posts
souacz posted this 12 November 2015

OK, I've already done it. There's no "if" condition in your theme code. I added it for each view and now it works:

enter image description here

OK, I've already done it. There's no "if" condition in your theme code. I added it for each view and now it works: ![enter image description here][1] [1]: http://gd.wirt08.biznes-host.pl/pliki/CUserspawcioDesktopdefault_template.php_-_Not_2015-11-12_21-37-08.png
Support Team
Support Team posted this 13 November 2015

Hi,

I'm glad that you've managed to resolve your issue.

Please let us know if you have any further questions.

Thanks,
Ivan

Hi, I'm glad that you've managed to resolve your issue. Please let us know if you have any further questions. Thanks, Ivan
You must log in or register to leave comments