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

Ajax in category browse view doesn't work without full category tree

Started by lindapowers, October 22, 2016, 16:19:04 PM

Previous topic - Next topic

lindapowers

Hi

VM 3.0.18 j 3.6.2

Since the release of 3.0.18 we had issues to make the ajax work in categoy browse view (for child variants and multivariants).

The bug prevents the childs from loading and if you have products marked as "featured" only these appear in the dropdown while you switch between childs.


So after testing a lot I noticed that in VM/Config/SEO tab

"Use full category tree for product links" is unchecked for us and only if we check it the ajax works fine. Not ideal solution since this changes the URL of all your products.


There is another bug with "the chose a variant" option that returns the product page in the container and breaks the layout which Im told is fixed in the SVN.

Regards

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lindapowers

Yes, 3 children as featured.

If I disable VM SEO I can't replicate the bug and everything seems to work.

With VM SEO enabled the featured products sometimes override other parent/childs or get mixed up while you swtich in dropdown with ajax in category browse enabled.

Setting this ""Use full category tree for product links" fixes the main bug but you still get featured products appearing as childs of unrelated parents.

Milbo

that sound really weird. Do you use generic child variants or Multivariants? Because they use a different sql. I really wonder about this, because both do not use the function which we use for the featured products. So I reallly wonder how it interferes. The same for the sef.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

I have same problem, and it's very simple.
When you get a list of products(any) the parent_id is set on the first product.
If you have more then one product having other parent id, the bad values are get from DB.
Simply check product exesearch query and you understand the problem.
I have rewrite this part for one of my plugin because this bug.

lindapowers


Studio 42

This is a general problem. I think it's not exesearch query but getproducts(), I hope max have some time to fix this.
I have not see myself the problem, customer reported me that they have bad products displayed since update, strange is that you can really have completly bad products returned and some was simply not existing, using random products or featured products module !
I have found the problem when i have do my module "Vm Products any ways" and i wanted to reuse core code, else perhaps i had not found this so quikly.

Milbo

We may have to clean the states? function populateState, the model keeps the filter. Maybe there is the problem.... BUT the product group is not stored, that is the reason I wonder.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lindapowers

As you say is a strange issue, I tested hours disabling plugins etc until I noticed that disabling VM SEO solved it.
About the featured products we can stop setting them as featured temporarily but seems the ajax in category browse doesn't like the "Use full category tree for product links" not checked.

Though it was an issue in the router.

Regards

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lindapowers

Hi

1 - The chose a variant" option that returns the product page in the container and breaks the layout - SOLVED
2 - Featured products appearing in unrelated parent/childs PRESENT
3 - Childs not loading without full category tree PRESENT  - If I disable VM SEO this works, also if I set "use full category tree"


This test package contains several new issues:

A) Price in the dropwdown for childs appears as 0.00

B) While switching language in frontend from VM I got a 1052 error, happened few times and then it was solved, maybe saving vm config:

Column 'virtuemart_category_id' in field list is ambiguous SQL=SELECT `virtuemart_category_id`, IFNULL(l.category_name,ld.category_name) as category_name FROM `#__virtuemart_categories_es_es` as ld LEFT JOIN `#__virtuemart_categories_en_gb` as l ON l.`virtuemart_category_id`= ld.`virtuemart_category_id` WHERE `virtuemart_category_id`= 7


I have cloned our website and uptated to vm 3.0.18.1  to test, I tested with Protostar with same effect.

You can check here some of the written issues, first 6 products are generic childs.

http://renovada.comenaranjas.com/es/tienda/fruta-de-temporada.html

And this is same page for 3.0.18 http://www.comenaranjas.com/es/tienda/fruta-de-temporada.html

As a side note you can see the search bar appeared too. Maybe new feature or setting, just noticed it.


Studio 42

Manu,
The search bar is a new feature and you have to disable it (i don't remember, if it's in the config or in each categories or in menu), it's enable as default and break many design on update, if the view is not overide in the template.

lindapowers

Quote from: Studio 42 on November 05, 2016, 17:00:11 PM
Manu,
The search bar is a new feature and you have to disable it (i don't remember, if it's in the config or in each categories or in menu), it's enable as default and break many design on update, if the view is not overide in the template.

Thanks Patrick, ill check it.

Yep, new setting in backend: "VM config/templates/Show search

EDIT: In 3.0.18.1 childs appear with price 0.00 in the dropdown if you use parent with no price set.

Milbo

Quote from: Studio 42 on October 25, 2016, 16:16:34 PM
I have same problem, and it's very simple.
When you get a list of products(any) the parent_id is set on the first product.
If you have more then one product having other parent id, the bad values are get from DB.
Simply check product exesearch query and you understand the problem.
I have rewrite this part for one of my plugin because this bug.

I am sorry, I dont understand the problem. The SQL, which reloads one product has nothing todo with getProductS. sortSearchListQuery is not used here!

Quote from: Studio 42 on October 25, 2016, 22:31:25 PM
This is a general problem. I think it's not exesearch query but getproducts(), I hope max have some time to fix this.
I have not see myself the problem, customer reported me that they have bad products displayed since update, strange is that you can really have completly bad products returned and some was simply not existing, using random products or featured products module !
I have found the problem when i have do my module "Vm Products any ways" and i wanted to reuse core code, else perhaps i had not found this so quikly.

First you wrote, the problem is understandable checking the sortSearchListQuery , but now it is a miracle. I can imagine it is somehow connected to a plugin of yours.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

The general problems seems because product parent_id in the model. and you have different parent, in some case this is used for all, having not parent id set to 0.
I think the case is only when you use multiple modules(or queries) and products having parent ids.
I don't chekcked deeper because in my case i need to modify it in all case because original model was not able to do what i needed.
But because this is only in some specific case, you need some luck to find the problem.
Note: random product module was not getting right products in my case too(using category filter) in vm 3.0.16, mysql 5.6. I don't know if this is correct now.