Checkout page / Cart page SEF URL problems

Started by Genius WebDesign, January 21, 2015, 21:31:16 PM

Previous topic - Next topic

Genius WebDesign

Hello,

Another SEO /SEF related issue..

In my current VM project (VM 3.0.0) I have set the cart page to a menu item with root ALIAS "indkobskurv", as I always do with my VM shops.
The idea is to make the cart page associated with a menu item, for menu item specific module assignments, and to always show the cart page with this URL address:  www.mysite.com/indkobskurv

And this works as intended, well almost..
Let me try to explain this as simple as I can:

The first problem is that in all instances the cart URL is generated with /cart  trailing to the URL, as this example:  www.mysite.com/indkobskurv/cart
It should only be: www.mysite.com/indkobskurv

The second problem is a bit more complicated to explain..:
When I click on "Go to cart" from the front page, then the cart URL is:  www.mysite.com/indkobskurv/cart
When I click on "Go to cart" from any Joomla article landing page, then the cart URL is:  www.mysite.com/indkobskurv/cart
But.. when I click on "Go to cart" from any VM category page or product detail page, then the cart URL is:  www.mysite.com/categoryalias/subcategoryalias/cart
(categoryalias and subcategoryalias are of course any given VM category alias for the page that I was on when clicking "Go to cart")

So, it seems that the "Go to cart" link that VM produces changes according to category and/or product detail page, and it does not follow the native Joomla menu item routing behavior.
This needs to be fixed
And, as I mentioned, I need to remove the trailing /cart from the URL.
My goal is simply to make the cart page adhere to a specific Joomla menu item and resolve to: "www.mysite.com/indkobskurv"  in all instances and under all circumstances.

Please someone advice how I fix these issues.
It is very important that I fix this because I need to be able to assign modules and other content specifically for the VM cart page.

P.S.
This may be a problem that only exists in VM3 (and not in VM2xx) because I have never seen this problem before on any previous Virtuemart project I have worked with.

GJC Web Design

have u tried VM3.0.3?  many bug fixes

2nd .. to assign modules to the cart pages I always use either a snippet in the template (detect the view) or there is a module available (advanced VM module or something)
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

Genius WebDesign

Thanks for the answer.
No, I have not tried v3.0.3
Where do I find this upgrade?
On the VM main site there is only 3.0.2...

Regarding module assignment it is very inappropriate that you cannot assign modules to the cart page using the Joomla core menu item system, don´t you think?
Especially when this worked fine in previous versions of Virtuemart.

jenkinhill

Where I need to assign modules to the cart page I use a hidden menu item for the cart.

VM3.0.3?  As with all files it is on http://dev.virtuemart.net/projects/virtuemart/files
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

Genius WebDesign

"Where I need to assign modules to the cart page I use a hidden menu item for the cart. "

That is exactly what I´m doing, but as you can see I´m having some trouble with the SEF URL.

Genius WebDesign

#5
To be more specific, when the system generates the "go to cart" URL with:

JRoute::_("index.php?option=com_virtuemart&view=cart")

it should always resolve to the alias of the menu item assigned to the cart view, correct?
But in my case it does not always do this.
For some reason, when I´m on product details page or on category page the menu item alias is not in effect.

So this seems to be an issue related to the VM routing framework.

Genius WebDesign

I have now upgraded VM to the latest version (v3.0.3) and the problem remains the same.

Please advice.

Genius WebDesign

If some of the developers want to investigate this I´m willing to provide full access to my test site, ofc. both back end and front-end.

ceitean

Is there any news regarding this issue?  It's not just a SEO problem as one cannot control the designated menu item for the cart location, thereby modules will show in the cart depending on the category view layout and (not looking at all the different urls) the site will look untidy unless one adds the same modules to the actual cart menu item.
thanks
 

ceitean

Hi again,

Another revisit to this question. Is it just me who has this problem? I'am surprised because if its a general problem, and not something I have completely missed, its a major issue for the use of VM3 as one cannot assign a (hidden) menu item to the cart.
see also:
http://forum.virtuemart.net/index.php?topic=127886.0

thanks, andrew

during testing of VM3.0.0 to VM 3.0.6
J!3.3-3.4
PHP 5.4.31


jjk

Quote from: Genius WebDesign on January 21, 2015, 21:31:16 PM
The idea is to make the cart page associated with a menu item, for menu item specific module assignments, and to always show the cart page with this URL address:  www.mysite.com/indkobskurv

I think the only thing you have to do to achieve this is to replace the string "varekurv" in the file da-DK.com_virtuemart.sef.ini with your "indkobskurv" in a language override.

However, to me it makes no sense to insist on a SEF url for a cart view, unless you want Google and other search engines to index your cart view, with the eventual risk that the page is being indexed including one of your customer's data. I've set my cart to NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

ceitean

QuoteI think the only thing you have to do to achieve this is to replace the string "varekurv" in the file da-DK.com_virtuemart.sef.ini with your "indkobskurv" in a language override.

However, to me it makes no sense to insist on a SEF url for a cart view, unless you want Google and other search engines to index your cart view, with the eventual risk that the page is being indexed including one of your customer's data. I've set my cart to NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET

Thanks for your answer jjk; my issue is not really about SEF url's. I also noindex the cart pages for the same reason you are mentioning (however, since the cart is never assigned to an item (because of the router problem), your no-indexing will have no effect as far as i see and the bots will index them anyway, as the cart is located at the end of all categories and subs across your site). 
Another consequence, as noted earlier in posts, since the cart is added to the current category, one cannot build a clean cart with a customized view (specific sales pitches, or just a clean cart with no other modules). 

I looked at the router now for a few minutes (w/o debugging ide) and see that i must re-set the $query['Itemid']). This fixed my problem.

case 'cart';

if ( isset($jmenu['cart']) ) {
$query['Itemid'] = $jmenu['cart'];
} else if ( isset($jmenu['virtuemart']) ) {
$query['Itemid'] = $jmenu['virtuemart'];
}

$segments[] = $helper->lang('cart') ;

break;



from this:

case 'cart';
if(!isset($query['Itemid'])){
if ( isset($jmenu['cart']) ) {
$query['Itemid'] = $jmenu['cart'];
} else if ( isset($jmenu['virtuemart']) ) {
$query['Itemid'] = $jmenu['virtuemart'];
}
}
$segments[] = $helper->lang('cart') ;

break;


line 249.
This is a quick hack that should be corrected properly (although too late for me tonight).

andrew

Milbo

Quote from: Genius WebDesign on January 22, 2015, 14:36:37 PM
Regarding module assignment it is very inappropriate that you cannot assign modules to the cart page using the Joomla core menu item system, don´t you think?
Especially when this worked fine in previous versions of Virtuemart.

Maybe the reason is not the VM version, maybe it is the joomla version. Do you have the same problem with j2.5? The router changed drastically in j3
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

Still the same behaviour in VM 3.0.7 and as noted:-

Quoteone cannot build a clean cart with a customized view (specific sales pitches, or just a clean cart with no other modules). 
Regards
A

Joomla 3.10.11
php 8.0

kgrzybowski

#14
Hi,

I'm having quite the same issue on J 3.4.1 and VM 3.0.7, in cart module (on my homepage) my href to cart looks like this: /cart/cart
but if I'm on any product page it looks this way: /some-category/some-other-category/product-name-details/cart
and on my vm default view it looks: /shop-default-page/cart

I have menu position assigned to cart and it's always present at the top of the page and it's fine there, I mean it's always /cart as it should be, so SEF is wrong only in cart module and in cart popup window (after adding product to cart).

Best regards,
Chris