VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: kden on May 05, 2016, 15:50:06 PM

Title: [SOLVED] On Test Site, Cart Redirects to Live Site
Post by: kden on May 05, 2016, 15:50:06 PM
Joomla 3.5.1
Virtuemart 3.0.16
Php 5.5.35

I'm sure I have seen a solution for this issue before but I have been searching and cannot find it.
I've created a test site with Akeeba Kickstart to update joomla and a shipping component and hopefully fix an issue I've been having with not receiving emails. After fixing a few small issues the test site is running great until I go to the cart page. I can add products to the cart, but when I click to See the Cart, I am redirected to the live site with an empty cart.

I've really only seen a solution like detailed at the akeeba backup support but that does not apply to this version of joomla/virtuemart. I've searched through the other files in that folder and am not seeing anything that stores the url. https://www.akeebabackup.com/documentation/troubleshooter/prvirtuemart.html

I would just leave it and assume it will work fine when I bring the site live, except that I need to make sure the order email issue got fixed meaning I need to see the cart page and process test orders. Does anybody know how to fix the redirect?

Link to test site: http://www.testsite.a1securitybars.com/product-catalog
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: GJC Web Design on May 05, 2016, 15:54:23 PM
from the popup I go to the cart at

https://www.testsite.a1securitybars.com/index.php?option=com_virtuemart&view=cart

also from the cart module and the shop carts left menu

except the cert isn't valid
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: kden on May 05, 2016, 16:13:37 PM
The certificate is valid for the live site so I am not worried about that, I will try a different browser and see if that makes the difference. Not sure why I am redirecting, but it must just be my computer and maybe not an issue, thank you for taking a look!
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: GJC Web Design on May 05, 2016, 18:53:06 PM
but the point is I aren't redirected....
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: kden on May 05, 2016, 19:58:41 PM
Yes that is good news except I cannot duplicate it. I can't even get anything to add to the cart anymore.
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: GJC Web Design on May 05, 2016, 20:32:39 PM
clear browser caches etc etc
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: kden on May 05, 2016, 21:16:16 PM
Yes, thank you. I have already cleared joomla cache, cleared browser history and cache. Am unable to add to cart now. Not sure if it is working for other people to try. Add to cart had been working (up to being redirected when accessing cart page) until I cleared things. Trying on both Firefox and Safari on my mac and Firefox on a PC in the office.
Error Logs are not showing anything.
When I try to directly go to the cart using either testsite.a1securitybars.com/product-catalog/cart or https://www.testsite.a1securitybars.com/index.php?option=com_virtuemart&view=cart I am redirected to https://www.sternmastermarine.com/index.php?option=com_virtuemart&view=cart

Does virtuemart somewhere store a redirect? I cleared all redirects out of my .htaccess file when I made the test site. Does the certificate effect the site redirecting?
Title: Re: On Test Site, Cart Redirects to Live Site
Post by: GJC Web Design on May 05, 2016, 23:59:22 PM
you have a redirect at server level somewhere..

even  https://www.testsite.a1securitybars.com is now a 301 to http://www.sternmastermarine.com/

HTTP/1.1 301 Moved Permanently
Date: Thu, 05 May 2016 21:56:14 GMT
Server: Apache
Location: http://www.sternmastermarine.com/
Cache-Control: max-age=1
Expires: Thu, 05 May 2016 21:56:15 GMT
Content-Length: 241
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

Title: Re: On Test Site, Cart Redirects to Live Site
Post by: kden on May 06, 2016, 15:08:45 PM
Severe duh moment for me. I needed to uncheck Enable SSL certificate from the VM shop configuration. I did not realize a subdomain wouldn't work with that enabled. Thanks for making the comment about the certificate, took me awhile but that's how I solved it. The 301 redirect was leftover in the .htaccess and removed, I think it did not save when I initially changed it.