VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Georgios Kolomvos on November 20, 2024, 19:27:54 PM

Title: Problem with the menu item URLs for the Virtuemart products
Post by: Georgios Kolomvos on November 20, 2024, 19:27:54 PM
Testing Site: https://test2.aetos.com.gr/ 
- Joomla Version: 5.2.3
- VirtueMart Version: 4.4.6 11109 (with sample data) 
- VirtueMart Configuration / SEO Settings: (SEO Disabled = No, Use product link suffix = Yes, Use Product and Category IDs = No, Use full category tree for product links = Yes, Strict mode  = No, SEF for cart links = Yes) 

I have created a Joomla menu item for each one of the 3 products (hats) displayed on the homepage at https://test2.aetos.com.gr/ 
For example the menu item for the product Cap "Baseball" has the folowing URL: https://test2.aetos.com.gr/cap-baseball-menu-item/cap-baseball-product
The URL generated by VirtueMart for the same product is: https://test2.aetos.com.gr/cap-baseball-product

Trying to test the URLs above, i created a module named "TEST MODULE" (with a green background) that I want to be displayed only on these 3 product pages. To achieve this, I assigned the module to the Joomla menu items of these 3 products. The strange thing is that the module is not shown, neither when you click at the Joomla menu items of the products, nor when you click at the Virtuemart links of the products. Strangely, the TEST module appears only if you remove the last part from the menu item's URL.
For example, when you click on the Joomla menu item URL: https://test2.aetos.com.gr/cap-baseball-menu-item/cap-baseball-product or on the Virtuemart URL:  https://test2.aetos.com.gr/cap-baseball-product, the TEST module does not appear.
However, it does appear if you remove the last part from the menu item's URL, that is: https://test2.aetos.com.gr/cap-baseball-menu-item
From what I understand, it seems that something wrong is happening with the creation and mapping of the product URLs in VM. The problem is that the Joomla menu items and the corresponfing VM product links shouldn't be different...

The VM product menu items and the menu assignment of modules works perfectly on two other sites I have running VirtueMart 4.2.0. The first time I noticed this issue was after trying to update to VM 4.4.0
Title: Re: Virtuemart product links differ from their Joomla menu item links
Post by: ViPeS on November 20, 2024, 21:04:28 PM
Quote from: Jumbo! on November 20, 2024, 16:53:38 PMIn VirtueMart Configuration, under the SEO tab, turn on the "Use full category tree for product links" option.
Title: Re: Virtuemart product links differ from their Joomla menu item links
Post by: Georgios Kolomvos on November 20, 2024, 22:32:29 PM
Quote from: ViPeS on November 20, 2024, 21:04:28 PMIn VirtueMart Configuration, under the SEO tab, turn on the "Use full category tree for product links" option.
I have already tried that. I also tried this:
Use Product and Category IDs = Yes and Use full category tree for product links = Yes
Then the Joomla menu item for the the product "Cap Baseball" became: https://test2.aetos.com.gr/cap-baseball-menu-item/161/cap-baseball-product
and the Virtuemart generated link for the product "Cap Baseball" became: https://test2.aetos.com.gr/161/cap-baseball-product
And as you see they are still different when they should have been the same. At least, now the TEST module is shown when the Joomla menu item is clicked but it is not when the Virtuemart generated link is clicked. So the problem seems to remain...
=> After that i set "Use Product and Category IDs = No" as it was in my first post in case someone suggests some other solution.