News:

Looking for documentation? Take a look on our wiki

Main Menu

No price override in the new template in VM4

Started by hazael, May 17, 2022, 10:03:25 AM

Previous topic - Next topic

hazael

No price overwriting in the new Virtuemart 4 template.
Generally, it is displayed in the old template, but not in the new one.

pinochico

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);
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

jenkinhill

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
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

pinochico

#3
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 :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

AH

That is a simple price display override for items with discounts
Regards
A

Joomla 3.10.11
php 8.0

Roderic

#5
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.



pinochico

to Roderic

Thanks :)
I check template and prepare override for customer - we need this function too, sorry DEV :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

pinochico

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.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

AH

#8
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.
Regards
A

Joomla 3.10.11
php 8.0

pinochico

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.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Roderic

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.

Milbo

It shows set prices, even if disabled. And you can enable it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/