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

Multivariant creating wrong link

Started by joozen, March 11, 2024, 08:14:24 AM

Previous topic - Next topic

joozen

Hello.
Problem is that multivariants, when using custom label displaying link of label name but not product link. When you choose first one it jumping to current url, but when you jump from label to label it's not. I'm switched to non-herit so far but really don't like it. I'm using 4SEF but same result even when I turn SEF URL's off, just different link, but still wrong one. It's only work correctly if I select Alias as a label. But it's not what I want really. Can you please suggest how to fix it? Thank you.

Joomla! 4.3.4, VirtueMart 4.2.4 10922, PHP: 8.1.26

Here is example. When you making first choise "Small" it's creating normal link:



But when you jump to "Medium" it shows /Medium in link (custom label name) and causing 404 of course:

Joomla! 4.3.4
VirtueMart 4.2.4 10922
PHP: 8.1.26

TheThingIs

Hello joozen,
from what I can see on you site you have multiple items with the same alias "liverpool-fc-mens-black-conninsby-polo" but the alias must be unique in the database. Did you force the alias manually in the database?

I would suggest you check each child and save it again
then check the parent and selections in the multi variant field "use custom label" "small, medium ..." and save it again

I have your same identical setup and version and it works fine

Cheers

joozen

#2
Quote from: TheThingIs on March 11, 2024, 12:48:46 PMHello joozen,
from what I can see on you site you have multiple items with the same alias "liverpool-fc-mens-black-conninsby-polo" but the alias must be unique in the database. Did you force the alias manually in the database?

I would suggest you check each child and save it again
then check the parent and selections in the multi variant field "use custom label" "small, medium ..." and save it again

I have your same identical setup and version and it works fine

Cheers
Thank you for replay.
No, all aliases are unique. It's looks like some rooting problem because if I select aliaces as a label it works. But otherwise link coming with label name directly after site name. It was perfectly working with Joomla 3 and VM 4.0.2 but not working now with J4 and VM 4.2.4. I think I will roll back to Virtuemart 4.0.2. It looks like only really stable version.



Joomla! 4.3.4
VirtueMart 4.2.4 10922
PHP: 8.1.26

TheThingIs

I see the first column in the picture above should with alias, as you say correct.

I can assure you 4.2.4 on latest J3 and J4 works correctly for multi variants with Product name or Custom Label, but it is difficult to understand your problem: the only time i found the routing problem was with special characters in the product name or label or ramification field (that you are not using).
In case of special characters I had the popups problems i see on your product FE site... that is a javascript / json problem but i don't see special characters on your products.

Maybe it could help to see:
- screenshot of the multi variant custom field
- screenshot of the entire Custom Field tab of the parent product including the childs

Maybe you disabled some VM plugins? or maybe some routing problem?

Try to reinstall 4.2.4 over?

joozen

#4
Quote from: TheThingIs on March 11, 2024, 16:35:26 PMI see the first column in the picture above should with alias, as you say correct.

I can assure you 4.2.4 on latest J3 and J4 works correctly for multi variants with Product name or Custom Label, but it is difficult to understand your problem: the only time i found the routing problem was with special characters in the product name or label or ramification field (that you are not using).
In case of special characters I had the popups problems i see on your product FE site... that is a javascript / json problem but i don't see special characters on your products.

Maybe it could help to see:
- screenshot of the multi variant custom field
- screenshot of the entire Custom Field tab of the parent product including the childs

Maybe you disabled some VM plugins? or maybe some routing problem?

Try to reinstall 4.2.4 over?
Here is the Link

Try to select any variant, It will display correctly, than try to select another. Only two ways to make it work: set to nonhref or select alias as a label. But it shouldn't be like that. It should re-route to chaild product alias.
Joomla! 4.3.4
VirtueMart 4.2.4 10922
PHP: 8.1.26

TheThingIs

Quote from: joozen on March 11, 2024, 16:54:12 PMHere is the Link
Try to select any variant, It will display correctly, than try to select another.

I did already before, I see the problem with the links and I see the popups with the errors: as I said the only problem I had was with special characters, quotation marks ' or similar in the product name or product label...

I have 4.2.4 on Joomla 3 on protostar and testing to migrate on Joomla 4 with cassiopeia.
Multi Variant with Product Name, ok
Multi variant with Custom Label, ok

I once had corrupt files on 4.2.4 and I was going crazy then I updated again to 4.2.4 and it fixed it so I suggest reinstalling it.
Also use the virtuemart tools to fix tables nad to make sure your db tables are utf8...

It may be a router problem but imho it is a javascript problem: use developer tools on chrome or firefox and try to debug?

You are also missing the javascript onfocus event, your code and js seems personalized: try to test with a clean cassiopeia without any custom changes and no template overrides?

I know this is frustrating, just trying to give you some hints hoping that you can fix it


joozen

Tried Cassiopea with same result. Uninstalled 4SEF as well. Tried with and without SEF. No luck.
Joomla! 4.3.4
VirtueMart 4.2.4 10922
PHP: 8.1.26

joozen

Can't see other solution as remove all product dependences and setup another sizes as related products. Normal multivariant not working for me whatever I tried to do. By the way removing product dependencies not easy task as well in Virtuemart what is really strange.
Joomla! 4.3.4
VirtueMart 4.2.4 10922
PHP: 8.1.26

TheThingIs

Hello joozen,
it is difficult to help you if you don't do the checks i suggested above.
Btw make sure Joomla cache, VM cache, and VM menu modululs'cache are all turned off otherwise it is difficult to debug.

Try to to have a clean J4 and VM4 install in a separate folder or subdomain and see if you get the same errors?

As a suggestion, because you only have one size option on your t-shirts you can use another custom field or use the generic variant. I don't see why you would use multi variant if you don't use ramifications?

There have been continues reports of multi variant not working correctly, see if this helps https://forum.virtuemart.net/index.php?topic=144579.0



Cheers


joozen

Quote from: TheThingIs on March 13, 2024, 14:14:24 PMHello joozen,
it is difficult to help you if you don't do the checks i suggested above.
Btw make sure Joomla cache, VM cache, and VM menu modululs'cache are all turned off otherwise it is difficult to debug.

Try to to have a clean J4 and VM4 install in a separate folder or subdomain and see if you get the same errors?

As a suggestion, because you only have one size option on your t-shirts you can use another custom field or use the generic variant. I don't see why you would use multi variant if you don't use ramifications?

There have been continues reports of multi variant not working correctly, see if this helps https://forum.virtuemart.net/index.php?topic=144579.0



Cheers


Thank you for suggestion. I never tried other options because Multivariant worked properly in Joomla 3 with VM 4.0.2. Yes Generic child variant work for me, now I have to spent couple of hours to change it all. Unfortunately you can't use custom labels but it better than nothing. Thanks again. 
Joomla! 4.3.4
VirtueMart 4.2.4 10922
PHP: 8.1.26