News:

Support the VirtueMart project and become a member

Main Menu

Recent posts

#1
I've migrated a Joomla 3 site which was running VM 3.8.8 up to Joomla 4 running VM 4.4.10 - I've done this on a backup installed on a subdomain. When I updated to VM 4.4.10, I installed the latest version as opposed to using the Joomla extension updater. There is a membership associated with the subdomain where I'm developing the site, and the VM version installed came from the my downloads section. Other info: I'm using the SMART VirtuePlanet template and the VP One Page checkout extension - both are up to date. After migrating, I moved the subdomain up to PHP 8.2.

On the front-end, the migration appears to have gone well. However when I tested placing an order, I noticed the invoice that was emailed was missing the rows that include the details of the products ordered (SKU, Product Description etc).

In the back-end, when you open the Order, the products ordered are also missing in the 'Ordered Products' section. I've attached a screenshot that shows what details are/are not included. 

The orders that were placed before I updated to Joomla 4 and VM 4.4.10 all include the Ordered Products info. So it appears that since the update, the details of the products ordered is not ending up where it should be.

I did try assigning the Cassiopeia template and then placed an order but got the same result. So it's not the template.

One more thing to mention, after I click the 'check out' button, the order processed but a warning 'vmTable store insertObject'appeared. Not sure if that's related to the problem I'm experiencing.



#2
Installation, Migration & Upgrade / Re: After update old module up...
Last post by p.barg - June 02, 2025, 10:49:28 AM
Ah thanks, indeed the rebuild option fixes the issue :)
#3
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.
#4
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)
#5
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.)

#6
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.
#7
Solved
See my latest reply in my thread

https://forum.virtuemart.net/index.php?topic=152354.0
#8
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


#9
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
#10
Hello.

I use the shopping option without being a member on my site.

Including Virtuemart 4.4.4 version, when you add the product to the cart;
Step 1: /cart (fill in the information)
Step 2: /cart (confirm)
Step 3: make the payment

steps were made.

However: Including Virtuemart 4.4.6 version, in later versions, when you add the product to the cart;
Step 1: /cart (fill in the information)
Step 2: /user/editaddresscartBT (fills in the same information again, does not bring the information in step 1 itself)
Step 3: /cart (confirm)
Step 4: make the payment

in the latest versions, How can I remove (skip) this step 2  (Step 2: /user/editaddresscartBT)

I wish you a good day.