News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

router bug appearing with virtueplanet conversion tracking plugin

Started by mavalentin, May 21, 2020, 12:07:00 PM

Previous topic - Next topic

mavalentin

Hi, I have installed the third-party plugin Virtueplanet Conversion tracking, which was causing me errors on some Virtuemart pages like the cart and the user. I am using Joomla 3.9.18 and VM 3.8.2.
The third party assistance told me that the error "Call to undefined function vmdebug()" (which changed to "class vmText not found" after the update to VM 3.8 ) is caused by a bug in the virtuemart router, and I was advised to insert the two following lines in components/com_virtuemart/router.php after "defined('DS') or define('DS', DIRECTORY_SEPARATOR);"


JLoader::register('VmConfig', JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();


This solved the error issue appearing when the VP Conversion Tracking plugin was enabled, but I noticed that with this modification of the router, the languages don't work anymore, in the sense that if I switch the language between italian and english in the cart page or the user profile page, the language doesn't change anymore.

Are you able to tell me if this is a virtuemart bug as I was told, or if I need to further sort this out with Virtueplanet assistance?

The url of the shop is https://sviluppo.viruspower.it/it/negozio-online/profilo , the Conversion tracking plugin is active and I've changed the router.php file as described above, and if you try changing language in the cart or user login page, it will not work.

Thank you

pinochico

I think,

tracking plugin must be refactoring, not router virtuemart :D
That the developers caught up with you so that they don't have to fix it their plugin :)

but we'll wait for someone from the VM DEV team
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Milbo

This way is not correct. It works as long you use always the same language. The problem, the router is the first who can know the language by url. Ah I just see you say the language switcher does not work anylonger.

When they use the vmdebug or vmText within their component, then they must include the vmdefines themself. As we do in our systemplugin.


if(!class_exists('VmConfig')) require(VMPATH_ROOT .'/administrator/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig(false, false, false, false);
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mavalentin

Thank you, at the end I was advised by the plugin developer to keep the change in the router.php file of Virtuemart, and adding the (false, false, false, false) parameters to the function call as you said, which solves the issue in switching languages. I am though aware that I will have to re-do this change after Virtuemart updates.