No price overwriting in the new Virtuemart 4 template.
Generally, it is displayed in the old template, but not in the new one.
sorry, I can't see, because I have PHP8.1 and on this I see error by edit product:
administrator/index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=156
ValueError
Missing format specifier at end of string
administrator/components/com_virtuemart/helpers/vmtext.php:154
return call_user_func_array('sprintf', $args);
The price override function has been removed from VM, it was introduced years ago to solve a temporary problem following version upgrades, but now it is not required as it causes a lot of confusion. eg http://forum.virtuemart.net/index.php?topic=148293.msg528931#msg528931
And how will the normal display on the e-shop be handled now please?:
- original price before discount - crossed out
- discounted sale price
- buy this product because you save 15%
P.S.
Maybe now it is time for new plugin into administration - override price :)
That is a simple price display override for items with discounts
It seems that the options are still there when you switch the template to the old template. In the new/beta template the options are gone. However, when you do the following:
- revert to the old template
- choose one of the overwrite options for a certain product
- switch back to the new template
It will still show the options for that product. So It just seems to be a templating issue.
If you rename product_edit_price.php in administrator/templates/vmadmin/html/com_virtuemart/product, it will "fix" the issue for now. I for one definitely cannot do without this functionality and it would seem silly to me to remove it.
A similar issue is that you cannot select the option "No override" in the dropdown for the layout. The corresponding file is product_edit_information.php in administrator/templates/vmadmin/html/com_virtuemart/product on line 83.
to Roderic
Thanks :)
I check template and prepare override for customer - we need this function too, sorry DEV :)
My sincere apologies to DEV VM, you did great :)
and also info for Roderic, who preferred to use workaround and maybe for AH, who didn't mention this option in his reply, and I'm sure for others:
Override price is not going anywhere!!!
If you want this feature back, you need to already go into the configuration and enable Expert mode for pricing.
Then everything will be as before.
Pinochio
I don't use the new backend template
However my option does not require the use of price override to achieve the result you outlined. It can be achieved using a simple VM Tax and calculation rule for a discount and a productprices layout override.
- original price before discount - crossed out
- discounted sale price
- buy this product because you save 15%
Example of this in my screen grab below - This uses simple VM discount method.
Of course - If you have to use price overrides then that is up to you and the template needs modifying - However, I was trying to educate anyone reading this post, so that they can see there may be no need to use price overrides.
yes, I don't use new admin too.
But for this answer, I installed VM4 on our new DEV server and try find solutions for this problem.
Quote from: pinochico on May 18, 2022, 00:17:59 AM
My sincere apologies to DEV VM, you did great :)
and also info for Roderic, who preferred to use workaround and maybe for AH, who didn't mention this option in his reply, and I'm sure for others:
Override price is not going anywhere!!!
If you want this feature back, you need to already go into the configuration and enable Expert mode for pricing.
Then everything will be as before.
Great find, that indeed solves this issue. You don't tend to look there when you've seen that page many times before. There is also nothing in the changelog as far as I know.
It shows set prices, even if disabled. And you can enable it.