News:

Looking for documentation? Take a look on our wiki

Main Menu

Recent posts

#11
General Questions / Re: Virtuemart 4 Cart prices (...
Last post by fdfctoik441 - October 10, 2025, 07:09:33 AM
Surely, I would take a look on your price configuration in the vm config.
#12
General Questions / Re: Captcha ideas
Last post by fdfctoik441 - October 10, 2025, 07:08:46 AM
Yes, to accomplish this, you must create a custom user field plugin.
#13
Virtuemart Development and bug reports / Re: Ordering custom fields is ...
Last post by Milbo - October 07, 2025, 17:31:35 PM
This whole post is a perfect example, why none of the veterans reacted. The ordering was tested by the team, just before. But we did the test error to test it on already existing products and that worked, because the ordering was not 0. The ordering was assumingly working until the release after the committ 11100. The solution above fixes the problem, if done for the second, now commmented if, not for the first.
if(empty($customfield->ordering)){
$customfield->ordering = 0;
}

//if(!empty($customfield->ordering)){
$html .= '<input class="ordering" type="hidden" value="'.$customfield->ordering.'" name="field[' . $i . '][ordering]" />';
//}

The hidden input was not set if the ordering was 0. And the whole thing is line 1783, so the fix was too short. So I or some other mod sees this post and thinks either "cant be true, I just tested it" or test it and it works again, because the error does not appear products stored before. The real fix is just to remove the added if completly.
#14
General Questions / Re: Captcha ideas
Last post by Emma Iana - October 07, 2025, 15:43:54 PM
hCaptcha - https://extensions.joomla.org/extension/hcaptcha/ do not work in VM 4. :(
#15
Just checking back in...
Surprised that nobody has solutions for USPS shipping!
#16
Hi,

I have found a bug in the way VirtueMart generates canonical URLs in the category view:
components/com_virtuemart/views/category/view.html.php.

Currently, the function setCanonicalLink() builds a canonical link without taking into account the active Itemid, orderby parameter, or sometimes even the manufacturer ID. This causes several SEO problems:

Canonical mismatch - Example:
QuotePage: /shop/bracelets/india?orderby=created_on
Canonical: /shop/india

Google reports a conflict between canonical and hreflang.

Current defective function
    public function setCanonicalLink($tpl,$document,$categoryId,$manId){
        // Set Canonic link
        if (!empty($tpl)) {
            $format = $tpl;
        } else {
            $format = vRequest::getCmd('format', 'html');
        }
        if ($format == 'html') {

            // remove joomla canonical before adding it
            foreach ( $document->_links as $k => $array ) {
                if ( $array['relation'] == 'canonical' ) {
                    unset($document->_links[$k]);
                    break;
                }
            }

            $link = 'index.php?option=com_virtuemart&view=category';
            if($categoryId!==-1){
                $link .= '&virtuemart_category_id='.$categoryId;
            }
            if($manId!==-1 and !empty($manId)){
                $link .= '&virtuemart_manufacturer_id='.$manId;
            }
            //vmdebug('caetgory view setCanonicalLink',$link);
            $document->addHeadLink( JUri::getInstance()->toString(array('scheme', 'host', 'port')).JRoute::_($link, FALSE) , 'canonical', 'rel', '' );

        }
    }

VirtuemartViewCategory::setCanonicalLink() the canonical URL should be generated using the active Itemid and all relevant parameters (category_id, manufacturer_id, orderby). This Patch prevents Google Search Console errors (duplicate or conflicting canonical/hreflang).Ensures consistent canonical across filters, sorting, and multi-language pages.

Replace the above function with a new one that is fully SEO-compliant:
public function setCanonicalLink($tpl, $document, $categoryId, $manId) {
    if (!empty($tpl)) {
        $format = $tpl;
    } else {
        $format = vRequest::getCmd('format', 'html');
    }

    if ($format == 'html') {

        // remove old canonical
        foreach ($document->_links as $k => $array) {
            if ($array['relation'] == 'canonical') {
                unset($document->_links[$k]);
                break;
            }
        }

        // build a base link
        $link = 'index.php?option=com_virtuemart&view=category&Itemid=' . $this->Itemid;

        if ($categoryId !== -1) {
            $link .= '&virtuemart_category_id=' . $categoryId;
        }

        if ($manId !== -1 && !empty($manId)) {
            $link .= '&virtuemart_manufacturer_id=' . $manId;
        }

        // ADD active sorting parameters (so that canonical is consistent with hreflang)
        $orderby = vRequest::getCmd('orderby', '');
        $dir     = vRequest::getCmd('dir', '');
        $limit   = vRequest::getInt('limit', 0);
        $start   = vRequest::getInt('limitstart', 0);

        if ($orderby !== '') $link .= '&orderby=' . urlencode($orderby);
        if ($dir !== '')     $link .= '&dir=' . urlencode($dir);
        if ($limit > 0)      $link .= '&limit=' . $limit;
        if ($start > 0)      $link .= '&limitstart=' . $start;

        // full link
$canonicalUrl = JRoute::_($link, true, -1);
$uri = JUri::getInstance($canonicalUrl);
$uri->setScheme('https');
$canonicalUrl = $uri->toString(['scheme','host','port','path','query']);
$document->addHeadLink($canonicalUrl, 'canonical', 'rel');
    }
}
#17
3rd party extension / Re: Simple VM4 Product Cart Va...
Last post by AH - October 03, 2025, 12:01:31 PM
Many thanks for posting this - I shall update the download options with your suggestions
#18
Your Live Sites / Re: christinas-sales.gr - kids...
Last post by Matyjasik - October 03, 2025, 08:32:51 AM
Look on envato elements, there many virtuemart templates.
#19
Hello All,

Has anyone confirmed the new USPS APIs have been updated within any of the VM modules...?
More importantly, is any vendor developing a solution to be compatible with the new APIs...?
We've been utilizing Alatak's plugin/module with some success; however, it's no longer supported and we'll need to locate an alternate solution prior to the expiring USPS Web Tools on Jan. 25, 2025.

Any direction is greatly appreciated!
Jim
#20
Virtuemart Development and bug reports / Re: Still Thumbnails problems ...
Last post by Renata - September 30, 2025, 22:06:48 PM
Thank you!

Sorry for my late reply. I didn't receive a reminder of your post.

Regards
Renata