News:

Looking for documentation? Take a look on our wiki

Main Menu

VirtueMart unexpected discount

Started by nistune, January 08, 2023, 02:44:06 AM

Previous topic - Next topic

nistune

We have migrated our current site (Joomla 3.10 / VM 4.0.8) to another test server and then updated PHP and below components to the latest versions and currently going through testing.

Joomla 4.2.6
PHP 8.1.12
VirtueMart 4.0.12 10777
Stripe Checkout for VirtueMart 3.0 2022-06-01
VP One Page Checkout 7.10.2 2022-08-01
Template is TemplateCreator CK migrated to Joomla 4

This problem is seen at the backend (and also shows on the front end) with an unexpected 10% discount despite Rule(s) affecting bundle: not showing anything

If we change from 'apply generic rules' to 'no rules' then the discount disappears

This is a parent product item, so is displayed by child items. I then upgraded our live site from 4.0.8 to 4.0.12 and still okay on the live site

Problem is after updating from PHP 7.x to PHP8.1 (only option on Godaddy) and then having to upgrade Joomla and all extensions to match

I'm going to try and disable all our discounts and see if that makes any difference, but there is a definite VM bug here

nistune

There was a 10% bundle discount getting used for this one, despite not allocated to any product category. So it applies itself to the products but doesn't display in the product section. So that is the bug

jenkinhill

To quote the docs:
The simplest tax setup does not even need a configuration per product. VirtueMart rule number 1, if nothing is set, it counts for all.

http://docs.virtuemart.net/manual/general-concepts/204-tax-and-calculation-rules-overview.html

So add that rule to a category, even one that contains no products, and see what happens.
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

hazael

#3
Your rule must be assigned to a specific product category. If you don't assign it anywhere, it will be applied to all products.

The only unfixed problem in these rules is an bug related to the selected manufacturer name.
If the rule is assigned to a category and the manufacturer name is selected and if other products are not assigned to the category specified in the rules, but have the same manufacturer name, then the function incorrectly converts the gross price into the net price directly in the products (in the admin panel). I emphasize - the problem is not converting the netto price to the price with tax and discount, but vice versa

For example. I have jewelry from the same manufacturer. The products are in the following categories: rings, earrings, necklaces - other jewelry manufacturers are also included in these categories. I make a rule with a reduced price only for a specific manufacturer and only for the category of rings. Now I am trying to edit a product from the same manufacturer in the earrings category (without rules). I want to change the gross price (enter the gross price and convert it to the net price). At this point there is a bug - wrong conversion

This function is useful when you want to quickly change the price with tax of a selected product. Due to this error in the rules, you can accidentally harm yourself by displaying a much overpriced or underpriced product. It is safer in this case not to use this faulty converter from the gross price to the netto price.
I've reported this bug before - 2 years ago, but the Virtuemart author can't spot it or can't fix it by pretending not to see it. Or maybe everyone is ignorant and no one noticed this error until then? Or maybe no one but me is using this buggy calculator? I don't know ;)

Milbo

"The products are in the following categories: rings, earrings, necklaces - other jewelry manufacturers are also included in these categories. I make a rule with a reduced price only for a specific manufacturer and only for the category of rings."

You will agree, that the price should be always the same. I must not happen, that a product has different price, just watched in different categories. So your product of the manufacturer A and in Category X and Y is always discounted by the "manufacturer A and category X" rule. Even you just check it in category Y.

I just tried again, created a rule using category and manufacturer, created a product for that, I dont see any error. Calculate the Cost price works as expected
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

hazael

#5
Ok Milbo, do otherwise and you will see this bug appear.
All rules work fine from "Cost price" => "Base price" => "Final price"
In some cases, the price is miscalculated when I do it in the opposite direction with using options "Tick ​​to calculate the net price": "Final price" => "Cost price"

Create 2 independent products and add them to the same category [ XYZ ], but only 1 product to a different manufacturer - for example: [ MF1 ]
Now you make 2 rules:

  • RULE 1: Marge +10% for category [ XYZ ]
  • RULE 2: DATax -10% for category [ XYZ ] and manufacturer [ MF1 ]

A product with RULE 2 will work fine. That's why no one found this bug ;)
Now open and edit the product that has RULE 1. You do not need to enter any new price. Just check "Calculate the Cost price" and save the product.  :)

I have this bug on all my pages in every version. I remember this mistake since 2014, when I started selling my products. How many times I reported him, so many times he was ignored  ;D