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

Recent posts

#81
Hi,

I am building a product listing for each specific language I have on my site using combination of JRoute:
$uri = $live_site.'uk/'.JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product_id.'&virtuemart_category_id='.$product_cat_id));

But every time I get the SEF urls for deafault language.
I tried to add &lang=uk to the Jroute but it is being skipped by router.
How can I set the router for using specific language?

Whole code looks as follows:
efine('_JEXEC', 1);

define('JPATH_BASE', dirname(__DIR__, 4));
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
require_once JPATH_BASE . '/plugins/behaviour/compat/src/classmap/classmap.php';

$container = \Joomla\CMS\Factory::getContainer();

$container->alias('session.web', 'session.web.site')
    ->alias('session', 'session.web.site')
    ->alias('JSession', 'session.web.site')
    ->alias(\Joomla\CMS\Session\Session::class, 'session.web.site')
    ->alias(\Joomla\Session\Session::class, 'session.web.site')
    ->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');

$app = $container->get(\Joomla\CMS\Application\SiteApplication::class);
\Joomla\CMS\Factory::$application = $app;
$app->createExtensionNamespaceMap();

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Language;

require(JPATH_ADMINISTRATOR.'/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();

VmConfig::set('vmlang', 'uk_ua');//without this I get always default site language
$db = Factory::getContainer()->get('DatabaseDriver');
$vmlang = VmConfig::get('vmlang', 'uk_ua');

$uri = $live_site.'uk/'.JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product_id.'&virtuemart_category_id='.$product_cat_id));

//sef is from default site language
#82
Frontend Modules / Re: My membership product prob...
Last post by dmaniacala - April 04, 2024, 05:53:59 AM
Try sending another email or calling support directly. I find VM's customer service to be quite enthusiastic.
#83
General Questions / Re: vm css loaded on com conte...
Last post by Jumbo! - April 03, 2024, 17:07:53 PM
Which extension/plugin are you using to load the VirtueMart contents in Joomla articles?
#84
General Questions / vm css loaded on com content p...
Last post by serge-web54 - April 03, 2024, 16:37:52 PM
hello,
my contents (com content) are not displaid as they should because vm-ltr-common.css is loaded on that item page.
It should not be.
I tried with cassiopeia and it is the same
a component css should not be loaded if the component is not called.
( edit : that is the cart module that do that)
#85
Frontend Modules / Re: Search Module - Category f...
Last post by skysailbitts - April 03, 2024, 09:58:30 AM
Quote from: cristina on June 08, 2023, 14:59:43 PMHi,
I updated a site to VM 4.0.22 10864 but the category filter continues to ingnore any selection.
Did someone have the same problem?
Any suggestion?
Thank you for your help
I had the same problem and i still can't fix it. Did you fix this problem yet?
#86
Frontend Modules / Re: My membership product prob...
Last post by pitcherposse - April 03, 2024, 09:54:48 AM
Did you update to the latest version?
#87
Frontend Modules / Re: Cart module is hidden till...
Last post by termsvariety - April 03, 2024, 09:47:21 AM
Quote from: Roderic on April 28, 2023, 18:58:23 PM
Quote from: GJC Web Design on April 28, 2023, 16:06:50 PMI had the same problem but it is gone now I think after updating to VirtueMart 4.0.18 which should be released soon
I am also facing same issue. pls
#88
Shipping Modules / Re: Canada Post Shipping Modul...
Last post by Pop Alexandra - April 03, 2024, 08:36:29 AM
Thanks for the tips!
Your solution worked like a charm. :)
_____________________________
Alexandra from Parcel service
#89
Templating & Layouts / Re: Category Title not showing...
Last post by modernmagic - April 02, 2024, 20:45:19 PM
Thank you I found the code:

<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php ?>
#90
OK, finally. I solved it myself by adding reference to plugins/behaviour/compat/src/classmap/classmap.php