News:

Looking for documentation? Take a look on our wiki

Main Menu

Recent posts

#41
General Questions / Re: Problem with the "Create a...
Last post by AnSit - June 02, 2025, 00:24:55 AM
Thank you for your participation! You gave me the idea to update again and I tried on a test site versions of Joomla 5.3.1 and VirtueMart 4.2.18 11050 - the option worked!
It remains to understand what exactly the difference is between these versions in order to make this option work on the working site, since it is not yet possible to install updates on it.
#42
Installation, Migration & Upgrade / Re: cannot update to joomla 5....
Last post by iWim - June 01, 2025, 09:05:34 AM
As long as you use the free version of VM you will always see that warning.
At this moment the free version is always a few updates behind the paid version.

Anyway...
VM4.4.4 should work on Joomla 5.3.

You can, and I recomend you to do this, always test it by doing the update locally first.
Then you'll know what to expect and you can safely check if everything works as expected.
If something needs extra work or something goes wrong, your live website is not affected.

Install WAMPServer or MAMP on your computer.
Create a backup of your webshop (Akeeba Backup)
Unpack/install your backup in WAMP/MAMP (Akeeba Kickstart)
#43
General Questions / Re: Problem with the "Create a...
Last post by iWim - May 31, 2025, 18:16:22 PM
PS: It also works in a clean J5.3.1/VM4.4.10...
(I know this does not help you, sorry.)

#44
General Questions / Re: Problem with the "Create a...
Last post by iWim - May 31, 2025, 17:30:13 PM
Okay... Thank you...

It seemed to work for me.*

- In the product list I have 9 additional children (3x3)
- In the parent product, under tab Custom Fields, below the blah blah of the Multi variant field I see a list of 10 products (1 parent + 9 children). Here's where I should set all the different variables.

Now it does say it's beta, so it may be buggy depending on VM version.

* My testVM says it's 4.4.6 eventhough I updated it to 4.4.10. But my testsite has more issues lateiy. I think it's time to do a clean test install and try that one.
#45
Solved
See my latest reply in my thread

https://forum.virtuemart.net/index.php?topic=152354.0
#46
Find the solution

Open Admin ... go to Joomla Update website

Click on Rebuild, or in French RECONSTRUIRE

And that's fine
The problem is here !

Only a rebuild missing about Update Website


#47
In VirtueMart 4.x, child products incorrectly inherit quantity pricing rules from their parent, even when they have their own pricing rule defined with a 0–0  quantity range ( or other). This causes incorrect price calculations, such as a total of 0.00 when the cart exceeds a specific quantity.

I noticed the bug thanks to the salesPriceTt variable, which didn't update correctly in the cart when increasing quantity. It drew my attention to the fact that the wrong price rule was being applied dynamically.

Before this fix, the only workaround was to assign different shopper groups to child products to prevent them from inheriting wrong pricing rules from the parent - which was a messy and unnecessary workaround. Now, everything works as expected, even with a single universal shopper group.

Additionally, saving a product with multiple prices could previously result in random rounding issues, especially when using the gross price input (brutto) checkbox. With this override, prices now remain exactly as entered — no silent recalculations or unexpected changes after saving.

What this fix does
We override the setProduct() method in the calculationHelper class to:
Correctly select the applicable pricing rule based on quantity (start <= quantity <= end),
Respect the child product's own pricing rules, even if defined as 0–0,
Fall back to a 0–0 rule only if no other range matches,
Preserve exact values without rounding errors.

Result
Quantity pricing now works correctly for child products, including:
Proper tiered pricing logic,
Editable and save-safe price rules,
Stable value consistency between frontend and backend.


How to apply:
In /administrator/components/com_virtuemart/helpers/calculationh.php
replace the original setProduct() method (around line 300) with the code below:
public function setProduct($product, $amount = 1.0)
{
    // Note: Only if the sectedprice is not set or its index does not exist
    if (!isset($product->selectedPrice) || !isset($product->allPrices[$product->selectedPrice])) {
        $bestIndex = null;
        $fallbackIndex = null;

        foreach ($product->allPrices as $i => $priceRule) {
            if (
                isset($priceRule['price_quantity_start']) &&
                isset($priceRule['price_quantity_end'])
            ) {
                $start = (int)$priceRule['price_quantity_start'];
                $end = (int)$priceRule['price_quantity_end'];

                // Search for the perfect range
                if ($start <= $amount && ($end == 0 || $amount <= $end)) {
                    $bestIndex = $i;
                    break;
                }

                // Save Fallback to 0–0 if it appears
                if ($start === 0 && $end === 0) {
                    $fallbackIndex = $i;
                }
            }
        }

       // choose the best available index
        if ($bestIndex !== null) {
            $product->selectedPrice = $bestIndex;
        } elseif ($fallbackIndex !== null) {
            $product->selectedPrice = $fallbackIndex;
        } else {
        // do not set anything - it will stay as it is
        }
    }

    // Next original code ...
    if (!empty($product->allPrices[$product->selectedPrice])) {
        $this->productPrices = $product->allPrices[$product->selectedPrice];
        $this->productCurrency = $this->productPrices['product_currency'];
        $product->product_tax_id = $this->product_tax_id = $this->productPrices['product_tax_id'];
        $this->product_discount_id = $this->productPrices['product_discount_id'];
    }

    $productVendorId = !empty($product->virtuemart_vendor_id) ? $product->virtuemart_vendor_id : 1;
    $this->setVendorId($productVendorId);

    $this->_cats = isset($product->categories) ? $product->categories : array();
    $this->_product = $product;
    $this->_product->amount = floatval($amount);
    if (!isset($this->_product->quantity)) $this->_product->quantity = 1;

    $this->_manufacturerId = !empty($product->virtuemart_manufacturer_id) ? $product->virtuemart_manufacturer_id : 0;

    return $this->productPrices;
}

Tada! It works!  8)

ps. It would be nice if Milbo added this amendment, because this problem was never solved even though I reported it many times
#48
General Questions / Deleting in Multivariant
Last post by jflash - May 30, 2025, 08:09:34 AM
Hello!

When I have a product with Multivariant configured, there's also a small red X icon under the settings, which should allow me to delete the respective detail. Unfortunately, it doesn't get deleted, and I have a feeling there's not even a script behind it to handle the action.

VM 4.4.10 11120
J 5.3.1
PHP 8.2

#49
The Virtuemart core modules and plugins are included in the VirtueMart All-in-One (AIO) package. They are updated automatically during installation, eliminating the need for separate update sites for each extension. Moreover, these update sites are not maintained, creating confusion, so it is better to get rid of them.
#50
Quote from: Jumbo! on May 29, 2025, 18:28:56 PMThose are old update sites and no longer valid.

Go to SystemUpdateUpdate Sites. Then find and disable/delete them.

So are these modules not updated as part of the main Component or have they just forgotten to update the XML file version numbers for these modules?

Above solution would mean removing the updates but as they are part of the Main Virtuemart (theoretically) then that would mean deleting the update site for Virtuemart wouldn't it? Therefore you wouldn't get update notifications for the main component or are they different update URLs?