News:

Looking for documentation? Take a look on our wiki

Main Menu

Menu-item cart not working

Started by Margriet, May 06, 2023, 10:16:43 AM

Previous topic - Next topic

Margriet

Like I used to do in Joomla 3, I created a hidden menu-item for the cart view of type Shopping Cart J4 to have a custom url and to be able to assign (or not) modules to this page. To my surprise this is not working in J4.
Joomla 4.3.1 with VM 4.0.20 10849

jenkinhill

Hidden menu module display is working OK for me with J4.3.1 & VM 4.0.19.10850  (same as 4.0.20) using Cassiopeia
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Margriet

Thanks. But what do you mean by hidden menu module? I just made a hidden menu-item like in J3. I've never heard of hidden modules....

jenkinhill

Just my quick typing while also chatting in the pub.

I was able to add a module to a cart page that can be accessed using a hidden menu URL, just like with J3.  Does your hidden link access the cart page at all?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Margriet

Thanks again. It accesses a cart page when I type in the url, but then I have an empty cart.
Alias for my hidden menu-item is /orderlist but url stays /cart when I access the cart after ordering a product.
To make sure nothing interferes I am testing with demo VM data and Cassiopeia.


GJC Web Design

Are forcing either www or no www in your .htaccess?

# match any URL with www and rewrite it to https without the www
RewriteCond %{HTTP_HOST} ^(www\.)(.*) [NC]
RewriteRule (.*) https://%2%{REQUEST_URI} [L,R=301]

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Margriet

No, no redirect in .htaccess. htaccess.txt from an installation package renamed to .htaccess without changing anything.
But it gets even stranger. To test even further, I really did a fresh installation of Joomla 4.3.1 and installed VM 4.0.20.10849 in it with sample data. When creating the menu items, I find that there is no longer an option for the J4 shopping cart menu item. Only the one from J3 is still there.

jenkinhill

The shopping cart link is correct, the text description has not been updated. The J4 dummy link does not show if J4 is used, but will show in J3. Makes no difference, as the dummy J4 menu link was the same except &layout=standard was appended to the URL for development purposes.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

QuoteNo, no redirect in .htaccess

well you should -- I have seen this cause many cart problems without a forced either www or not
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Margriet

#9
Quotewell you should -- I have seen this cause many cart problems without a forced either www or not
Live site has it, but thanks for your remark.
QuoteThe shopping cart link is correct, the text description has not been updated. The J4 dummy link does not show if J4 is used, but will show in J3. Makes no difference, as the dummy J4 menu link was the same except &layout=standard was appended to the URL for development purposes.
I now use the J3 link and it works as expected. Might have been something during upgrade process, but I still had the J4 link and that one didn't work. And it's obviously confusing if there's J3 behind a menu item when your site is running J4.