Author Topic: SOLVED - Cart redirected to VM index on select payment/shipping with J SEF  (Read 19885 times)

WebMercher

  • Beginner
  • *
  • Posts: 43
Please help get Joomla default SEF working with VM.

I have searched this site and half the internet for over 2 days without finding an answer.
Many have asked similar questions here that either do not apply or nobody answered them.

If there is a link to solve this, please share.

Joomla! 2.5.9
2.0.18a

Site redirects to shop home page when selecting the shipment, payment or update quantity or delete quantity in main cart.

When joomla Search Engine Friendly URLs set to NO, all works fine.

Without nice URLs, kinda pointless, any ideas on how to get SEF working without breaking the cart?

.htaccess file is set
SEO in VM  has SEO Disabled (unchecked)
Seo Suffix set to  (-seeds)
Translate strings (checked)
Use product and category IDs (unchecked)

Using Shoplab template but happens using beez templates too.

Site URL:  http://50.22.14.181

I will provide a bounty on this, we are getting desperate.
I am offering 1yr of unlimited hosting to the first person/persons to help fix this.
8 Core Server is on a high speed redundant DS3 connected network.
If you don't need the server, give it to someone who need it or just use it for testing.

Thanks in advance.


REDIRECT SOLVED-
HAD A MENU LINK TO CART, REMOVED IT AND CART UPDATES WITHOUT REDIRECTING TO THE MAIN VM PAGE.
CHECK MENU LINK PERMISSIONS OR TRY REMOVING THEM TO FIX RELATED ISSUES, WORKED FOR ME.


To fix it, I disabled all menu links to the cart except the one in the modal cart and it works now

Well 98% fixed, the wrong redirect to VM main page instead of cart is fixed, except i cant get it to save the "shipping/payment" info first time.

After save again or click on cart link and "shipping/payment", choices now shows.
It saves to the database but not to the cart unless it's refreshed which essentially makes the customer select "shipping/payment" twice.

Once "shipping/payment" is fixed, I will be happy, I hope that helps.

If someone can tell me how to get the cart to either refresh after saving or update properly, please reply.
Thanks

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
Well, I don't need another hosting package at the moment :-)
...but one problem I noticed after adding some seeds into the cart is that I was unable to select a shipping method and a payment method. If you did configure these and they don't show up, you might have set one or more restrictions, which are not met by the order. Could be i.e. a weight or minimum order or a zip code restriction...

Also in your post you are saying that SEO suffix is set to "-seeds", while I saw the default "-details".
The 'Firebug' tool for the Firefox browser also shows some problems when loading the cart in the file 'shopping-cart.html', i.e.:   

SyntaxError: syntax error
<font color=990000>You must secure this program. Insecure pe...

ReferenceError: scdpCounters is not defined
..."0","event_goto_link":"","images_folder":"http:\/\/50.22.14.181\/modules\/mod_sm...

ReferenceError: JCaption is not defined
new JCaption('img.caption');



Are you using the latest version of the template? Perhaps it needs to be updated.
Did you test if it makes a difference if you use the VM jquery instead of the Google jquery in VM configuration?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

  • Beginner
  • *
  • Posts: 43
Thank you for the reply.

Yes, when Joomla SEO is enabled, can not select shipping or payment. Also can not change quantity in main cart.

There are no restrictions on on shipping or payments, they were working fine then just quit.

I changed the SEO suffix to -detail and then back to -seeds to see if for some strange reason that would fix it.

Quote
Are you using the latest version of the template?
Yes. Same happens with BEES Template.

Quote
Did you test if it makes a difference if you use the VM jquery instead of the Google jquery in VM configuration?
I do not know where that function is.

The reference errors confuse me, don't know what they mean.

I can give shell, FTP and admin access if that would help anyone trying to help me here.

Thanks again.

If anyone has any ideas on how to get this to work, I would greatly appreciate it.
Had this problem before with another site but don't remember how I fixed it.


jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
Did you test if it makes a difference if you use the VM jquery instead of the Google jquery in VM configuration?
I do not know where that function is.

Configuration > Templates tab > Activate Css Styles & Javascripts:
Using the VirtueMart jQuery
Use external google jQuery library

Quote
The reference errors confuse me, don't know what they mean.
You might try to temporarily disable addons like your counter to find out if they produce errors.

Just noticed something else in your cart. The shipment and payment links do have an 'html' suffix in their SEF url. This not normal. Did you enable 'Adds Suffix to URL' in the Joomla configuration? It should be set to "No". Otherwise the routers (which build the SEF url) will produce errors. Since a product in VM can be called by different urls, it needs a suffix to determine that it is pointing to a product details view - i.e. the default '-details'.  But if you enable the Joomla suffix, there are duplicate suffixes in the shop and the routers can produce errors. (BTW - The search engines don't need a suffix in the url).

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

  • Beginner
  • *
  • Posts: 43
JJK,

Thank you again for your suggestions, it's nice to see someone trying to help. I know someone reading this has the answer, too many people go through it for this not to be true.

Quote
Did you test if it makes a difference if you use the VM jquery instead of the Google jquery in VM configuration?

Tested, makes no difference, works fine on another site.


On another site that works i have

Joomla SEO Settings

    Search Engine Friendly URLs    Yes
    Use URL rewriting       Yes
    Adds Suffix to URL       Yes
    Unicode Aliases       No

VM Activate Css Styles & Javascripts  ALL ENABLED
VM SEO active.

Order page works fine on OTHER site. Should work on this one as well.

Same settings on new site :  http://50.22.14.181   but does not work.

I copied the working site files over top of this one but no change so I deleted the new site files and put it back to default install, this tells me the issue may be database related.

(time for a small rant for the rest of us fighting this issue)
What upsets me is the vast number of people that use virtuemart and complain about this issue without getting the issue solved.  I quit using virtuemart for that reason but still get tempted about once a year to give VM a chance.  SEO is an important part of J/VM so should not have so many problems to get working or such trouble getting a workable fix. The odd thing most people report is this happens without any new changes/additions to the site, just all of a sudden happens.  I tried installing ACE SEF, that fixed it for 15 minutes then went back to broken cart functions, so I uninstalled ACESEF.

Quote
You might try to temporarily disable addons like your counter to find out if they produce errors.
I appreciate the help, and turned off the extra module but made no difference.

If you have anymore suggestions I would greatly appreciate it, otherwise ... Please, somebody please help me get SEF/SEO working with J/VM, it will help a lot of people get faith back in this software, thanks.



WebMercher

  • Beginner
  • *
  • Posts: 43
Making progress.
links to the shopping cart on my menus were causing a problem, after removing them it works 98%, you have to tell it to save twice and now shipping and payment works, products delete etc without refreshing to home page.

How retarded is that?

Now how to figure out how to get it to take the shipping and payment type the first time instead of having to enter it twice.  The information saves, just does not show up until the cart is refreshed which makes a customer think it did not save their shipping/payment choice.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
Joomla SEO Settings
    Adds Suffix to URL       Yes

As mentioned above already, 'Adds Suffix to URL' in Joomla should definitely be set to "No" and in VM SEO settings the suffix can be -details, -html or whatever you like, i.e. -seeds. The Joomla suffix is a useless placebo for those who feel that they are missing something from the early stages of the internet. But using it will hurt your SEF urls in VM!

Quote
VM Activate Css Styles & Javascripts  ALL ENABLED
VM SEO active.

That's wrong. Either enable 'Using the VirtueMart jQuery' or 'Use external google jQuery library', but not both. Using both will very likely produce javascript errors. (VM jquery is more safe in my opinion)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

  • Beginner
  • *
  • Posts: 43
Thank you again for your help.

Ok, just changed the settings to your suggestions:

Adds Suffix to URL       no
Use external google jQuery library  UNCHECKED

Still does not refresh the shipping or payment until you refresh the page.

I fixed the previous problem by removing "View Cart" from a menu.
(Odd that menu items causes problems on checkout with SEO/SEF)

I also notice that when I try to save shipping or payment, it routes to the cart but url shows same as menu item alias for "virtuemart category home' (seed-catalog) instead of /seed-catalog/cart.

Again, seems to be connected to a database/menu issue.
Why should menus break checkout functions? What is the connection?

I noticed the same thing when the Add/Edit billing address information redirected wrong until i removed my "Edit account info" menu link.

Any more suggestions?

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
I fixed the previous problem by removing "View Cart" from a menu.
(Odd that menu items causes problems on checkout with SEO/SEF)

That works without any problem on my own website (and many others). Maybe you have some obsolete entries in the Joomla menu and extension tables.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

  • Beginner
  • *
  • Posts: 43
This is a fresh in install, how does one get obsolete entries?

Joomla! 2.5.9
2.0.18a

I just want shipping and payment to update on the checkout.
VM is driving me crazy

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
This is a fresh in install, how does one get obsolete entries?
This can happen when you install/uninstall extensions in Joomla and for some reason the installation or deinstallation fails or remains incomplete. Recently I've see for example a 'fresh' VirtueMart installation, where I actually found two obsolete VirtueMart components in the Joomla extensions table. If an installation makes trouble, it's worth to check the database tables and file folders for remains of earlier installations and do a manual cleanup if necessary - before doing another 'fresh' install.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

  • Beginner
  • *
  • Posts: 43
So is there an answer to my checkout page or is Virtuemart just so weak it cant handle being installed without having obsolete entries?
I appreciate the support but there are no "previous installations", it is a minimal install, no bells and whistles.

Any suggestions?


jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
Just compared your 'Save' button in the cart's shipment and payment selection to mine.
Yours:
<div class="buttonBar-right">
<button class="default" type="submit">Save</button>
<button class="default" onclick="window.location.href='/seed-catalog/cart'" type="reset">Cancel</button>
</div>
and your url shows:
...//50.22.14.181/seed-catalog/cart/edit_shipment

Mine:
<div class="buttonBar-right">
<button class="default" type="submit">Take over Selection</button>
<button class="default" onclick="window.location.href='/mydomainname/view-cart'" type="reset">Cancel</button>
</div>
and my url shows:
...//mydomainname/view-cart/edit_shipment

Looks to me like your ip address gets stripped in the button link, but I have no idea if that's a Joomla or a VirtueMart router problem or if this is the actual problem at all.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

WebMercher

  • Beginner
  • *
  • Posts: 43
Yes, I was pointing that error out before.

Notice my url has the shop menu category page in the url where yours just goes to view-cart/edit_shipment.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3751
  • using Matomo instead of Google Analytics
I did place a link to this forum post in the VM developer's chat. Responses were:

"...I had similar issues when first configuring php-fpm, cgi, fcgi.
there are some differences in htaccess rewrites for these configs... i can't say, but can also be caused by this -
it's pretty complicated area."

"...we had a problem last year with someone using IP. I dont think he came back when asked to try real domain."
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations