News:

Looking for documentation? Take a look on our wiki

Main Menu

Recent posts

#1
Templating & Layouts / Errors in Order Edit Layout of...
Last post by WebStuff - November 28, 2025, 18:18:13 PM
VirtueMart 4.6.4
Joomla 5.4.0
Linux OS in case that is relevant.

The comments in the files in ../administrator/templates/vmadmin/html/com_virtuemart/orders/ are causing the layout to shift and --> is appearing in the Order Edit page in the backend.

There are numerous comments and sections beginning <!-- and ending in -->
If these are broken by <?php sections then the problem occurs.
Either removing the comments/commented redundant code sections and or converting them to PHP comments sorts this out and the sections/boxes line-up "properly" on Desktop and Mobile versions.

I'm using Chrome but this seems to affect Firefox as well, I've not tested on any other browsers

Small annoyance but hopefully this will help someone.
#2
I resolved downgrading to older version VM 4.4.10
#3
General Questions / VirtueMart: Mandatory accessor...
Last post by sandomatyas - November 24, 2025, 17:04:02 PM
Hi everyone,

Is the following scenario possible to achieve with VirtueMart?

I have base products — for example, "bicycles".

Then I have accessory products such as lights, mudguards, bells, installation/setup fees, etc. These are regular VirtueMart products, and in some cases they may have a 0-value price (for example "gift products"). All these products can also be purchased separately — for example, a customer can buy only a bicycle light.

What I want to achieve:

On the bicycle product page I want to display the compatible accessories. The linking between the bike and the accessories would be done manually. The customer should be able to choose which accessories they want to add with tha base product.

So far it seems that this can be handled with the "Extra Product" plugin:
https://shop.st42.fr/en/products/extra-product.htm

But here's the catch:

I need to define mandatory accessories.

Example:
The bicycle cannot be purchased without a setup/installation fee, or without a bell (just fictional examples).

For these mandatory accessories:

The checkbox should be pre-checked.

The customer should NOT be able to uncheck it — not on the product page, and not in the cart.

If the main product is removed from the cart, the linked accessories should also be removed.
(As an acceptable fallback: if this can't be done cleanly, I'm fine with completely clearing the cart when the main product is removed — 99.99% of customers buy only one main product anyway.)

Accessory quantities should follow the main product quantity. Customers shouldn't be able to change accessory quantities independently.

Is there any existing solution, plugin for this, or would this require a fully custom development?

Thanks in advance!
#4
Edit the following file: administrator/components/com_virtuemart/helpers/calculationh.php

Step A — REMOVE wrong logic
Find this block (the one adding variant too early):
if (!empty($variant)) {
    $variant = $this->roundInternal($this->_currencyDisplay->convertCurrencyTo((int) $this->productCurrency, doubleval($variant),true));
    $basePriceShopCurrency = $basePriceShopCurrency + $variant;
    $this->productPrices['basePrice'] = $this->productPrices['basePriceVariant'] = $basePriceShopCurrency;
}
Delete it completely.


Step B — ADD the corrected logic
Immediately after this existing block:
if (empty($this->productPrices['basePriceVariant'])) {
    $this->productPrices['basePriceVariant'] = $this->productPrices['basePrice'];
}

Insert the following NEW CODE:

/* ============================================================
   FIX: Correct handling of variant/modifier prices in VirtueMart
   ------------------------------------------------------------
   VM incorrectly adds variant price to the base product price
   BEFORE applying discount rules. This causes the variant to be
   discounted, which is mathematically wrong.

   Here we calculate the variant separately and add it *after*
   discounts and tax calculations – which is the correct logic.
   ============================================================ */

// 1. Convert variant price to shop currency but DO NOT add it to base price
$variantNet = 0.0;

if (!empty($variant)) {
    // Variant net amount converted to shop currency
    $variantNet = $this->roundInternal(
        $this->_currencyDisplay->convertCurrencyTo(
            (int)$this->productCurrency,
            (double)$variant,
            true
        )
    );
}

// 2. After VM finished discount calculations, add the variant
if (!empty($variantNet)) {

    // Calculate VAT on variant separately
    $variantGross = $variantNet;

    // Apply VAT/TAX rules to variant
    if (!empty($this->rules['Tax'])) {
        $variantGross = $this->roundInternal(
            $this->executeCalculation($this->rules['Tax'], $variantGross, true),
            'salesPrice'
        );
    }

    if (!empty($this->rules['VatTax'])) {
        $variantGross = $this->roundInternal(
            $this->executeCalculation($this->rules['VatTax'], $variantGross, true),
            'salesPrice'
        );
    }

    // Update priceWithoutTax (variantNet)
    if (isset($this->productPrices['priceWithoutTax'])) {
        $this->productPrices['priceWithoutTax'] += $variantNet;
    }

    // Update VAT amount (difference between gross and net)
    if (isset($this->productPrices['taxAmount'])) {
        $this->productPrices['taxAmount'] += ($variantGross - $variantNet);
    }

    // Add variant to final salesPrice (correct placement)
    if (isset($this->productPrices['salesPrice'])) {
        $this->productPrices['salesPrice'] += $variantGross;
    }

    // Add variant to unit price if packaging is used
    if (!empty($product->product_packaging) && $product->product_packaging != '0.0000') {
        $this->productPrices['unitPrice'] = $this->productPrices['salesPrice'] / $product->product_packaging;
    }

    // Save modifier for output
    $this->productPrices['variantModification'] = $variantNet;
}
/* ========================= END OF FIX ============================ */
#5
I would like to report a serious pricing issue in VirtueMart 4.x that affects all products using price modifiers (variants, CustomFieldsForAll additional charges, or any customfield with a price). The problem lies in how VM calculates prices inside calculationHelper.

Currently, VirtueMart adds the modifier price directly to the product's base price (the regular, non-discounted price) and only then applies discount rules such as DATax or DBTax. This results in the modifier being discounted, which is mathematically incorrect.

A simple example makes the problem obvious:
Regular price: 1000
Discount: -20% (so discounted price should be 800)
Variant price (modifier): +200

VirtueMart currently calculates:
(1000 + 200) – 20% = 960

Correct calculation should be:
800 + 200 = 1000

In the current VM behavior, the additional charge (+200) is also discounted, even though it represents a fixed extra cost that should never be affected by product-level discounts.

This leads to incorrect totals on the product page, in the cart, and during checkout, and also produces incorrect VAT calculations.

The root cause is in administrator/components/com_virtuemart/helpers/calculationh.php, inside the getProductPrices() method. The variant/modifier value is added to basePrice before discount rules are applied, which causes the modifier to be discounted together with the product.

Correct behavior should be:

Calculate the product's discounted price normally.

Keep the modifier price separate.

Calculate VAT on the modifier independently.

Add the modifier (net + VAT) after discounts have been applied.

Do not apply any discount rules to the modifier.

This ensures correct mathematical behavior:

FinalPrice = DiscountedPrice + Modifier
instead of the current incorrect approach:

FinalPrice = (BasePrice + Modifier) – Discount

This issue affects every VirtueMart shop using price modifiers (not only CF4All users). If needed, I can provide a working patch or minimal diff for getProductPrices() that fully fixes the logic.

#6
Installation, Migration & Upgrade / Translation issues for virtuem...
Last post by Teejay - November 24, 2025, 13:58:43 PM
we recently upgraded to J5.4.0, with VM4.4.10, thing is, all Joomla contents, virtuemart products, are all translated, in assigned languages, however the virtuemart top level categories, is displayed only in the default dutch, for all webpage languages, was advised on Joomla forum, edit all virtuemart products, categories, manufacturer pages, which we did, it helped great deal afterwards, products are translated, however the top level categories, menus url, still in default language, please we need assistance
#7
Hello, I have an error that not permit to work with coupon code in my cart, it's give page redirect too many times error.

please help me.
I have VM 4.6.4
joomla 5.3.3


thanks
#8
General Questions / Re: Reply to customer email in...
Last post by KeithWebb - November 24, 2025, 08:21:56 AM
I think your problem comes from the way VirtueMart handles emails by default, which prioritizes sellers, and is not really optimized for admins who want to reply directly to customers. You found the Reply-To processing code in the right direction, but VM uses the same logic for many types of emails, which means that changes in one place can distort behavior in another.
#9
Installation, Migration & Upgrade / Re: VM 4.6.4 unavailable non m...
Last post by iWim - November 22, 2025, 11:28:54 AM
What is the exact error?
Where/when do you see it?
#10
Product pricing / Different prices in % based on...
Last post by sign-p - November 22, 2025, 08:52:42 AM
Hello at all,

when i install the iStraxx Custom Size Plugin.

Can the prices for the length (for video) for example also be in Percent?

For example the base price for product is, Based on video length 10:
1pcs 200 Euro per peace
5pcs 100 Euro per peace

if i set video length to 9 it should be minus 10% from base price
for 1 pcs is then 180 Euro
for 5 pcs is then 90 Euro per peace

if i set video length to 12 it should be plus 20% from base price
for 1 pcs is then 240 Euro
for 5 pcs is then 120 Euro per peace

Thanks, Thomas


Thanks, Thomas