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

Don’t correct work module VirtueMart Products in Virtuemart 3.8.0.10319

Started by Sandruk1, May 09, 2020, 12:41:38 PM

Previous topic - Next topic

Sandruk1

When using the module VirtueMart Products in the product card, selected Random Products and filter by categoryit does not work, the goods are not filtered by categories, in virtuemart 3.6.10 it worked.
Someone else has such a problem, I will be happy for any evidence to solve this problem.
Thanks.
Use Virtuemart 3.8.0.10319
Joomla 3.9.18
PHP Version 7.3.17

Milbo

Did you activate the filter? I just did the error, I only set the category, I saw whatever products, then I saw the "filter Category" checkbox above. Maybe we added that and you just need to enable it. Because enabled it seems to work for me
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Sandruk1

Thanks for the answer, the category filter is turned on, but it stopped working in me, I use the VirtueMart Products module to display similar products from the category in which the product is located.
In VirtueMart Products I select Random Products, selected the top level of categories and enabled the category filter.
And products are displayed from different store categories, must be from the category in which the product is located.
Thanks.

Milbo

ahh, it is the "new" feature "load product browse page by ajax". It does not change the products of the module. When you click on a category, the products just keep the same as before. The reason is, that the ajax only reloads the content area currently. Just disable in the vmconfig in the template tab "Use ajax for category content".

This could be fixed by adding a js script similar to the one for the cart, which reloads the content for the product module automatically.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Sandruk1

Thank you for helping, the problem has started in Revision 10228, a temporary solution when replacing the term in the router.php file (1263)
      if(!isset($prodIds[$hash])){
         $prodIds[$hash]['virtuemart_product_id'] = $this->getFieldOfObjectWithLangFallBack('#__virtuemart_products_', 'virtuemart_product_id', 'virtuemart_product_id', 'slug', $productName);
         if(empty($categoryName) and empty($catId)){
            $prodIds[$hash]['virtuemart_category_id'] = false;
         } else if(!empty($categoryName)){
            $prodIds[$hash]['virtuemart_category_id'] = $this->getCategoryId($categoryName,$catId ) ;
         } else {
            $prodIds[$hash]['virtuemart_category_id'] = false;
         }
      }

back to

if(!isset($prodIds[$hash])){
         $prodIds[$hash]['virtuemart_product_id'] = $this->getFieldOfObjectWithLangFallBack('#__virtuemart_products_', 'virtuemart_product_id', 'virtuemart_product_id', 'slug', $productName);
         if(empty($categoryName) and empty($catId)){
            $prodIds[$hash]['virtuemart_category_id'] = false;
         } else {
            $prodIds[$hash]['virtuemart_category_id'] = $this->getCategoryId($categoryName,$catId ) ;
         }
      }

Then everything works well for me.
I will continue to try to understand.

Thanks.