VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: tuaneric on October 28, 2022, 16:05:46 PM

Title: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on October 28, 2022, 16:05:46 PM
Hello

I have used Joomla 3.10 and Virtuemart 3.6 for my computer repair and spare parts store for 6 years, I hesitate to choose to update Joomla 4, Virtuemart 4 or reinstall virgin Joomla 4 and Virtuemart 4.

Joomla 4 is stable with Virtuemart 4?

On the site virtuemart.net/download does not yet have the Full Joomla 4 version with Virtuemart 4, I should manually install Joomla 4 and Virtuemart 4 with its components.

Can you advise me please.

Thanks in advance
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: Milbo on October 28, 2022, 17:20:52 PM
Keep with joomla 3 latest. It is never need to uninstall vm and to install it again (reinstall). Just always install it over the old version. The vm updater works usually very stable.

So I would keep with j3 and install vm4.0.7 over it https://dev.virtuemart.net/attachments/1338/com_virtuemart.4.0.7.10730_package_or_extract.zip
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 26, 2022, 17:16:26 PM
Hello Milbo
Happy Christmas, I tried to subscribe again to OVH hosting and activate PHP 7.4 to try to update Virtuemart 3 under Joomla 3.10 to the Virtuemart 4.7 version thanks to your link that it works correctly.

I tried to change the PHP 8.0 version on my OVH hosting, the virtuemart 4.7 no longer works, I can't Add the new product or new categories.

  Virtuemart version 4.7 is compatible with PHP 8 ?

Thank you for your help.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 27, 2022, 10:27:50 AM
there is no VM4.7

the latest is https://dev.virtuemart.net/attachments/download/1359/com_virtuemart.4.0.12.10777_package_or_extract.zip which is php8 compatible
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 27, 2022, 15:09:18 PM
Hello GJC Web Design

I tried to activate PHP 8.0 and install com_virtuemart.4.0.12.10777_package_or_extract.zip but the same problem, when I click on the add Product button there is a problem displaying (see the photo)
The same problem on the Add Category button

I also have the Joomla 3.11 categories problem, I can't access the categories anymore.

It displays error: Attempt to modify property "params" on null

Thank you for your help
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on December 27, 2022, 17:49:10 PM
The error "Attempt to modify property "params" on null" is very often seen with a Joomla template that is not (yet) PHP8 compatible.  It can also occur with other extensions which are not yet PHP8-ready, such as older versions of weblinks or JCE editor.

There is also an issue with CSS not loading.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 27, 2022, 17:52:50 PM
Hello
I enabled debugging, it shows error


Call stack
#   Function   Location
1   ()   JROOT/templates/hera_j3_vm3/html/com_content/category/default_articles.php:15
2   include()   JROOT/libraries/src/MVC/View/HtmlView.php:701
3   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/layouts/joomla/content/category_default.php:79
4   include()   JROOT/libraries/src/Layout/FileLayout.php:125
5   Joomla\CMS\Layout\FileLayout->render()   JROOT/libraries/src/Layout/LayoutHelper.php:73
6   Joomla\CMS\Layout\LayoutHelper::render()   JROOT/templates/hera_j3_vm3/html/com_content/category/default.php:20
7   include()   JROOT/libraries/src/MVC/View/HtmlView.php:701
8   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/libraries/src/MVC/View/HtmlView.php:230
9   Joomla\CMS\MVC\View\HtmlView->display()   JROOT/libraries/src/MVC/View/CategoryView.php:245
10   Joomla\CMS\MVC\View\CategoryView->display()   JROOT/components/com_content/views/category/view.html.php:250
11   ContentViewCategory->display()   JROOT/libraries/src/MVC/Controller/BaseController.php:664
12   Joomla\CMS\MVC\Controller\BaseController->display()   JROOT/components/com_content/controller.php:118
13   ContentController->display()   JROOT/libraries/src/MVC/Controller/BaseController.php:702
14   Joomla\CMS\MVC\Controller\BaseController->execute()   JROOT/components/com_content/content.php:43
15   require_once()   JROOT/libraries/src/Component/ComponentHelper.php:402
16   Joomla\CMS\Component\ComponentHelper::executeCompo nent()   JROOT/libraries/src/Component/ComponentHelper.php:377
17   Joomla\CMS\Component\ComponentHelper::renderCompon ent()   JROOT/libraries/src/Application/SiteApplication.php:194
18   Joomla\CMS\Application\SiteApplication->dispatch()   JROOT/libraries/src/Application/SiteApplication.php:233
19   Joomla\CMS\Application\SiteApplication->doExecute()   JROOT/libraries/src/Application/CMSApplication.php:225
20   Joomla\CMS\Application\CMSApplication->execute()   JROOT/index.php:49



It's the HERA Template problem, when I tried to change the beez3 template. My category page displays.

Do you know a template compatible with PHP 8 of Joomla 3 & 4 with Virtuemart 4?

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on December 27, 2022, 18:17:17 PM
I use Hera on PHP 8.0.26 without issues, combined with the VP One Page Checkout, https://www.virtueplanet.com/extensions/vp-one-page-checkout
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 28, 2022, 15:53:30 PM
hello jenkinhill

Thank you for suggesting VP One Page Checkout, I will order. If I will fix the problem of my site with PHP 8.

Normally Hera template compatible with Joomla 3.11 and Virtuemart 4.0.12. On OVH hosting, if I leave PHP 7.4 it works fine. I only have the problem on PHP 8.

it shows the problem: Unsupported operand types: string * int

It confirms Hera template is not compatible with PHP 8 ?
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 28, 2022, 15:55:16 PM
Hello

1. I enabled the debugging methods in Configuration to see the error message.

In Product Menu, I click on the New button it displays error

Deprecated: Required parameter $name follows optional parameter $type in /home/Mydomain/www/components/com_jce/editor/libraries/classes/manager/base.php on line 82

Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/Mydomain/www/components/com_jce/editor/libraries/classes/browser.php on line 270


In Categories Menu, I click on New button it shows error

Deprecated: Required parameter $name follows optional parameter $type in /home/Mydomain/www/components/com_jce/editor/libraries/classes/manager/base.php on line 82

Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/Mydomain/www/components/com_jce/editor/libraries/classes/browser.php on line 270


2. Currently I use the isis template for Administration, I tried to change the vmadmin template which displays error: The template for this display is not available.

Can we install template vmadmin manually ?

Thank you for your help
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: balai on December 28, 2022, 16:34:57 PM
Your errors seem to come from another 3rd party extension which is the JCE editor (com_jce).
Try to update it to the latest version.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 28, 2022, 16:45:39 PM
Quote from: balai on December 28, 2022, 16:34:57 PM
Your errors seem to come from another 3rd party extension which is the JCE editor (com_jce).
Try to update it to the latest version.

Hi

I tried download JCE 2.9.32 and install.
https://www.joomlacontenteditor.net/downloads/editor/core

It works my virtuemart 4.0.12  :D, thank you !

I still have a Joomla 3.11 problem with my Hera Template, it shows error on my Index.php page

0
Unsupported operand types: string * int

Do you have the solution ?

Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on December 28, 2022, 16:49:13 PM
As I said above, earlier versions of the JCE editor are not PHP8-ready, I currently use JCE Pro 2.9.32 and have no problems. As far as I know, the Hera template checkout is OK in PHP8 so no need to get  VP One Page Checkout - I use that on all my sites as my preferred checkout system.

vmadmin_4.0.12.10777.zip is included in com_virtuemart.4.0.12.10777_package_or_extract.zip  = if you did not install the full package then you can extract the vmadmin zip and install that.  Then select it on Configuration/Shop settings/Advanced Settings

Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 28, 2022, 17:09:41 PM
Quote from: jenkinhill on December 28, 2022, 16:49:13 PM
As I said above, earlier versions of the JCE editor are not PHP8-ready, I currently use JCE Pro 2.9.32 and have no problems. As far as I know, the Hera template checkout is OK in PHP8 so no need to get  VP One Page Checkout - I use that on all my sites as my preferred checkout system.

vmadmin_4.0.12.10777.zip is included in com_virtuemart.4.0.12.10777_package_or_extract.zip  = if you did not install the full package then you can extract the vmadmin zip and install that.  Then select it on Configuration/Shop settings/Advanced Settings



Hi jenkinhill

Which Hera version are you using ?

I used Hera version 3.11.0
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on December 28, 2022, 20:59:03 PM
Yes, I have Hera 3.11.0
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 29, 2022, 11:37:33 AM
Hello
It's the same template version but index.php page it shows error, if I activate PHP 8.  >:(

Call stack
# Function Location
1 () JROOT/templates/hera_j3_vm3/html/com_virtuemart/sublayouts/badges.php:9
2 include() JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:567
3 shopFunctionsF::renderVmSubLayout() JROOT/templates/hera_j3_vm3/html/com_virtuemart/sublayouts/products.php:150
4 include() JROOT/components/com_virtuemart/helpers/vmview.php:129
5 VmView->renderVmSubLayout() JROOT/templates/hera_j3_vm3/html/com_virtuemart/virtuemart/default.php:42
6 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
7 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/components/com_virtuemart/helpers/vmview.php:81
8 VmView->display() JROOT/components/com_virtuemart/views/virtuemart/view.html.php:210
9 VirtueMartViewVirtueMart->display() JROOT/components/com_virtuemart/controllers/virtuemart.php:48
10 VirtueMartControllerVirtuemart->display() JROOT/libraries/src/MVC/Controller/BaseController.php:702
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_virtuemart/virtuemart.php:128
12 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
13 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
15 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
16 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49


I tried to install the Hera version 3.12 which I bought from year 2019 but the same problem on PHP 8.0. If I will enable PHP 7.4 it works fine  ;) ;) ;)

Is it possible to share your template so that I can try on my hosting ?

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 29, 2022, 12:30:50 PM
what is the error?

It clearly states it is on line 9 of /templates/hera_j3_vm3/html/com_virtuemart/sublayouts/badges.php

Just fix that error...
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on December 29, 2022, 13:04:00 PM
I just checked - I had removed sublayouts/badges.php, the client had requested some layout changes, so there were other edits as well. There are plenty of PHP warnings, but they are suppressed.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 29, 2022, 13:22:05 PM
Hi

File: templates/hera_j3_vm3/html/com_virtuemart/sublayouts/badges.php
Ligne 9: $ndate = strtotime ('now') - ($days * 86400); ?>

<?php defined('_JEXEC') or die('Restricted access');
$product $viewData['product'];
// Horme 3.5.0
$app JFactory::getApplication('site');
$template $app->getTemplate(true);
// Badge new
$days VmConfig::get('latest_products_days');
$cdate strtotime ($product->created_on) ;
$ndate strtotime ('now') - ($days 86400); ?>


  <div class="badges text-left clearfix">
  <?php if ($template->params->get('badges')) { ?>
    <?php if ($cdate $ndate): // Show Badge New ?>
      <span class="label label-success"><?php echo JText::_('TPL_VM_NEW'?></span>
    <?php endif; ?>

    <?php if ($product->product_special): // Show Badge Featured ?>
      <span class="label label-primary"><?php echo JText::_('TPL_VM_FEATURED'?></span>
    <?php endif; ?>

    <?php if ($product->prices['discountAmount'] != -&& !$template->params->get('percentage')): // Show Badge on Sale ?>
      <span class="label label-danger"><?php echo JText::_('TPL_VM_ONSALE'?></span>
    <?php endif; ?>
  <?php ?>
  </div>


When I deleted the badges.php file, the index.php page works.

I tried on the categories page, it shows error

Call stack
# Function Location
1 () JROOT/templates/hera_j3_vm3/html/com_content/category/default_articles.php:15
2 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
3 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/layouts/joomla/content/category_default.php:79
4 include() JROOT/libraries/src/Layout/FileLayout.php:125
5 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:73
6 Joomla\CMS\Layout\LayoutHelper::render() JROOT/templates/hera_j3_vm3/html/com_content/category/default.php:20
7 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
8 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:230
9 Joomla\CMS\MVC\View\HtmlView->display() JROOT/libraries/src/MVC/View/CategoryView.php:245
10 Joomla\CMS\MVC\View\CategoryView->display() JROOT/components/com_content/views/category/view.html.php:250
11 ContentViewCategory->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
12 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/controller.php:118
13 ContentController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:702
14 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_content/content.php:43
15 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
16 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
17 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
18 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
19 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
20 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49



File: /templates/hera_j3_vm3/html/com_content/category/default_articles.php
Ligne 15 :
$params = &$this->item->params;

<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT '/helpers/html');

// Create some shortcuts.
$params = &$this->item->params;
$n count($this->items);
$listOrder $this->escape($this->state->get('list.ordering'));
$listDirn $this->escape($this->state->get('list.direction'));

// Check for at least one editable article
$isEditable false;

if (!empty(
$this->items))
{
foreach ($this->items as $article)
{
if ($article->params->get('access-edit'))
{
$isEditable true;
break;
}
}
}
?>


I attach 2 files

Thank you

Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 29, 2022, 18:43:38 PM
you show the call trace but not the errors!

we need BOTH to give u any advice...

as a guess for

File: /templates/hera_j3_vm3/html/com_content/category/default_articles.php
Ligne 15 :
Code: [Select]
$params      = &$this->item->params;

remove the &

$params      = $this->item->params;
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 29, 2022, 18:55:31 PM
Quote from: GJC Web Design on December 29, 2022, 18:43:38 PM
you show the call trace but not the errors!

we need BOTH to give u any advice...

as a guess for

File: /templates/hera_j3_vm3/html/com_content/category/default_articles.php
Ligne 15 :
Code: [Select]
$params      = &$this->item->params;

remove the &

$params      = $this->item->params;

Hi GJC Web Design

I deleted & on line 15 that it works.

For the badges.php page, I have to force delete it for my index.php page for it to work.

Can we modify badges.php to be compatible with PHP8 ?

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 29, 2022, 18:57:11 PM
QuoteCan we modify badges.php to be compatible with PHP8 ?

you still don't say what the error is.....
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 29, 2022, 19:04:59 PM
Quote from: GJC Web Design on December 29, 2022, 18:57:11 PM
QuoteCan we modify badges.php to be compatible with PHP8 ?

you still don't say what the error is.....

I have already detailed the problem

Hello
It's the same template version but index.php page it shows error, if I activate PHP 8.  >:(

Call stack
# Function Location
1 () JROOT/templates/hera_j3_vm3/html/com_virtuemart/sublayouts/badges.php:9
2 include() JROOT/components/com_virtuemart/helpers/shopfunctionsf.php:567
3 shopFunctionsF::renderVmSubLayout() JROOT/templates/hera_j3_vm3/html/com_virtuemart/sublayouts/products.php:150
4 include() JROOT/components/com_virtuemart/helpers/vmview.php:129
5 VmView->renderVmSubLayout() JROOT/templates/hera_j3_vm3/html/com_virtuemart/virtuemart/default.php:42
6 include() JROOT/libraries/src/MVC/View/HtmlView.php:701
7 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/components/com_virtuemart/helpers/vmview.php:81
8 VmView->display() JROOT/components/com_virtuemart/views/virtuemart/view.html.php:210
9 VirtueMartViewVirtueMart->display() JROOT/components/com_virtuemart/controllers/virtuemart.php:48
10 VirtueMartControllerVirtuemart->display() JROOT/libraries/src/MVC/Controller/BaseController.php:702
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_virtuemart/virtuemart.php:128
12 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
13 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
15 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
16 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49


File: templates/hera_j3_vm3/html/com_virtuemart/sublayouts/badges.php

<?php defined('_JEXEC') or die('Restricted access');
$product $viewData['product'];
// Horme 3.5.0
$app JFactory::getApplication('site');
$template $app->getTemplate(true);
// Badge new
$days VmConfig::get('latest_products_days');
$cdate strtotime ($product->created_on) ;
$ndate strtotime ('now') - ($days 86400); ?>


  <div class="badges text-left clearfix">
  <?php if ($template->params->get('badges')) { ?>
    <?php if ($cdate $ndate): // Show Badge New ?>
      <span class="label label-success"><?php echo JText::_('TPL_VM_NEW'?></span>
    <?php endif; ?>

    <?php if ($product->product_special): // Show Badge Featured ?>
      <span class="label label-primary"><?php echo JText::_('TPL_VM_FEATURED'?></span>
    <?php endif; ?>

    <?php if ($product->prices['discountAmount'] != -&& !$template->params->get('percentage')): // Show Badge on Sale ?>
      <span class="label label-danger"><?php echo JText::_('TPL_VM_ONSALE'?></span>
    <?php endif; ?>
  <?php ?>
  </div>


Ligne 9:

$ndate = strtotime ('now') - ($days * 86400); ?>


Thank
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 29, 2022, 21:39:04 PM
QuoteI have already detailed the problem

No u haven't!!!!

You have pasted the call stack and the code but not the ERROR!
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 30, 2022, 11:09:11 AM
Hi GJC Web Design

you told me, not error but the index.php page it shows line 9 on the badges.php page.

  it's this line: $ndate = strtotime('now') - ($days * 86400); ?>

The full page code

<?php defined('_JEXEC') or die('Restricted access');
$product $viewData['product'];
// Horme 3.5.0
$app JFactory::getApplication('site');
$template $app->getTemplate(true);
// Badge new
$days VmConfig::get('latest_products_days');
$cdate strtotime ($product->created_on) ;
$ndate strtotime ('now') - ($days 86400); ?>


  <div class="badges text-left clearfix">
  <?php if ($template->params->get('badges')) { ?>
    <?php if ($cdate $ndate): // Show Badge New ?>
      <span class="label label-success"><?php echo JText::_('TPL_VM_NEW'?></span>
    <?php endif; ?>

    <?php if ($product->product_special): // Show Badge Featured ?>
      <span class="label label-primary"><?php echo JText::_('TPL_VM_FEATURED'?></span>
    <?php endif; ?>

    <?php if ($product->prices['discountAmount'] != -&& !$template->params->get('percentage')): // Show Badge on Sale ?>
      <span class="label label-danger"><?php echo JText::_('TPL_VM_ONSALE'?></span>
    <?php endif; ?>
  <?php ?>
  </div>


Is it possible to modify the badges.php page so that it will be compatible with php 8 ?
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: Jörgen on December 30, 2022, 12:16:47 PM
Yes, of course
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 30, 2022, 12:19:20 PM
my absolute LAST try --

QuoteIs it possible to modify the badges.php page so that it will be compatible with php 8 ?

Of course  - if you tell us what the ERROR is!

Not the code.
Not the call trace..

But the ERROR.....

I assume php8 doesn't like the values given in the calc...

does $days exist? 
Have u set the VmConfig::get('latest_products_days'); in the admin?

is $days an integer ?  if not use something like  $ndate = strtotime ('now') - ((int)$days * 86400);

if $days is empty then use

$days = VmConfig::get('latest_products_days');
if(empty($days)) { $days = 1;}





Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 30, 2022, 12:35:42 PM
Hi

QuoteHave u set the VmConfig::get('latest_products_days'); in the admin?

How to enable VmConfig in admin ?

I don't know how to code PHP, is it possible to give me the code to add to the badges.php page ?

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 30, 2022, 14:31:24 PM
have already suggested code

// Badge new
$days = VmConfig::get('latest_products_days');
if(empty($days)) { $days = 1;}
$cdate = strtotime ($product->created_on) ;
$ndate = strtotime ('now') - ((int)$days * 86400); ?>
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 30, 2022, 16:13:10 PM
Hi GJC Web Design
I added your code on the badges.php page, the index.php page displays correctly.

For option: Last Products - Number of days to display: 7. I can't find it in Virtuemart version 4.0.12, Normally it is in menu Configuration -> FRONT STORE - List of products

  Which virtuemart version are you using ?

I put the photo (the photo in French, I can't change to English).

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on December 30, 2022, 16:38:29 PM
does seem to be gone in VM4  - no idea why ... but my code covers this...
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on December 30, 2022, 16:59:04 PM
The option for latest_products_days entry has been removed in recent VM admin. The code GJC provided gets around that by using   if(empty($days)) { $days = 1;}  so that $days is assigned a value.

If required you can hard code a value $days
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 30, 2022, 17:28:48 PM
Quote from: jenkinhill on December 30, 2022, 16:59:04 PM
The option for latest_products_days entry has been removed in recent VM admin. The code GJC provided gets around that by using   if(empty($days)) { $days = 1;}  so that $days is assigned a value.

If required you can hard code a value $days

Thank you for your information
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 30, 2022, 17:44:15 PM
Hello

I am testing my site, I have another problem with the Paypal payment method.
When I chose the Paypal payment it sends on the Paypal.com site to put Paypal address. I want to click on Cancel and return to Mysite which displays an error

Table 'MySite.ujkn5_virtuemart_payment_plg_tco' doesn't exist

Call stack
# Function Location
1 () JROOT/libraries/joomla/database/driver/mysqli.php:668
2 JDatabaseDriverMysqli->execute() JROOT/libraries/joomla/database/driver.php:1740
3 JDatabaseDriver->loadResult() JROOT/plugins/vmpayment/tco/tco.php:299
4 plgVmPaymentTco->plgVmOnUserPaymentCancel() JROOT/libraries/joomla/event/event.php:70
5 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
6 JEventDispatcher->trigger() JROOT/administrator/components/com_virtuemart/helpers/vdispatcher.php:39
7 vDispatcher::trigger() JROOT/components/com_virtuemart/controllers/vmplg.php:114
8 VirtueMartControllerVmplg->pluginUserPaymentCancel() JROOT/libraries/src/MVC/Controller/BaseController.php:702
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_virtuemart/virtuemart.php:128
10 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
11 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49


on line 668 of libraries/joomla/database/driver/mysqli.php

throw new JDatabaseExceptionExecuting($query, $this->errorMsg, $this->errorNum);

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 31, 2022, 09:17:52 AM
Hello

I deactivate the VM Payment - 2Checkout plugin, there is no problem anymore.

Thank you and happy new year !
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: Milbo on January 16, 2023, 14:23:39 PM
Quote from: jenkinhill on December 30, 2022, 16:59:04 PM
The option for latest_products_days entry has been removed in recent VM admin. The code GJC provided gets around that by using   if(empty($days)) { $days = 1;}  so that $days is assigned a value.

If required you can hard code a value $days

Because you need to enter all the time new products, otherwise you get no products back. I think the new solution is just to load a list of products sorted by date, then a random number of this list is given back.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on January 16, 2023, 15:28:10 PM
Quote from: Milbo on January 16, 2023, 14:23:39 PM
Because you need to enter all the time new products, otherwise you get no products back. I think the new solution is just to load a list of products sorted by date, then a random number of this list is given back.

Yes, that seems to be the way to do it. I have never used the latest products option.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on February 09, 2023, 11:58:20 AM
Hi

I tested my site after the update, I have the problem the product detail page on the mobile mode (see the photo), it does not display the product photo.

There is a javascript problem on my Hera template ?

https://youtu.be/SFdyjlRRwMQ

you can test on my site the link: https://www.laptopfix.fr/reparations/pc-portable/remplacer-la-carte-graphique-pc-portable-avec-cpu-core-i3-ou-i5-et-i7-detail

Thanks for your help
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on February 09, 2023, 13:52:45 PM
You will have to contact https://extensions.virtuemart.net/ about the Hera template as the error is

Uncaught TypeError: a is undefined
    <anonymous> https://www.laptopfix.fr/templates/hera_j3_vm3/js/owl.carousel.min.js?f08b4779171ca55c0c3ad0769abbdf70:6

on a mobile view -- so it is the carousel - maybe because it is loading first before Jquery?


Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on February 09, 2023, 15:04:25 PM
Hi
You think the Owl Carousel is not compatible with virtuemart 4.

I used Joomla 3, it is still compatible with Hera template
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on February 21, 2023, 11:30:22 AM
Hello GJC Web Design

2 weeks ago I tried to contact the virtuemart.net support service but they told me that they don't have time to fix this problem.

Can you help me ?
THANKS

Quote from: GJC Web Design on February 09, 2023, 13:52:45 PM
You will have to contact https://extensions.virtuemart.net/ about the Hera template as the error is

Uncaught TypeError: a is undefined
    <anonymous> https://www.laptopfix.fr/templates/hera_j3_vm3/js/owl.carousel.min.js?f08b4779171ca55c0c3ad0769abbdf70:6

on a mobile view -- so it is the carousel - maybe because it is loading first before Jquery?



Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on February 21, 2023, 11:37:48 AM
An interim "fix" is to use the default VM image templates instead of the Hera overrides.

default_images.php
default_images_additional.php
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on February 21, 2023, 11:46:59 AM
hello jenkinhill

Can you tell me more details, how I will do it please

THANKS

Quote from: jenkinhill on February 21, 2023, 11:37:48 AM
An interim "fix" is to use the default VM image templates instead of the Hera overrides.

default_images.php
default_images_additional.php

Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on February 21, 2023, 12:05:44 PM
It is very simple. Just rename the override files, eg

default_images.phpX
default_images_additional.phpX

which are in    /templates/hera_j3/html/com_virtuemart/productdetails

I think you will lose touch screen linkage of the images on a mobile but display is OK.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on February 21, 2023, 13:26:54 PM
Hi jenkinhill

I renamed 2 file, it displays image on mobile. Thank you so much

Quote from: jenkinhill on February 21, 2023, 12:05:44 PM
It is very simple. Just rename the override files, eg

default_images.phpX
default_images_additional.phpX

which are in    /templates/hera_j3/html/com_virtuemart/productdetails

I think you will lose touch screen linkage of the images on a mobile but display is OK.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: ssnobben on March 01, 2023, 15:53:09 PM
Is VirtueMart also working with php 8.2 ?
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: Jumbo! on March 06, 2023, 18:33:25 PM
Quote from: ssnobben on March 01, 2023, 15:53:09 PM
Is VirtueMart also working with php 8.2 ?

It is not recommended to use PHP 8.2 just now. Joomla 4.2 and VirtueMart 4 are not fully compatible with PHP 8.2. You will indeed find some fatal errors.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on March 22, 2023, 10:13:28 AM
Hi

I just try to update the VirtueMart version 4.0.14

I have the error message:

Failed to extract file: index.php_option_com_virtuemart_view_plugin_name_istraxx_download_byhost

Do you have the same problem ?

THANKS
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on March 22, 2023, 11:55:28 AM
@tuaneric    See http://forum.virtuemart.net/index.php?topic=149699.msg534846#msg534846
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 09, 2023, 17:55:50 PM
Hi

Thank jenkinhill

I have a problem Problem displaying the photo of Delivery time, I added the photo but it does not display

Here is my website: https://www.laptopfix.fr/pieces-detachees/pi%C3%A8ces_pc_portable/connecteur/connecteur-ventilateur-macbook-pro-retina-2012-2017-detail

Thank
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on April 10, 2023, 15:09:52 PM
The availability image shows when the "in stock" number is zero. It is there to indicate the length of delivery delay for out of stock items

Other images like yours could be shown using custom fields.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 10, 2023, 16:14:01 PM
Hi jenkinhill

The Virtuemart 3 version works display Delivery Time, I used to display the Warranty and Free Shipping.
This option removed on Virtuemart 4 ?

I managed to create personal field for image.

https://www.flexiblewebdesign.com/blog/virtuemart-image-type-custom-field-tutorial-with-screenshots/

THANKS
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: pinochico on April 11, 2023, 21:11:43 PM
Interesting :)

We use plugin labels, then we see new checkbox for product detail in admin - the Warranty, the Sale, the On Featured and Free Shipping we setup in plugin.
Hmmm...
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 12, 2023, 11:48:56 AM
Hi pinocchio

what is the plugin name do you use for free shipping and warranty ?

Thanks
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 18, 2023, 19:25:54 PM
Hi

My Joomla 3 and virtuemart 4 has a login page per module The 'mod_login' , we can connect the account with ID but not email.

I bought VP One Page Checkout plugin, I saw VP One Page Checkout plugin that allows login with email and ID.

Is it possible to create a login module with email and ID with Joomla 3 without installing plugin ?

Thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: pinochico on April 19, 2023, 02:30:58 AM
to tuaneric:

labels:
https://www.minijoomla.org/extensions/virtuemart-extensions/product-labels-for-virtuemart

> Is it possible to create a login module with email and ID with Joomla 3 without installing plugin ?

I think no, but we use besser als VP One Page Checkout - One Page Checkout from Rupostel and inside is plugin Authentication - Email OR Username, which change Login module from Joomla too.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 24, 2023, 19:32:35 PM
Hello pinochico

I will wait for the new Virtuemart version for Joomla 4 to buy a VP Advanced User plugin from https://www.virtueplanet.com/extensions/vp-advanced-user

THANKS
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 24, 2023, 19:35:44 PM
Hi
I came to test my site, I refunded an order, I received an email with the PDF file vmfacture_1508051453454.pdf. In PDF file there is an error displaying Com_virtuemart_Credit_note (see photo).

How can I fix this problem.

THANKS
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on April 24, 2023, 20:20:29 PM
You are missing an entry for COM_VIRTUEMART_CREDIT_NOTE in your VM language files.
You can use a language override to add the constant and its translation.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 25, 2023, 09:01:43 AM
Hi

Add the line COM_VIRTUEMART_CREDIT_NOTE="Credit note" in administrator\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini

Thank jenkinhill
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 25, 2023, 09:12:08 AM
Hi
I have other problem, when I changed the order situation, it shows error

vmError: Avatax cancelOrder error checking existing DocId: Unknown column 'avalara_doc_id' in 'field list'

I checked avalara plugin, it activated fine. I don't know, what's the problem

Thank
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on April 25, 2023, 09:20:50 AM
Hi I tried deactivating avalara plugin, it no longer displays error
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on April 25, 2023, 12:45:34 PM
Are u using avalara?  If not it should be unpublished
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on July 03, 2023, 12:21:02 PM
Hello

Since yesterday, we have the problem creating fake account. They have created more than 100 automatic accounts (see the photo), the account activation emails have been sent permanently to my email.

When I disabled the Allow Joomla user registration option, I no longer received emails.

How can I solve this problem of creating spam accounts ?

Thank you for your help
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: Studio 42 on July 03, 2023, 13:40:58 PM
In the virtuemart Plugin, you can disable Joomla registration only
So your customer can create an account but only using your shop
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on July 03, 2023, 14:15:30 PM
Hello Studio 42

You can give me more details, I disabled Joomla user registration option.

In Manage -> Plugins, I search the word Virtuemart, I find only VirtueMart Product

Thank

Quote from: Studio 42 on July 03, 2023, 13:40:58 PM
In the virtuemart Plugin, you can disable Joomla registration only
So your customer can create an account but only using your shop
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on July 03, 2023, 15:37:37 PM
the snappily titled "VM Framework Loader during Plugin Updates and Registration Redirect" -
go to the equally snappy titled "Registration Redirect and loading of VM-framework" tab and choose:
Redirect Joomla to VirtueMart registration -> Yes
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on July 03, 2023, 16:26:59 PM
Hi GJC Web Design

The VM Framework Loader plugin during Plugin Updates and Registration Redirect has already activated on my Joomla site.
How will the new user be able to create an account?

I tried to create an account on my site, it doesn't want because I disabled Allow user registration option.
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on July 03, 2023, 16:39:45 PM
the idea is you enable Joomla registration but redirect the registration to VM ..

Most spammers can't be arsed filling and bots can't normally fill all the required VM fields ( address etc )

I go further with my sites and only allow ( by  code in the VM reg page ) people with something in their cart to register .. we then have no spam problems
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on July 03, 2023, 16:50:51 PM
I tried asking for help from RSJoomla tech support as I subscribed to RSFirewall!
It told me my site got hacked, I tried to scan my site with RSFirewall! that he finds no problem.

I received the emails every 1 minute with the name tomorrow: yandex.ru , list.ru , bk.ru , mail.ru

Can we block the domain name from creating a new account ?
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: jenkinhill on July 03, 2023, 17:47:27 PM
There are Joomla extensions capable of blocking registration by email address, eg https://extensions.joomla.org/extension/improved-registration/ or registration bot blockers such as https://extensions.joomla.org/extension/ospam-a-not/
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on July 03, 2023, 18:19:28 PM
Hello

I activated Captcha in the virtuemart registration, currently I have not received the emails anymore.

thank you
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: GJC Web Design on July 03, 2023, 18:25:08 PM
unless the client does business with Russia I as a matter of course block Russian ips .. it is simply not worth the hassle of allowing them.

I use https://www.rupostel.com/virtuemart-extensions/extensions/geolocator-for-joomla and put the deny script in the Joomla index.php

Also in Joomla you can block registration by email domain in users->manage->options | Email Domain Options
Test if this still works when registration is redirected to VM



Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on July 03, 2023, 18:30:48 PM
Hello GJC Web Design

Thank you for your information, I added *.ru to block ru domain
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 27, 2023, 19:08:26 PM
Quote from: jenkinhill on December 28, 2022, 20:59:03 PM
Yes, I have Hera 3.11.0

Hello jenkinhill

I want to know, your Hera 3.11.0 template works with VirtueMart 4.2.5 10924 J! 3.10.11 PHP 8.2.7 ?

THANKS
Title: Re: Joomla 4 is stable with Virtuemart 4 ?
Post by: tuaneric on December 28, 2023, 11:18:28 AM
Hello jenkinhill

Merci pour votre réponse, je viens faire la mise à jour mon hébergement en PHP 8.2. Mon site fonctionne correctement.

Bonne fête.